Skip to content

Refactor timeseries ticklabels#1992

Merged
aestoltm merged 16 commits intoubccr:xdmod11.0from
aestoltm:refactor_date_ticklabels
Mar 6, 2025
Merged

Refactor timeseries ticklabels#1992
aestoltm merged 16 commits intoubccr:xdmod11.0from
aestoltm:refactor_date_ticklabels

Conversation

@aestoltm
Copy link
Copy Markdown
Contributor

@aestoltm aestoltm commented Feb 27, 2025

Description

Compute the placement and format of ticklabels using tickvals and ticktext. This gives us full control of which tick labels are rendered and their values. This is necessary to have the first and last label of the data always showing, along with not having any labels outside of the selected time range. These changes result in not needing to remove any extra tick labels because we dictate what is rendered.

Motivation and Context

Avoid any confusion about data existing outside the selected time range.

Tests performed

Tested on my port.

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 bug Bugfixes Category:Metric Explorer Metric Explorer / Usage labels Feb 27, 2025
@aestoltm aestoltm added this to the 11.0.1 milestone Feb 27, 2025
@aestoltm aestoltm changed the title Refactor date ticklabels Refactor timeseries ticklabels Mar 6, 2025
(isset($meChart['layout']['xaxis']['ticktext']) || isset($meChart['layout']['yaxis']['ticktext']))
&& $chartSortedByValue
&& $usageGroupBy !== 'none'
&& !$meRequestIsTimeseries
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Need this so that we do not rank our timeseries ticklabels. Was not a concern before because we did not make use of ticktext and tickvals for timeseries charts.

@aestoltm aestoltm merged commit 1780d2f into ubccr:xdmod11.0 Mar 6, 2025
4 checks passed
@aestoltm aestoltm deleted the refactor_date_ticklabels branch March 6, 2025 22:23
aaronweeden pushed a commit to aaronweeden/xdmod that referenced this pull request Mar 7, 2025
* Render timeseries tick labels based on a computed `dtick`. Tick labels will only render for the data points specified in `tickvals`
aaronweeden added a commit that referenced this pull request Mar 7, 2025
Co-authored-by: Andrew Stoltman <60742416+aestoltm@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Bugfixes Category:Metric Explorer Metric Explorer / Usage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants