Ayo Commit

This commit is contained in:
Randa Firman Putra
2025-07-15 21:15:45 +07:00
parent 2f3ea8c9d4
commit 01f773dfb0
12 changed files with 82 additions and 82 deletions

View File

@@ -17,10 +17,10 @@ interface TotalPrestasiData {
interface Props {
selectedJenisPrestasi: string;
}
}
export default function TotalPrestasiChart({ selectedJenisPrestasi }: Props) {
const { theme, systemTheme } = useTheme();
const { theme } = useTheme();
const [data, setData] = useState<TotalPrestasiData[]>([]);
const [loading, setLoading] = useState(true);
const [error, setError] = useState<string | null>(null);
@@ -106,7 +106,7 @@ export default function TotalPrestasiChart({ selectedJenisPrestasi }: Props) {
reset: true
}
},
background: theme === 'dark' || systemTheme === 'dark' ? '#0F172B' : '#fff',
background: theme === 'dark' ? '#0F172B' : '#fff',
},
plotOptions: {
bar: {
@@ -122,7 +122,7 @@ export default function TotalPrestasiChart({ selectedJenisPrestasi }: Props) {
},
style: {
fontSize: '12px',
colors: [theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000']
colors: [theme === 'dark' ? '#fff' : '#000']
}
},
stroke: {
@@ -137,22 +137,22 @@ export default function TotalPrestasiChart({ selectedJenisPrestasi }: Props) {
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'
}
},
axisBorder: {
show: true,
color: theme === 'dark' || systemTheme === 'dark' ? '#374151' : '#E5E7EB'
color: theme === 'dark' ? '#374151' : '#E5E7EB'
},
axisTicks: {
show: true,
color: theme === 'dark' || systemTheme === 'dark' ? '#374151' : '#E5E7EB'
color: theme === 'dark' ? '#374151' : '#E5E7EB'
}
},
yaxis: {
@@ -161,18 +161,18 @@ export default function TotalPrestasiChart({ selectedJenisPrestasi }: Props) {
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'
}
},
axisBorder: {
show: true,
color: theme === 'dark' || systemTheme === 'dark' ? '#374151' : '#E5E7EB'
color: theme === 'dark' ? '#374151' : '#E5E7EB'
},
tickAmount: 5,
},
@@ -181,7 +181,7 @@ export default function TotalPrestasiChart({ selectedJenisPrestasi }: Props) {
},
colors: ['#3B82F6', '#EC4899'],
tooltip: {
theme: theme === 'dark' || systemTheme === 'dark' ? 'dark' : 'light',
theme: theme === 'dark' ? 'dark' : 'light',
y: {
formatter: function (val: number) {
return val + " mahasiswa";
@@ -198,11 +198,11 @@ export default function TotalPrestasiChart({ selectedJenisPrestasi }: Props) {
horizontal: 10,
},
labels: {
colors: theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000'
colors: theme === 'dark' ? '#fff' : '#000'
}
},
grid: {
borderColor: theme === 'dark' || systemTheme === 'dark' ? '#374151' : '#E5E7EB',
borderColor: theme === 'dark' ? '#374151' : '#E5E7EB',
strokeDashArray: 4,
padding: {
top: 20,