This commit is contained in:
Randa Firman Putra
2025-07-15 21:41:39 +07:00
parent 01f773dfb0
commit efe371ce03
26 changed files with 300 additions and 302 deletions

View File

@@ -21,7 +21,7 @@ interface Props {
}
export default function AsalDaerahPrestasiChart({ selectedYear, selectedJenisPrestasi }: Props) {
const { theme, systemTheme } = useTheme();
const { theme } = useTheme();
const [mounted, setMounted] = useState(false);
const [data, setData] = useState<AsalDaerahPrestasiData[]>([]);
const [loading, setLoading] = useState(true);
@@ -79,7 +79,7 @@ export default function AsalDaerahPrestasiChart({ selectedYear, selectedJenisPre
reset: true
}
},
background: theme === 'dark' || systemTheme === 'dark' ? '#0F172B' : '#fff',
background: theme === 'dark' ? '#0F172B' : '#fff',
},
plotOptions: {
bar: {
@@ -99,14 +99,14 @@ export default function AsalDaerahPrestasiChart({ selectedYear, selectedJenisPre
},
style: {
fontSize: '14px',
colors: [theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000']
colors: [theme === 'dark' ? '#fff' : '#000']
},
offsetX: 10,
},
stroke: {
show: true,
width: 1,
colors: [theme === 'dark' || systemTheme === 'dark' ? '#374151' : '#E5E7EB'],
colors: [theme === 'dark' ? '#374151' : '#E5E7EB'],
},
xaxis: {
categories: [...new Set(data.map(item => item.kabupaten))].sort(),
@@ -115,13 +115,13 @@ export default function AsalDaerahPrestasiChart({ selectedYear, selectedJenisPre
style: {
fontSize: '14px',
fontWeight: 'bold',
color: theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000'
color: theme === 'dark' ? '#fff' : '#000'
}
},
labels: {
style: {
fontSize: '12px',
colors: theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000'
colors: theme === 'dark' ? '#fff' : '#000'
}
}
},
@@ -131,13 +131,13 @@ export default function AsalDaerahPrestasiChart({ selectedYear, selectedJenisPre
style: {
fontSize: '14px',
fontWeight: 'bold',
color: theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000'
color: theme === 'dark' ? '#fff' : '#000'
}
},
labels: {
style: {
fontSize: '14px',
colors: theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000'
colors: theme === 'dark' ? '#fff' : '#000'
},
maxWidth: 200,
},
@@ -155,7 +155,7 @@ export default function AsalDaerahPrestasiChart({ selectedYear, selectedJenisPre
},
colors: ['#3B82F6'],
tooltip: {
theme: theme === 'dark' || systemTheme === 'dark' ? 'dark' : 'light',
theme: theme === 'dark' ? 'dark' : 'light',
y: {
formatter: function (val: number) {
return val + " mahasiswa";