题中说到的map图表是官网的这个示例控制台没有任何报错,并且局部渲染完成,仅地图没有渲染,大概是这样的代码已上传到github
1 回答
四季花海
TA贡献1811条经验 获得超5个赞
ECharts 3 中因为地图精度的提高,不再内置地图数据增大代码体积。地图下载页也关闭了下载服务。
以下是解决方法:
import ReactEcharts from "echarts-for-react"import echarts from 'echarts';import chinaJson from 'echarts/map/json/china.json'; //引入地图数据...
echarts.registerMap('china', chinaJson); //将地图数据注册到echart对象上,其它不变...
<ReactEcharts
option={this.option3}
notMerge={true}
lazyUpdate={true}
onChartReady={this.onChartReadyCallback}
onEvents={EventsDict}
opts={null} />添加回答
举报
0/150
提交
取消
