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
中级任务
使得 rangeX 支持以下的语法,解决 #4572 提到的第一个问题。
import { Chart } from '@antv/g2'; const chart = new Chart({ container: 'container', autoFit: true, }); chart.data({ type: 'fetch', value: 'https://gw.alipayobjects.com/os/bmw-prod/551d80c6-a6be-4f3c-a82a-abd739e12977.csv', }); chart.line().encode('x', 'date').encode('y', 'close'); chart.rangeY().data([350, 600]); // 这样写就可以了 chart.render();
之前的写法:
chart.rangeY().data([[350, 600]]).encode('y', d => d)
思路:添加一个默认的 transform,参考下面的参考说明
G2/src/mark/lineX.ts
Line 45 in 44188f7
G2/src/transform/maybeTupleX.ts
Line 5 in 44188f7
The text was updated successfully, but these errors were encountered:
【deletenothing 认领】
Sorry, something went wrong.
@pearmini 你好,我对这个需求还有一些疑问,1,请问这个语法糖需要考虑data为[[300,400],[500,600]]这样多个数组的情况吗;2,请问对于RangeX想要实现什么样的效果可以再说明一下吗
@deletenothing
[[300,400],[500,600]]
deletenothing
Successfully merging a pull request may close this issue.
AntV Open Source Contribution Plan(可选)
Issue 类型
中级任务
任务介绍
使得 rangeX 支持以下的语法,解决 #4572 提到的第一个问题。
之前的写法:
思路:添加一个默认的 transform,参考下面的参考说明
参考说明
G2/src/mark/lineX.ts
Line 45 in 44188f7
G2/src/transform/maybeTupleX.ts
Line 5 in 44188f7
The text was updated successfully, but these errors were encountered: