Change Bug Charts

This commit is contained in:
Randa Firman Putra
2025-06-24 04:23:19 +07:00
parent 25812386cb
commit 39f16d6a5e
14 changed files with 45 additions and 293 deletions

View File

@@ -105,7 +105,9 @@ export default function StatistikMahasiswaChart() {
fontSize: '12px',
colors: '#000'
}
}
},
min:0,
tickAmount: 5
}
],
fill: {
@@ -243,15 +245,6 @@ export default function StatistikMahasiswaChart() {
// Update categories when data changes
useEffect(() => {
if (statistikData.length > 0) {
// Calculate the maximum value from all series
const maxValue = Math.max(
...statistikData.map(item => item.total_mahasiswa),
...statistikData.map(item => item.pria),
...statistikData.map(item => item.wanita)
);
// Add 50% padding to the maximum value
const yAxisMax = Math.ceil(maxValue * 1.2);
setChartOptions(prev => ({
...prev,
@@ -262,7 +255,6 @@ export default function StatistikMahasiswaChart() {
yaxis: [
{
...prev.yaxis[0],
max: yAxisMax
}
]
}));