We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
颜色通道绑定字段生成多条折线 Tooltip 显示异常
官方示例修改
import { Chart } from '@antv/g2'; const chart = new Chart({ container: 'container', theme: 'classic', autoFit: true, }); const data = [ { "idx": 0, "number": 2445, "province": "四川省", "type": "number", "sub_type": "xx" }, { "idx": 0, "number": 21094.69, "province": "四川省", "type": "price", "sub_type": "yy" }, { "idx": 1, "number": 1244, "province": "四川省", "type": "number", "sub_type": "xx" }, { "idx": 1, "number": 12756, "province": "四川省", "type": "price", "sub_type": "yy" }, { "idx": 2, "number": 2244, "province": "四川省", "type": "number", "sub_type": "xx" }, { "idx": 2, "number": 19756.88, "province": "四川省", "type": "price", "sub_type": "yy" }, { "idx": 3, "number": 244, "province": "四川省", "type": "number", "sub_type": "xx" }, { "idx": 4, "number": 1975, "province": "四川省", "type": "price", "sub_type": "yy" }, { "idx": 4, "number": 4004, "province": "四川省", "type": "number", "sub_type": "xx" }, { "idx": 4, "number": 3004, "province": "四川省", "type": "number", "sub_type": "yy" } ] chart .line() .data(data) .encode('x', 'idx') .encode('y', 'number') .encode('color', 'type') .tooltip({ items: [ { field: 'number', name: 'number' }, { field: 'province', name: 'province' }, { field: 'sub_type', name: 'sub_type' }, ] }); chart.render(); chart.interaction('tooltip', true);
The text was updated successfully, but these errors were encountered:
这个例子挺好的:
chart.interaction("tooltip", { groupName: false }); chart.render();
但还是内部需要处理排序问题(需要修复):
Sorry, something went wrong.
目前没有发现其它问题
groupName 这个默认是 true 确实有点反直觉,可能还是要调整一下。
pearmini
Successfully merging a pull request may close this issue.
问题描述
颜色通道绑定字段生成多条折线 Tooltip 显示异常
期望结果
如何重现
官方示例修改
额外信息
The text was updated successfully, but these errors were encountered: