diff --git a/Client/src/Components/Charts/CustomGauge/index.jsx b/Client/src/Components/Charts/CustomGauge/index.jsx index 255b32067..64d2e5c73 100644 --- a/Client/src/Components/Charts/CustomGauge/index.jsx +++ b/Client/src/Components/Charts/CustomGauge/index.jsx @@ -54,8 +54,8 @@ const CustomGauge = ({ progress = 0, radius = 70, strokeWidth = 15, threshold = const fillColor = progressWithinRange > threshold - ? theme.palette.error.main - : theme.palette.primary.main; + ? theme.palette.error.lowContrast + : theme.palette.accent.main; return ( - */ - -function Gauge({ progressValue, width = DEFAULT_WIDTH }) { - const theme = useTheme(); - const myProgressValue = Math.max(MINIMUM_VALUE, Math.min(progressValue, MAXIMUM_VALUE)); - const chartColor = - progressValue > PROGRESS_THRESHOLD - ? theme.palette.primary.main - : theme.palette.error.main; - const chartData = [ - CHART_MAXIMUM_DATA, - { - value: myProgressValue, - fill: chartColor, - }, - ]; - - return ( - - - PROGRESS_THRESHOLD - ? theme.palette.primary.main - : theme.palette.error.main - } - background={{ fill: theme.palette.primary.lowContrast }} - label={{ - position: "center", - content: () => ( - - {`${myProgressValue}%`} - - ), - }} - /> - - - ); -} - -export { Gauge };