Change total mahasiswa

This commit is contained in:
Randa Firman Putra
2025-06-24 00:50:02 +07:00
parent fadca46dc1
commit eb7c884c41
19 changed files with 569 additions and 138 deletions

View File

@@ -227,11 +227,19 @@ export default function AsalDaerahPerAngkatanChart({ tahunAngkatan }: Props) {
name: 'Jumlah Mahasiswa',
data: jumlah
}]);
// Calculate the maximum value from data
const maxValue = Math.max(...jumlah);
// Add 10% padding to the maximum value
const xAxisMax = Math.ceil(maxValue * 1.1);
setOptions(prev => ({
...prev,
xaxis: {
...prev.xaxis,
categories: kabupaten,
max: xAxisMax
},
chart: {
...prev.chart,