Skip to content

Improve xaxis tick placement for all timeseries plots#1899

Merged
aestoltm merged 9 commits intoubccr:xdmod11.0from
aestoltm:timeseries_range_improvements
Aug 22, 2024
Merged

Improve xaxis tick placement for all timeseries plots#1899
aestoltm merged 9 commits intoubccr:xdmod11.0from
aestoltm:timeseries_range_improvements

Conversation

@aestoltm
Copy link
Copy Markdown
Contributor

@aestoltm aestoltm commented Aug 19, 2024

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 Day aggregation unit has a work-around with using category type axis because category axis do not draw axis labels on empty areas of the plot. The issue with category axis 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 in date type 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:

  • The pull request description is suitable for a Changelog entry
  • The milestone is set correctly on the pull request
  • The appropriate labels have been added to the pull request

@aestoltm aestoltm added the enhancement Enhancement of the functionality of an existing feature label Aug 19, 2024
@aestoltm aestoltm added this to the 11.0.0 milestone Aug 19, 2024
@aestoltm aestoltm self-assigned this Aug 19, 2024
eiffel777
eiffel777 previously approved these changes Aug 20, 2024
@aestoltm aestoltm requested a review from eiffel777 August 22, 2024 18:57
@aestoltm aestoltm merged commit c3be375 into ubccr:xdmod11.0 Aug 22, 2024
@aestoltm aestoltm deleted the timeseries_range_improvements branch August 22, 2024 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement of the functionality of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants