Uncaught (in promise) Error: Component series.map not exists. Load it first
错误已经描述的非常清楚了,没有map模块,这是因为在vue.js中使用echarts地图时,出现了这个错误提示,echarts中的series引入type:'map'
series: [{ name: '数据', type: 'map', mapType: 'hunan', roam: true, label: { normal: { show: true }, emphasis: { show: false } }, data: mapData }]由于在加载echarts图形相关的文件时,是依次加入的,单独缺少map:
const echarts = require('echarts/lib/echarts') const axios = require('axios') require('echarts/lib/chart/map') require('echarts/lib/chart/bar') require('echarts/lib/chart/line') require('echarts/lib/component/tooltip') require('echarts/lib/component/title')