Change total mahasiswa
This commit is contained in:
@@ -212,11 +212,21 @@ export default function JenisPendaftaranChart() {
|
||||
}));
|
||||
|
||||
setSeries(seriesData);
|
||||
|
||||
// Calculate the maximum value from all series
|
||||
const maxValue = Math.max(
|
||||
...seriesData.flatMap(series => series.data)
|
||||
);
|
||||
|
||||
// Add 20% padding to the maximum value
|
||||
const xAxisMax = Math.ceil(maxValue * 1.1);
|
||||
|
||||
setOptions(prev => ({
|
||||
...prev,
|
||||
xaxis: {
|
||||
...prev.xaxis,
|
||||
categories: tahunAngkatan,
|
||||
max: xAxisMax
|
||||
},
|
||||
}));
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user