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

@@ -188,6 +188,23 @@ export default function JenisPendaftaranStatusChart({ selectedYear, selectedStat
const series = processSeriesData();
console.log('Processed series data:', series);
// Calculate the maximum value from all series for y-axis padding
const maxValue = Math.max(
...series.flatMap(s => s.data)
);
// Add 20% padding to the maximum value
const yAxisMax = Math.ceil(maxValue * 1.2);
// Update chart options with y-axis max
const updatedChartOptions: ApexOptions = {
...chartOptions,
yaxis: {
...chartOptions.yaxis,
max: yAxisMax
}
};
if (loading) {
return (
<Card className="bg-white dark:bg-slate-900 shadow-lg">
@@ -236,7 +253,7 @@ export default function JenisPendaftaranStatusChart({ selectedYear, selectedStat
<div className="h-[350px] w-full max-w-5xl mx-auto">
{typeof window !== 'undefined' && (
<Chart
options={chartOptions}
options={updatedChartOptions}
series={series}
type="bar"
height="100%"