vue一文件,echarts报错xAxis "0" not found

Ger*_*óth 2 vue.js echarts

我是 Vue 和 echarts 的新手。

我遵循了本教程:https://www.freecodecamp.org/news/how-to-add-charts-and-graphs-to-a-vue-js-application-29f943a45d09/

直到我可以运行“npm runserve”命令。我打开了本地主机,但图表不存在。我在控制台中收到错误消息:错误:未找到 xAxis“0” 我是否缺少某些内容?我的代码看起来与教程相同。

Bar*_*nus 10

您使用的是echarts v5.x吗?GridComponent如果是这样,那么您也需要导入。参考github上这个问题