-
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): custom axis tick/label positions. close #13627 #13636
Conversation
Thanks for your contribution! Document changes are required in this PR. Please also make a PR to apache/incubator-echarts-doc for document changes. When the doc PR is merged, the maintainers will remove the |
Thanks for the idea and implementation! We are planning features similar. Perhaps we can discuss it together |
Thanks! That would be nice, I made this PR because it was quick and I wanted the feature sooner, but as long as ECharts has this functionality in some way, I'm happy. |
Any updates on this? |
@pissang This feature would be really useful to avoid funky tick positions for a weekly bar graph with axis Can it be merged and released please ? |
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.
LGTM
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.
This is indeed a fantastic feature and I deeply apologise for not having reviewed it over the past few years. There are only a few areas that require improvement. Given the significant amount of time that has lapsed, I have created a new PR based on this one. Please rest assured that your commit information has been retained in the records, and we greatly value your contribution. We warmly invite you to continue the conversation in the new PR.
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.Fixed issues
#13627 (my own issue)
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