记录一下echart引用地图的方法:
当前使用echart版本为4.2.1
html部分
<template>
<div class='echarts' ref="mapChart"></div>
</template>
js部分
<script>
import echarts from 'echarts'
import china from 'echarts/map/json/china.json' // 引入中国地图json数据
export default {
name: 'echarts',
mounted(){
this.init();
},
data() {
return {
myChart: null
}