This commit is contained in:
2024-10-30 16:51:49 +05:30
parent f4870a688e
commit ca9e675369

View File

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