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 #5879

Closed
wants to merge 17 commits into from

Conversation

deletenothing
Copy link
Contributor

@deletenothing deletenothing commented Dec 4, 2023

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

解决该issue #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)

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.

很优秀 🤣,下面两个点看看?

@hustcc
Copy link
Member

hustcc commented Dec 5, 2023

凌晨提 PR,太 geek 了~

@deletenothing
Copy link
Contributor Author

deletenothing commented Dec 7, 2023

想问一下:

  1. 这个的测试案例属于static还是api呢
  2. 文档这部分 是需要在原来rangeX 和rangeY的文档里加上该种用法吗
  3. 官网案例的话,windows仍然有无法正常显示的问题 不知这个是否解决?这个我需要在此次PR中一起提交吗

@hustcc
Copy link
Member

hustcc commented Dec 7, 2023

@deletenothing

  1. static 就可以了
  2. 文档需要加上这个简便的用法
  3. window 上的问题可以下一个 pr 帮我们看看,然后顺便提交 DEMO 吧 🙏🏻

@pearmini
Copy link
Member

pearmini commented Dec 7, 2023

@deletenothing 官网如果还是运行不了的,可以先不加案例,按照 @hustcc 说的即可

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.

最后一个小问题,这个 PR 的 commits 太长了,并且有重复的,应该是多次 merge
造成的:

image

本地运行一下:

git rebase v5

其他的都没有问题了!

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.

None yet

3 participants