From ca9e675369b615ae0d6b934c043c8ea43192184e Mon Sep 17 00:00:00 2001 From: "Siddhesh.More" Date: Wed, 30 Oct 2024 16:51:49 +0530 Subject: [PATCH] updtae --- src/components/Doughnut/LineChart.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/Doughnut/LineChart.jsx b/src/components/Doughnut/LineChart.jsx index 3c5caa5..1299ba1 100644 --- a/src/components/Doughnut/LineChart.jsx +++ b/src/components/Doughnut/LineChart.jsx @@ -99,7 +99,12 @@ const LineChart = () => { }, ], }; + // Calculate maximum value with a 10% buffer and round it up to the nearest whole number + // console.log(dataset); + // const maxYValue = Math.round(Math.max(...dataset) * 1.1); + + // const maxYValue = Math?.ceil(Math?.max(...dataset) * 1.1); const options = { responsive: true, @@ -172,6 +177,7 @@ const LineChart = () => { }, scales: { y: { + // max: maxYValue, // Dynamically set max value beginAtZero: true, ticks: { callback: (value) => value / 1000 + "k",