題中說到的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
提交
取消