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

Smarter duplicate ticks finder #667

Closed
3 tasks done
markov00 opened this issue May 7, 2020 · 5 comments · Fixed by #742
Closed
3 tasks done

Smarter duplicate ticks finder #667

markov00 opened this issue May 7, 2020 · 5 comments · Fixed by #742
Assignees
Labels
:axis Axis related issue bug Something isn't working released on @19.8.x released Issue released publicly :xy Bar/Line/Area chart related

Comments

@markov00
Copy link
Member

markov00 commented May 7, 2020

Is your feature request related to a problem? Please describe.
We introduced the showDuplicateTicks property to show/hide duplicated ticks on a specific axis.
This works great until the user wants a set of repeated tick like in the following example:
I'm rendering a line series chart, where my x-axis has a time scale. My data spans 3 days, and I want to display ticks at midnight and at twelve o'clock.
Should the library be smart enough to detect this situation or should we leave the consumer to choose and handle that case?

This is, for example, the current situation in TSVB when choosing a time range of 3 days and an auto time interval.

Screenshot 2020-05-07 at 10 52 59

The showDuplicateTicks is off by default and the ticks are wrongly deduplicated.

Kibana Cross Issues
elastic/kibana#47045
elastic/kibana#70956

Checklist

Delete any items that are not applicable to this feature request.

  • this request is checked against already exist requests
  • 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
@flash1293
Copy link

It seems like showDuplicateTicks is not what the user wants in most cases. I think the behavior should be showConsecutiveDuplicateTicks - those almost never add any value and should not be shown by default.

Also, the deduplication logic could be smart enough to place the remaining label of a deduplicated sequence in the center of the covered range.

@markov00
Copy link
Member Author

markov00 commented May 7, 2020

Thank @flash1293, that's indeed a better behavior than the current one.

Also, the deduplication logic could be smart enough to place the remaining label of a deduplicated sequence in the center of the covered range.

I'm not sure I've understood perfectly what you mean, but the tick should always indicate the starting of an interval because it's much more clear to understand where one interval start and end, having them in the center of each interval could create confusions between users: some could interpret them as the center of the interval, some other as the beginning.

Screenshot 2020-05-07 at 12 26 18

The bottom-most axis/tick/label alignment is for me a better alignment in this case, what do you think? The tick lines are aligned with the beginning of each interval, where the label is centered in each interval instead of centered on the tick

@flash1293
Copy link

@markov00 you are completely right, thanks for the illustration.

I think the current deduplication logic keeping the first tick is fine. The "tradeoff" option looks interesting but it seems to be uncommon.

@markov00 markov00 self-assigned this Jul 7, 2020
markov00 added a commit to markov00/elastic-charts that referenced this issue Jul 7, 2020
This commit fix the current behaviour of the duplicated ticks handling the removal only for
consecutive duplicated ticks"

fix elastic#667
@markov00 markov00 added :axis Axis related issue :xy Bar/Line/Area chart related bug Something isn't working and removed discuss To be discussed enhancement New feature or request labels Jul 7, 2020
markov00 added a commit that referenced this issue Jul 7, 2020
This commit fixes the current behavior of the duplicated ticks handling the removal only for
consecutive duplicated ticks

fix #667
markov00 pushed a commit that referenced this issue Jul 7, 2020
## [19.8.1](v19.8.0...v19.8.1) (2020-07-07)

### Bug Fixes

* **axes:** remove only consecutive duplicated ticks ([#742](#742)) ([5038a63](5038a63)), closes [#667](#667)
@markov00
Copy link
Member Author

markov00 commented Jul 7, 2020

🎉 This issue has been resolved in version 19.8.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Jul 7, 2020
@markov00
Copy link
Member Author

🎉 This issue has been resolved in version 19.8.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this issue Feb 10, 2022
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 released on @19.8.x released Issue released publicly :xy Bar/Line/Area chart related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants