Test Background

This commit is contained in:
Randa Firman Putra
2025-07-15 15:40:24 +07:00
parent f9637c77af
commit ef630ef0d5

View File

@@ -21,7 +21,7 @@ interface Props {
} }
export default function StatusMahasiswaFilterChart({ selectedYear, selectedStatus }: Props) { export default function StatusMahasiswaFilterChart({ selectedYear, selectedStatus }: Props) {
const { theme } = useTheme(); const { theme, systemTheme } = useTheme();
const [data, setData] = useState<StatusMahasiswaData[]>([]); const [data, setData] = useState<StatusMahasiswaData[]>([]);
const [loading, setLoading] = useState(true); const [loading, setLoading] = useState(true);
const [error, setError] = useState<string | null>(null); const [error, setError] = useState<string | null>(null);
@@ -76,7 +76,7 @@ export default function StatusMahasiswaFilterChart({ selectedYear, selectedStatu
toolbar: { toolbar: {
show: true, show: true,
}, },
background: theme === 'dark' ? '#0F172B' : '#fff', background: theme === 'dark' || systemTheme === 'dark' ? '#0F172B' : '#fff',
}, },
plotOptions: { plotOptions: {
bar: { bar: {
@@ -91,7 +91,7 @@ export default function StatusMahasiswaFilterChart({ selectedYear, selectedStatu
}, },
style: { style: {
fontSize: '12px', fontSize: '12px',
colors: [theme === 'dark' ? '#fff' : '#000'] colors: [theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000']
} }
}, },
stroke: { stroke: {
@@ -106,13 +106,13 @@ export default function StatusMahasiswaFilterChart({ selectedYear, selectedStatu
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'
} }
} }
}, },
@@ -122,13 +122,13 @@ export default function StatusMahasiswaFilterChart({ selectedYear, selectedStatu
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,
@@ -147,12 +147,12 @@ export default function StatusMahasiswaFilterChart({ selectedYear, selectedStatu
horizontal: 10, horizontal: 10,
}, },
labels: { labels: {
colors: theme === 'dark' ? '#fff' : '#000' colors: theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000'
} }
}, },
colors: ['#3B82F6', '#EC4899'], colors: ['#3B82F6', '#EC4899'],
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";