Ovilia opened a new pull request, #19919:
URL: https://github.com/apache/echarts/pull/19919
<!-- Please fill in the following information to help us review your PR more
efficiently. -->
## Brief Information
This pull request is in the type of:
- [ ] bug fixing
- [x] new feature
- [ ] others
### What does this PR do?
<!-- USE ONE SENTENCE TO DESCRIBE WHAT THIS PR DOES. -->
Add option `customValues` to `axisTick` and `axisLabel`, 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:
```js
xAxis: {
type: 'value',
axisLabel: {
customValues: [0, 4, 7, 8, 9]
},
axisTick: {
alignWithLabel: true,
customValues: [0, 0.5, 1, 1.5, 2, 8, 9]
},
}
```

## Usage
### Are there any API changes?
- [x] The API has been changed.
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`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]