Skip to content

Improve CI/CD lead time analytics rendering of small values

Alex Pennells requested to merge 366483-improve-small-value-rendering into master

What does this MR do and why?

Improves the Y-axis labelling for values smaller than 0.1 days by switching to human readable units in all cases. This will maintain the existing granularity when > 1 day, but will now also render meaningful values when < 1 day.

Screenshots or screen recordings

Before After
Screenshot_2024-05-01_at_10.56.24_PM Screenshot_2024-05-06_at_11.18.21_AM
Screenshot_2024-05-01_at_10.57.07_PM Screenshot_2024-05-06_at_11.17.17_AM

How to set up and validate locally

  • Navigate to the group CI/CD analytics page
http://gdk.test:3000/groups/flightjs/-/analytics/ci_cd?tab=lead-time
  • Chart data can be mocked by adding some code after this line
        const seriesData = apiDataToChartSeries(apiData, startDate, endDate, CHART_TITLE, null);
        let multi = 1;
        seriesData[0].data = seriesData[0].data.map(([date]) => [
          date,
          Math.floor(Math.random() * 60 * multi++),
        ]);

Related to #366483 (closed)

Edited by Alex Pennells

Merge request reports