ayo commit lagi

This commit is contained in:
Randa Firman Putra
2026-02-22 00:21:37 +07:00
parent 3797daa557
commit 211fd9c955
4 changed files with 49 additions and 49 deletions

View File

@@ -65,9 +65,18 @@ export default function StatusMahasiswaPieChartPerangkatan({ selectedYear }: Pro
fetchData();
}, [selectedYear]);
// Color mapping consistent with StatusMahasiswaChart bar chart
const STATUS_COLOR_MAP: { [key: string]: string } = {
'Aktif': '#008FFB',
'Lulus': '#00E396',
'Cuti': '#FEB019',
'Non Aktif': '#EF4444',
};
// Prepare data for pie chart
const series = data.map(item => item.jumlah);
const labels = data.map(item => item.status_kuliah);
const colors = data.map(item => STATUS_COLOR_MAP[item.status_kuliah] || '#775DD0');
const chartOptions: ApexOptions = {
chart: {
@@ -103,13 +112,7 @@ export default function StatusMahasiswaPieChartPerangkatan({ selectedYear }: Pro
colors: theme === 'dark' ? '#fff' : '#000'
}
},
colors: [
'#00E396', // Aktif - Green
'#008FFB', // Lulus - Blue
'#FEB019', // Cuti - Orange
'#FF4560', // Non-Aktif - Red
'#775DD0', // Lainnya - Purple
],
colors: colors,
tooltip: {
theme: theme === 'dark' ? 'dark' : 'light',
y: {