題中說到的map圖表是官網(wǎng)的這個(gè)示例控制臺(tái)沒有任何報(bào)錯(cuò),并且局部渲染完成,僅地圖沒有渲染,大概是這樣的代碼已上傳到github
1 回答

四季花海
TA貢獻(xiàn)1811條經(jīng)驗(yàn) 獲得超5個(gè)贊
ECharts 3 中因?yàn)榈貓D精度的提高,不再內(nèi)置地圖數(shù)據(jù)增大代碼體積。地圖下載頁也關(guān)閉了下載服務(wù)。
以下是解決方法:
import ReactEcharts from "echarts-for-react"import echarts from 'echarts';import chinaJson from 'echarts/map/json/china.json'; //引入地圖數(shù)據(jù)... echarts.registerMap('china', chinaJson); //將地圖數(shù)據(jù)注冊(cè)到echart對(duì)象上,其它不變... <ReactEcharts option={this.option3} notMerge={true} lazyUpdate={true} onChartReady={this.onChartReadyCallback} onEvents={EventsDict} opts={null} />
添加回答
舉報(bào)
0/150
提交
取消