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

[Documentation] 教程文档 -> 图表概念 -> 数据 -> DataSet,示例的运行结果和实际不一致 #3593

Open
builden opened this issue Dec 23, 2024 · 2 comments
Assignees
Labels

Comments

@builden
Copy link

builden commented Dec 23, 2024

Documentation Title or Section

教程文档

Issue Description or Suggestion

// 注册 merge transform
dataSet.registerTransform('mergeDataView', mergeTransform);
// 使用 merge transform 合并数据
dataViewMerge.transform({ type: 'mergeDataView' });

/**
 * 至此,dataViewMerge 数据处理已经完成了。
 * 最终数据的内容如下
  [
    { year: '1990', group: '18-34', value: 16.9 },
    { year: '1990', group: '35-49', value: 12.2 },
    { year: '1991', group: '18-34', value: 17 },
    { year: '1991', group: '35-49', value: 17.8 },
    { year: '1993', group: '18-34', value: 26.5 },
    { year: '1993', group: '35-49', value: 23.8 },
    { year: '1990', group: '50-64', value: 10.2 },
    { year: '1990', group: '65+', value: 5.2 },
    { year: '1991', group: '50-64', value: 10 },
    { year: '1991', group: '65+', value: 4.8 },
    { year: '1993', group: '50-64', value: 16.8 },
    { year: '1993', group: '65+', value: 6.6 }
  ]
*/

csvParser不会把value里的数据类型转化为number类型
后面经过statistics transform转化后,结果数据下面这样的数据结构,和示例代码中的预期不符

[{
    group: "1990",
    avg: 11.125,
    max: 16.9,
    min: 5.2,
    average: 11.125,
    sum: 44.5,
  }, {...}]
@builden builden added the docs label Dec 23, 2024
Copy link
Contributor

Thank you for your feedback! We have received your question and will deal with it later.
If any developer is interested in this issue, please leave a message "claim this issue" below the issue. Welcome to participate in open source co-construction!
We are very grateful to every contributor. After submitting the PR, we will prepare a gift for the developers who participated in the co-construction.
For participation in co-construction, please refer to: https://visactor.io/vchart/contributing/
To communicate with official developers, you can download the Feishu app and scan the QR code to join the Feishu group!
Thank you again for your support!
feishu-qr-code
感谢您的反馈!我们已经收到您的问题,并会在稍后处理。
如果有开发者对这个问题感兴趣,请在问题下方留言“认领此问题”。欢迎参与开源共建!
我们非常感谢每一位贡献者。提交 PR 后,我们会为参与共建的开发者准备一份礼物。
参与共建请参考:https://visactor.io/vchart/contributing/
如需与官方开发者沟通,可以下载飞书应用并扫描二维码加入飞书群!
再次感谢您的支持!

1 similar comment
Copy link
Contributor

Thank you for your feedback! We have received your question and will deal with it later.
If any developer is interested in this issue, please leave a message "claim this issue" below the issue. Welcome to participate in open source co-construction!
We are very grateful to every contributor. After submitting the PR, we will prepare a gift for the developers who participated in the co-construction.
For participation in co-construction, please refer to: https://visactor.io/vchart/contributing/
To communicate with official developers, you can download the Feishu app and scan the QR code to join the Feishu group!
Thank you again for your support!
feishu-qr-code
感谢您的反馈!我们已经收到您的问题,并会在稍后处理。
如果有开发者对这个问题感兴趣,请在问题下方留言“认领此问题”。欢迎参与开源共建!
我们非常感谢每一位贡献者。提交 PR 后,我们会为参与共建的开发者准备一份礼物。
参与共建请参考:https://visactor.io/vchart/contributing/
如需与官方开发者沟通,可以下载飞书应用并扫描二维码加入飞书群!
再次感谢您的支持!

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

No branches or pull requests

2 participants