Skip to content
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

dataset.source 为空数组造成 echarts 抛错 #8395

Closed
skordyr opened this Issue May 24, 2018 · 3 comments

Comments

Projects
None yet
5 participants
@skordyr
Copy link

skordyr commented May 24, 2018

One-line summary [问题简述]

dataset 在 dataset.source 为空数组的时候,在 DefaultDataProvider 方法中因为 sourceFormat 被判定为 unknown 导致继承不了 count 方法,然后在 listProto.initData 中会调用 count 方法导致抛出错误,导致后续无法更新视图

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 4.1.0
  • Browser version [浏览器类型和版本] : Chrome/66.0.3359.181
  • OS Version [操作系统类型和版本]: Mac OS X 10_13_4

Expected behaviour [期望结果]

不影响后续的更新

ECharts option [ECharts配置项]

option = {
  dataset: {
    source: []
  },
 ....
}

Other comments [其他信息]

Edit 0p91r1qxmp

@senro

This comment has been minimized.

Copy link

senro commented Jun 27, 2018

确实有这个问题,多数据集的情况也会有这个问题,希望官方尽快解决吧!挺影响使用的

@JonasGao

This comment has been minimized.

Copy link

JonasGao commented Aug 21, 2018

+1 我也是,因为数据异步加载,初始化的时候肯定是没数据的

@Ovilia

This comment has been minimized.

Copy link
Contributor

Ovilia commented Sep 3, 2018

已修复

@Ovilia Ovilia closed this Sep 3, 2018

Ovilia added a commit that referenced this issue Sep 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.