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",