From 88dda1987fca0ec4769addafd7799ca27b8c22c7 Mon Sep 17 00:00:00 2001 From: Jaanus Sellin Date: Tue, 4 Jun 2024 10:18:20 +0300 Subject: [PATCH] feat: project health chart now goes from 0 to 100 to give perspective (#7249) ![image](https://github.com/Unleash/unleash/assets/964450/ab56de69-bed5-4b2c-8ff9-b1cc3db8dd4b) --- .../ProjectHealthChart/ProjectHealthChart.tsx | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/frontend/src/component/insights/componentsChart/ProjectHealthChart/ProjectHealthChart.tsx b/frontend/src/component/insights/componentsChart/ProjectHealthChart/ProjectHealthChart.tsx index 1543b3bf8c..e368d930b6 100644 --- a/frontend/src/component/insights/componentsChart/ProjectHealthChart/ProjectHealthChart.tsx +++ b/frontend/src/component/insights/componentsChart/ProjectHealthChart/ProjectHealthChart.tsx @@ -113,6 +113,41 @@ export const ProjectHealthChart: VFC = ({ ? {} : { parsing: { yAxisKey: 'health', xAxisKey: 'date' }, + scales: { + y: { + min: 0, + max: 100, + beginAtZero: true, + type: 'linear', + grid: { + color: theme.palette.divider, + borderColor: theme.palette.divider, + }, + ticks: { + color: theme.palette.text.secondary, + display: true, + precision: 0, + }, + }, + x: { + type: 'time', + time: { + unit: 'week', + tooltipFormat: 'PPP', + }, + grid: { + color: 'transparent', + borderColor: 'transparent', + }, + ticks: { + color: theme.palette.text.secondary, + display: true, + source: 'data', + maxRotation: 90, + minRotation: 23.5, + }, + }, + }, } } cover={notEnoughData ? : isLoading}