Improve axis ticks deduplication #1417
Labels
:axis
Axis related issue
bug
Something isn't working
Impact:Medium
kibana cross issue
Has a Kibana issue counterpart
:Lens
Kibana Lens related issue
:xy
Bar/Line/Area chart related
Describe the bug
When using
tickFormat
to round to a given decimal value, the tick placements may be different than the presented label.To Reproduce
Steps to reproduce the behavior:
integersOnly
option.Or go to https://codesandbox.io/s/sad-flower-o05ps?file=/src/App.tsx
Expected behaviour
Tick placement is accurate
Screenshots
Version (please complete the following information):
latest
Additional context
The temporary solution is an iterative reduction of ticks until there are only unique tick labels. This is not perfect but will reduce the number of cases that show bad value. If the labels are identical with two ticks, expand the domain but limit this step to
5
or some value to prevent an Infinite loop.Kibana Cross Issues
elastic/kibana#97100
Checklist
Kibana Cross Issues
listkibana cross issue
tag is associated to the issue if any kibana cross issue is presentThe text was updated successfully, but these errors were encountered: