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

fix(axis labels): offset previous space correctly #45

Merged

Conversation

emmacunningham
Copy link
Contributor

This fixes the overlapping labels issue that was surfacing in time series labels where the first and
second labels would overlap even when showOverlappingTicks/Labels was false. The issue is that the
previousOccupiedSpace variable which was being used to determine if a tick/label should be included
in the set of visible ticks/labels was not being updated correctly for the first tick, causing the
next tick to render (even when it should have been hidden). This commit fixes that value update as
well as simplifies the initialization of the variable to make the logic flow a bit easier to follow.

time_series_labels_fixed

fixes #42

Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this fix. Code looks good.

This fixes the overlapping labels issue that was surfacing in time series labels where the first and
second labels would overlap even when showOverlappingTicks/Labels was false.  The issue is that the
previousOccupiedSpace variable which was being used to determine if a tick/label should be included
in the set of visible ticks/labels was not being updated correctly for the first tick, causing the
next tick to render (even when it should have been hidden).  This commit fixes that value update as
well as simplifies the initialization of the variable to make the logic flow a bit easier to follow.

fixes elastic#42
@emmacunningham emmacunningham merged commit ff2a47a into elastic:master Feb 7, 2019
markov00 pushed a commit that referenced this pull request Feb 7, 2019
## [1.0.1](v1.0.0...v1.0.1) (2019-02-07)

### Bug Fixes

* **axis labels:** offset previous space correctly ([#45](#45)) ([ff2a47a](ff2a47a)), closes [#42](#42)
@markov00
Copy link
Member

markov00 commented Feb 7, 2019

🎉 This PR is included in version 1.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Feb 7, 2019
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Issue released publicly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix axis labels for time series overlapping into each other on smaller window sizes
2 participants