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

是使用 data-view 的 source 来重新设置新的数据吗? #52

Open
MwumLi opened this issue Feb 23, 2019 · 0 comments
Open

是使用 data-view 的 source 来重新设置新的数据吗? #52

MwumLi opened this issue Feb 23, 2019 · 0 comments

Comments

@MwumLi
Copy link

MwumLi commented Feb 23, 2019

像下面这样初始化的时候已经设置了 connector, transform:

dv.source(data, {
  type: 'topojson',
});

dv.transform({
  type: 'filter',
  callback(row) {
    return row.Run !== "1";
  }
});

如果我此时有新的 data, 可以重新使用 source 方法设置数据, 这时候会重新用原来的 transform 的来处理一遍新数据。
但是依旧需要在 souce 方法中提供 connector 配置, 这个 connector 有必要在重新传进去吗? 按我的理解是应该复用, 虽然传进去也没什么问题。

或者有什么其他用来设置新的数据的方法?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant