-
Notifications
You must be signed in to change notification settings - Fork 19.6k
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
fix(Axis): xAxis axisTick custom interval funciton work error with boundaryGap false #20436
base: master
Are you sure you want to change the base?
Conversation
Thanks for your contribution! |
The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-20436@2625230 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the correct position of the tick should be placed at the red position. Is that right? Run demo
Thanks for the detailed test! Can you explain why there is a tick before What's the current policy for the last tick to show? |
The current logic is simple: add last one after intervalList. To form a tick pair, similar to the effect of boundaryGap: true, add an ending tick to the intervalList. A potential issue arises if the intervalList is [true, false]. By adding an end tick, it becomes [true, true], which might seem odd. A more intelligent way is if the tick is end of axis then add it. if not ignore it. Should we use this? |
I don't think axis ticks work in pairs, so I'd think add last one after intervalList works pretty intuitive to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My expected behavior the the last tick to be show or not would be:
[true, true, true, true]: true
[false, false, false, false]: false
[true, false, false, false]: true
[true, false, true, true]: true
[true, false, true, false]: true
[false, true, true, true]: true
The logic is, the last one is not displayed only if none ticks is displayed. But I'm open to what you think. Please let me know your opinions on this and let's discuss about what's more intuitive.
Brief Information
This pull request is in the type of:
What does this PR do?
Fixed issues
#20424
Details
Before: What was the problem?
After: How does it behave after the fixing?
Document Info
One of the following should be checked.
Misc
ZRender Changes
Related test cases or examples to use the new APIs
N.A.
Others
Merging options
Other information