Uncaught (in promise) Error: Component series.map not exists. Load it first

1365 단어 echartsVue.js
1. 오류 설명
Uncaught (in promise) Error: Component series.map not exists. Load it first. 
at Function.entity.getClass (clazz.js:178)
at ExtendedClass. (Global.js:223)
at Array.forEach ()
at each (util.js:298)
at ExtendedClass.visitComponent (Global.js:212)
at Function.entity.topologicalTravel (component.js:125)
at ExtendedClass.mergeOption (Global.js:194)
at ExtendedClass.initBase (Global.js:663)
at ExtendedClass.resetOption (Global.js:141)
at ExtendedClass.setOption (Global.js:123)
index.vue?a44b:214 Array(102)

2. 오류 원인
vue.js에서 echarts 지도를 사용할 때 이 오류 알림이 발생했습니다. echarts의 series가 type:'map'에 도입되었습니다.
 series: [{
   name: ' ',
   type: 'map',
   mapType: 'hunan',
   roam: true,
   label: {
      normal: {
         show: true
      },
      emphasis: {
          show: false
      }
   },
   data: mapData
}]

3. 해결 방법
echarts 도형과 관련된 파일을 불러올 때 순서대로 추가되기 때문에 맵이 단독으로 부족합니다
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')

좋은 웹페이지 즐겨찾기