xieziyu / ngx-echarts

An angular (ver >= 2.x) directive for ECharts (ver >= 3.x)
https://xieziyu.github.io/ngx-echarts/
MIT License
1.1k stars 195 forks source link

it does not support geo? #150

Open vosho opened 5 years ago

vosho commented 5 years ago

I imported map and "node_modules/echarts/map/js/china.js", "node_modules/echarts/dist/extension/bmap.js" Both in file angular-cli and tsconfig with config: geo: { map: 'china', label: { emphasis: { show: false } }, roam: true, itemStyle: { normal: { areaColor: '#323c48', borderColor: '#111' }, emphasis: { areaColor: '#2a333d' } } } But it's not working. Please give help. Thanks

xieziyu commented 5 years ago

@StevenWung geo is supported. I think the map data is not registered properly in your case. You can load "node_modules/echarts/map/json/china.json" and register it manually by calling echarts.registerMap("china", chinaJSON). This should be done before you use geo: { map: 'china', ... }.

You can refer to my demo: https://xieziyu.github.io/ngx-echarts/#/demo/map/hongkong-pd

vosho commented 5 years ago

@xieziyu Thanks another question: does it support this kind of map? http://www.echartsjs.com/examples/editor.html?c=map-polygon

xieziyu commented 5 years ago

@StevenWung Yes, it does. You need import baidu map library.

liuquanzhang commented 5 years ago

Why does the configuration bmap not work? in angular7.

@StevenWung 是的,确实如此。你需要导入百度地图库。

chiranshu14 commented 3 years ago

@xieziyu Has geo been removed from the latest version?