Skip to content
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

Improve axis ticks deduplication #1417

Closed
2 tasks done
nickofthyme opened this issue Oct 4, 2021 · 1 comment · Fixed by #1420 or #1430
Closed
2 tasks done

Improve axis ticks deduplication #1417

nickofthyme opened this issue Oct 4, 2021 · 1 comment · Fixed by #1420 or #1430
Assignees
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

Comments

@nickofthyme
Copy link
Collaborator

nickofthyme commented Oct 4, 2021

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:

  1. Go to any story
  2. Set the tick values to round value to nearest integer.
  3. Disable integersOnly option.
  4. See misleading ticks

Or go to https://codesandbox.io/s/sad-flower-o05ps?file=/src/App.tsx

Expected behaviour
Tick placement is accurate

Screenshots

Image 2021-10-04 at 9 15 46 AM

Notice the left side without a tickFormatter applied, shows the correct value of 2.5 while to right rounds the value to 3 without changing its tick placement.

Version (please complete the following information):

  • Elastic Charts: 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

  • every related Kibana issue is listed under Kibana Cross Issues list
  • kibana cross issue tag is associated to the issue if any kibana cross issue is present
@nickofthyme nickofthyme created this issue from a note in Axes improvements (In progress) Oct 4, 2021
@nickofthyme nickofthyme added :axis Axis related issue :Lens Kibana Lens related issue :xy Bar/Line/Area chart related bug Something isn't working Impact:Critical kibana cross issue Has a Kibana issue counterpart labels Oct 4, 2021
@nickofthyme nickofthyme linked a pull request Oct 20, 2021 that will close this issue
9 tasks
Axes improvements automation moved this from In progress to Done Oct 20, 2021
@markov00 markov00 removed this from Done in Axes improvements Nov 18, 2021
@markov00 markov00 added this to Done in Axes improvements Nov 18, 2021
@nickofthyme nickofthyme linked a pull request Dec 9, 2021 that will close this issue
28 tasks
@nickofthyme nickofthyme reopened this Oct 19, 2023
@nickofthyme nickofthyme assigned nickofthyme and unassigned monfera Oct 19, 2023
@nickofthyme
Copy link
Collaborator Author

Closing in favor of #2220

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
No open projects
2 participants