Error: Component series.liquidFill not exists. Load it first.
Error: Component series.liquidFill not exists. Load it first.
场景:使用水球图时,报错:Error: Component series.liquidFill not exists. Load it first.
解决办法:
1、先检查是否安装了echarts和echarts-liquidfill(注:echarts4.+的版本对应echarts-liquidfill2.+的版本)
npm install echarts@4.9.0
npm install echarts-liquidfill@2.0.6
2、在页面中引入使用
import echarts from "echarts";
import 'echarts-liquidfill';
3、若依就报错,检查引入的echarts写法
将路径写法:import echarts from 'echarts/lib/echarts';
改成:import echarts from 'echarts';
4、水球简单代码
let option = { series: [ { type: 'liquidFill', data: [0.7], label:{ normal:{ textStyle:{ fontSize:10 } } }, } ] };
5、效果图