xAxis "0" not found 报错。

在vue中使用vcharts(vue版的echarts)

vcharts官网:https://vue-echarts.github.io/

原因:在node__modules/v-charts-v2/lib/index.esm.js中没有引入 grid.

添加以下代码:错误解决!

import 'echarts/lib/component/grid';
import { GridComponent } from 'echarts/components';
echarts.use([GridComponent]);

另外还有

import echarts from 'echarts/lib/echarts'" is not supported anymore. Use "import * as echarts from 'echarts/lib/echarts'" instead;

的报错。同样在 node__modules/v-charts-v2/lib/index.esm.js中 写入:

import * as echarts from 'echarts/lib/echarts';

报错解决

Logo

前往低代码交流专区

更多推荐