Improve CI/CD lead time analytics rendering of small values
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 |
---|---|
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