apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.48k stars 19.62k forks source link

自定义geoJson,无法通过geo.regions的方式给自定义区域设置areaColor #14641

Closed liuzhuang-bud closed 1 year ago

liuzhuang-bud commented 3 years ago

Version

4.9.0

Steps to reproduce

在geojson.io中对中国地图做了一些自定义区域之后,在echarts中的geo.regions中对新增的自定义名称的区域设置areaColor,但是无效

What is expected?

geo: {
  regions: [{
        name: '内蒙古北',
        normal: {
          areaColor: 'rgba(91,143, 249, .2)',
        },
      }]

What is actually happening?

其他原生的省市颜色可以修改,但是自定义的比如这个内蒙古北就不行

echarts-bot[bot] commented 3 years ago

Hi! We've received your issue and please be patient to get responded. 🎉 The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question.

If you are interested in the project, you may also subscribe our mailing list.

Have a nice day! 🍵

echarts-bot[bot] commented 3 years ago

@liuzhuang-bud It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people, we'd like to suggest using English next time. 🤗

TRANSLATED
**TITLE** Custom geoJson, can not set areaColor for custom regions through geo.regions **BODY** ### Version 4.9.0 ### Steps to reproduce After making some custom regions on the map of China in geojson.io, in geo.regions in echarts, set areaColor for the newly-added custom name region, but it is invalid ### What is expected? geo: { regions: [{ name:'Inner Mongolia North', normal: { areaColor:'rgba(91,143, 249, .2)', }, }] ### What is actually happening? The colors of other native provinces and cities can be modified, but custom ones such as this north of Inner Mongolia will not work.
Ovilia commented 3 years ago

It should be geo.regions.itemStyle.areaColor.

liuzhuang-bud commented 3 years ago

用itemStyle.areaColor确实可以,只是觉得奇怪,为什么regions不work

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

github-actions[bot] commented 1 year ago

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!