Improve xaxis tick placement for all timeseries plots#1899
Merged
aestoltm merged 9 commits intoubccr:xdmod11.0from Aug 22, 2024
Merged
Improve xaxis tick placement for all timeseries plots#1899aestoltm merged 9 commits intoubccr:xdmod11.0from
aestoltm merged 9 commits intoubccr:xdmod11.0from
Conversation
eiffel777
previously approved these changes
Aug 20, 2024
eiffel777
approved these changes
Aug 22, 2024
This was referenced Dec 19, 2024
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
These changes improve the tick placement for the x-axis to minimize the occurrences of tick labels on empty areas of the plot. The
Dayaggregation unit has a work-around with usingcategorytype axis becausecategoryaxis do not draw axis labels on empty areas of the plot. The issue withcategoryaxis type is that date formatting does not work. However, our data is currently in a YYYY-MM-DD format, therefore, the lack of formatting doesn't affect us when viewing 'by Day'. However, all other aggregation units still need to be indatetype axis in order to correctly format the tick labels, therefore, improvements were made to tick placement calculations.Some updates had to be made to the legend override event and thumbnail plot handling.
Note: Click and dragging the x-axis will still cause plotly to produce tick labels for dates not within the dataset, however, resetting the zoom will fix the tick placements.
Motivation and Context
Currently, there are tick labels shown on empty areas of the plot when the chart is initialized. This is misleading about what date range the data is actually covering.
Tests performed
Tested on development port with all aggregation units across many different date ranges
Checklist: