Fix Status Color

This commit is contained in:
Randa Firman Putra
2025-07-15 16:07:41 +07:00
parent fb1ddecc37
commit 9a1bba565c

View File

@@ -29,7 +29,7 @@ export default function StatusMahasiswaChart() {
toolbar: { toolbar: {
show: true, show: true,
}, },
background: theme === 'dark' ? '#0F172B' : '#fff', background: theme === 'dark' || systemTheme === 'dark' ? '#0F172B' : '#fff',
}, },
plotOptions: { plotOptions: {
bar: { bar: {
@@ -44,7 +44,7 @@ export default function StatusMahasiswaChart() {
}, },
style: { style: {
fontSize: '12px', fontSize: '12px',
colors: [theme === 'dark' ? '#fff' : '#000'] colors: [theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000']
} }
}, },
stroke: { stroke: {
@@ -59,13 +59,13 @@ export default function StatusMahasiswaChart() {
style: { style: {
fontSize: '14px', fontSize: '14px',
fontWeight: 'bold', fontWeight: 'bold',
color: theme === 'dark' ? '#fff' : '#000' color: theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000'
} }
}, },
labels: { labels: {
style: { style: {
fontSize: '12px', fontSize: '12px',
colors: theme === 'dark' ? '#fff' : '#000' colors: theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000'
} }
} }
}, },
@@ -75,13 +75,13 @@ export default function StatusMahasiswaChart() {
style: { style: {
fontSize: '14px', fontSize: '14px',
fontWeight: 'bold', fontWeight: 'bold',
color: theme === 'dark' ? '#fff' : '#000' color: theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000'
} }
}, },
labels: { labels: {
style: { style: {
fontSize: '12px', fontSize: '12px',
colors: theme === 'dark' ? '#fff' : '#000' colors: theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000'
} }
}, },
min:0, min:0,
@@ -100,12 +100,12 @@ export default function StatusMahasiswaChart() {
horizontal: 10, horizontal: 10,
}, },
labels: { labels: {
colors: theme === 'dark' ? '#fff' : '#000' colors: theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000'
} }
}, },
colors: ['#008FFB', '#00E396', '#FEB019', '#EF4444'], colors: ['#008FFB', '#00E396', '#FEB019', '#EF4444'],
tooltip: { tooltip: {
theme: theme === 'dark' ? 'dark' : 'light', theme: theme === 'dark' || systemTheme === 'dark' ? 'dark' : 'light',
y: { y: {
formatter: function (val: number) { formatter: function (val: number) {
return val + " mahasiswa"; return val + " mahasiswa";
@@ -202,7 +202,7 @@ export default function StatusMahasiswaChart() {
</CardTitle> </CardTitle>
</CardHeader> </CardHeader>
<CardContent> <CardContent>
<div className="h-[300px] sm:h-[350px] md:h-[300px] w-full max-w-5xl mx-auto"> <div className="h-[300px] sm:h-[300px] md:h-[300px] w-full max-w-5xl mx-auto">
{typeof window !== 'undefined' && ( {typeof window !== 'undefined' && (
<Chart <Chart
options={chartOptions} options={chartOptions}