-
Notifications
You must be signed in to change notification settings - Fork 19.7k
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: axis with break #19459
base: v6
Are you sure you want to change the base?
feat: axis with break #19459
Conversation
Thanks for your contribution! The pull request is marked to be |
Discussion: Should this feature be called "axis breaking" or "axis collapsing"? This may probably depend on if I can implement break folding/unfolding feature. I think the HighCharts implementation is quite tricky for the users. Although we can provide similar APIs with |
The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-19459@85c56b9 |
Document changes are required in this PR. Please also make a PR to apache/echarts-doc for document changes and update the issue id in the PR description. When the doc PR is merged, the maintainers will remove the |
Brief Information
This pull request is in the type of:
What does this PR do?
Provide a way to make break axes that may range too wide.
This is also helpful for expressing the lunch break (11:30-13:00) on intraday stock trading charts.
This PR also changes
indicesOfNearest
fromDataStore
toSeries
so that when in axisPointer, we can compare the data in the view coordinate rather ran data value, so that the nearest data is more intuitive since it's nearer to the mouse position.Fixed issues
Document Info
One of the following should be checked.
Misc
ZRender Changes
Related test cases or examples to use the new APIs
When doing visual tests agains
v6
branches, there are 4 diffs:axis-break
: This is the new test file for this feature so it's expected to be differenttooltip-axisPointer-snap
: This is the new test file forindicesOfNearest
and it checks if axisPointer snaps to the nearest data in view coord instead of data value so it's expected to be differentarea-large
: Due to the change ofindicesOfNearest
, it's now always get the nearest data. But before, some position may don't show tooltip (probably due to large data filtering). So it's expected to be different.pie-label-extreme
: After adding the logic to hiding label elements with zero width and height, the pie labelLines with no label text (due to truncation) will not be displayed. This is a more reasonable presentation because it seems to be not expected to show labelLine when there is not label displayed.See the full test report:
report.html.zip
Others
Merging options
Other information