New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sunburst only works if you import visualMap #7575

jonavila opened this Issue Jan 23, 2018 · 2 comments


None yet
3 participants

jonavila commented Jan 23, 2018

One-line summary [问题简述]

When using echarts 4 with a module bundler like Webpack, the sunburst will chart will not work if visualMap component is not imported

The following error is seeing in the console:
Uncaught TypeError: Cannot read property 'length' of undefined

Seems to be failing in this if statement:

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 4.0.2
  • Browser version [浏览器类型和版本]:
  • OS Version [操作系统类型和版本]:

Expected behaviour [期望结果]

Sunburst should work without including visualMap

ECharts option [ECharts配置项]

option = {


Other comments [其他信息]


This comment has been minimized.


Ovilia commented Jan 23, 2018

@pissang How can I fix this?


This comment has been minimized.


pissang commented Jan 23, 2018

Add a condition to avoid the case in which there is no visualMap component imported.

if (!visualMetaList || visualMetaList.length === 0) {

@Ovilia Ovilia closed this in 4f44e1e Jan 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment