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

feat(rangeX and rangeY): add syntactic sugar for data #5914

Merged
merged 2 commits into from
Dec 11, 2023

Conversation

deletenothing
Copy link
Contributor

@deletenothing deletenothing commented Dec 8, 2023

Checklist
  • npm test passes
  • benchmarks are included
  • commit message follows commit guidelines
  • documents are updated
Description of change

close: #5803

添加一个默认的 transform,为rangeX和rangeY增加语法糖,使得可以支持以下写法

chart.rangeY().data([350, 600]); 以及
chart.rangeY().data([[350, 400],[500,600]]);

原写法为:chart.rangeY().data([[350, 600]]).encode('y', d => d)

@deletenothing deletenothing changed the title Feat range feat(rangeX and rangeY): add syntactic sugar for data Dec 8, 2023
Copy link
Member

@pearmini pearmini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pearmini pearmini merged commit 1a28b3d into antvis:v5 Dec 11, 2023
3 checks passed
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

Successfully merging this pull request may close these issues.

给 rangeX 和 rangeY 增加 data 语法糖
2 participants