Remove tick labels that are outside the selected date interval #1960
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
The previous fix to address timeseries tick labels outside of the date range was in PR #1899, however, it was found that using 'category' axis type can cause timeseries plots to display data out of order if the series have varying date intervals.
This fix is for "Day" aggregation unit. The other units are handled by using a "linear" tickmode from PR #1899
This refactor puts the work on Plotly to correctly order the axis by using the "date" axis type. To address the original issue of having date tick labels outside the date interval I decided to follow @jpwhite4 suggestions to remove tick labels that are outside the selected duration.
Plotly relayout events are tied to the Ext.js 'resize' event, but Plotly relayout events can happen outside of Ext.js 'resize' events (e.g. Zoom is a relayout event but not resize), therefore, I needed to add a listener to the Usage tab to ensure erroneous tick labels were removed on zooming (mainly resetting the zoom). The metric explorer tab already had a listener on the relayout event.
Motivation and Context
Out of order timeseries plots are very undesirable. Makes it impossible to accurately view the plot
Tests performed
Tested on my dev-port on xdmod-dev
Checklist: