引入 echarts.js、bmap.js 以及 https://api.map.baidu.com/api?v=2.0&ak=這里填在百度開發平台注冊得到的 access key;
在 option 中設置 bmap,參考這個例子
https://echarts.apache.org/examples/zh/editor.html?c=effectScatter-bmap
如需獲得百度地圖實例,可以通過 chart.getModel().getComponent('bmap').getBMap(),然后根據百度地圖API做進一步設置。
百度地圖API鏈接:https://lbsyun.baidu.com/cms/jsapi/reference/jsapi_reference.html
更多百度地圖例子:https://www.makeapie.com/explore.html#charts=mapsort=ranktimeframe=all~author=all
更多百度統計圖例子:https://www.makeapie.com/explore.html