-
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
feat(axis): custom axis tick/label positions #19919
base: master
Are you sure you want to change the base?
Conversation
Thanks for your contribution! The pull request is marked to be To reviewers: If this PR is going to be described in the changelog in the future release, please make sure this PR has one of the following labels: This message is shown because the PR description doesn't contain the document related template. |
The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-19919@0c90824 |
@gooroodev review |
Summary of Changes
Issues, Bugs, and Typos
Proposed Improvements
General Review of Code Quality and Style
SummaryOverall, the pull request introduces a valuable feature for customizing axis tick/label positions. The code is well-structured, and the changes are integrated seamlessly. Minor improvements in consistency and comments would further enhance the quality and maintainability of the code. Yours, Gooroo.dev. To receive reviews automatically, install Github App |
Brief Information
This pull request is in the type of:
What does this PR do?
Add option
customValues
toaxisTick
andaxisLabel
, which allow the user to specify tick/label positions.This PR is based on #13636 . Since it's a long time since the opening of this PR, I made a few adjustment based on the original commit, with full regards to the contribution to @dvdkon 's contribution.
Fixed issues
#13627
Details
Before: What was the problem?
See issue #13627
After: How is it fixed in this PR?
The new option allows for completely custom tick/label positions, for example:
Usage
Are there any API changes?
In axis:
axisTick.customValues: (string | number | Date)[]
axisLabel.customValues: (string | number | Date)[]
Array of axis values on which a tick/label will be present (automatic tick generation is disabled)
Related test cases or examples to use the new APIs
test/axis-customTicks.html