Ayo Commit
This commit is contained in:
@@ -12,8 +12,8 @@ export default function ClientLayout({ children }: ClientLayoutProps) {
|
||||
return (
|
||||
<ThemeProvider
|
||||
attribute="class"
|
||||
defaultTheme="system"
|
||||
enableSystem
|
||||
themes={["light", "dark"]}
|
||||
enableSystem={false}
|
||||
disableTransitionOnChange
|
||||
>
|
||||
<div className="min-h-screen">
|
||||
|
||||
@@ -16,7 +16,7 @@ interface MahasiswaStatistik {
|
||||
}
|
||||
|
||||
export default function StatistikMahasiswaChart() {
|
||||
const { theme, systemTheme } = useTheme();
|
||||
const { theme } = useTheme();
|
||||
const [statistikData, setStatistikData] = useState<MahasiswaStatistik[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
@@ -175,7 +175,7 @@ export default function StatistikMahasiswaChart() {
|
||||
|
||||
// Update theme when it changes
|
||||
useEffect(() => {
|
||||
const currentTheme = theme === 'system' ? systemTheme : theme;
|
||||
const currentTheme = theme;
|
||||
const textColor = currentTheme === 'dark' ? '#fff' : '#000';
|
||||
const tooltipTheme = currentTheme === 'dark' ? 'dark' : 'light';
|
||||
|
||||
@@ -240,7 +240,7 @@ export default function StatistikMahasiswaChart() {
|
||||
theme: tooltipTheme
|
||||
}
|
||||
}));
|
||||
}, [theme, systemTheme]);
|
||||
}, [theme]);
|
||||
|
||||
// Update categories when data changes
|
||||
useEffect(() => {
|
||||
|
||||
@@ -18,7 +18,7 @@ interface Props {
|
||||
}
|
||||
|
||||
export default function StatistikPerAngkatanChart({ tahunAngkatan }: Props) {
|
||||
const { theme, systemTheme } = useTheme();
|
||||
const { theme } = useTheme();
|
||||
const [statistikData, setStatistikData] = useState<GenderStatistik[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
@@ -121,7 +121,7 @@ export default function StatistikPerAngkatanChart({ tahunAngkatan }: Props) {
|
||||
|
||||
// Update theme when it changes
|
||||
useEffect(() => {
|
||||
const currentTheme = theme === 'system' ? systemTheme : theme;
|
||||
const currentTheme = theme;
|
||||
const textColor = currentTheme === 'dark' ? '#fff' : '#000';
|
||||
const tooltipTheme = currentTheme === 'dark' ? 'dark' : 'light';
|
||||
|
||||
@@ -150,7 +150,7 @@ export default function StatistikPerAngkatanChart({ tahunAngkatan }: Props) {
|
||||
theme: tooltipTheme
|
||||
}
|
||||
}));
|
||||
}, [theme, systemTheme]);
|
||||
}, [theme]);
|
||||
|
||||
// Update dataLabels formatter when data changes
|
||||
useEffect(() => {
|
||||
|
||||
@@ -16,7 +16,7 @@ interface StatusData {
|
||||
}
|
||||
|
||||
export default function StatusMahasiswaChart() {
|
||||
const { theme, systemTheme } = useTheme();
|
||||
const { theme } = useTheme();
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const [data, setData] = useState<StatusData[]>([]);
|
||||
@@ -29,7 +29,7 @@ export default function StatusMahasiswaChart() {
|
||||
toolbar: {
|
||||
show: true,
|
||||
},
|
||||
background: theme === 'dark' || systemTheme === 'dark' ? '#0F172B' : '#fff',
|
||||
background: theme === 'dark' ? '#0F172B' : '#fff',
|
||||
},
|
||||
plotOptions: {
|
||||
bar: {
|
||||
@@ -44,7 +44,7 @@ export default function StatusMahasiswaChart() {
|
||||
},
|
||||
style: {
|
||||
fontSize: '12px',
|
||||
colors: [theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000']
|
||||
colors: [theme === 'dark' ? '#fff' : '#000']
|
||||
}
|
||||
},
|
||||
stroke: {
|
||||
@@ -59,13 +59,13 @@ export default function StatusMahasiswaChart() {
|
||||
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'
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -75,13 +75,13 @@ export default function StatusMahasiswaChart() {
|
||||
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'
|
||||
}
|
||||
},
|
||||
min:0,
|
||||
@@ -100,12 +100,12 @@ export default function StatusMahasiswaChart() {
|
||||
horizontal: 10,
|
||||
},
|
||||
labels: {
|
||||
colors: theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000'
|
||||
colors: theme === 'dark' ? '#fff' : '#000'
|
||||
}
|
||||
},
|
||||
colors: ['#008FFB', '#00E396', '#FEB019', '#EF4444'],
|
||||
tooltip: {
|
||||
theme: theme === 'dark' || systemTheme === 'dark' ? 'dark' : 'light',
|
||||
theme: theme === 'dark' ? 'dark' : 'light',
|
||||
y: {
|
||||
formatter: function (val: number) {
|
||||
return val + " mahasiswa";
|
||||
|
||||
@@ -21,7 +21,7 @@ interface Props {
|
||||
}
|
||||
|
||||
export default function StatusMahasiswaFilterChart({ selectedYear, selectedStatus }: Props) {
|
||||
const { theme, systemTheme } = useTheme();
|
||||
const { theme } = useTheme();
|
||||
const [data, setData] = useState<StatusMahasiswaData[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
@@ -76,7 +76,7 @@ export default function StatusMahasiswaFilterChart({ selectedYear, selectedStatu
|
||||
toolbar: {
|
||||
show: true,
|
||||
},
|
||||
background: theme === 'dark' || systemTheme === 'dark' ? '#0F172B' : '#fff',
|
||||
background: theme === 'dark' ? '#0F172B' : '#fff',
|
||||
},
|
||||
plotOptions: {
|
||||
bar: {
|
||||
@@ -91,7 +91,7 @@ export default function StatusMahasiswaFilterChart({ selectedYear, selectedStatu
|
||||
},
|
||||
style: {
|
||||
fontSize: '12px',
|
||||
colors: [theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000']
|
||||
colors: [theme === 'dark' ? '#fff' : '#000']
|
||||
}
|
||||
},
|
||||
stroke: {
|
||||
@@ -106,13 +106,13 @@ export default function StatusMahasiswaFilterChart({ selectedYear, selectedStatu
|
||||
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'
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -122,13 +122,13 @@ export default function StatusMahasiswaFilterChart({ selectedYear, selectedStatu
|
||||
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'
|
||||
}
|
||||
},
|
||||
min:0,
|
||||
@@ -147,12 +147,12 @@ export default function StatusMahasiswaFilterChart({ selectedYear, selectedStatu
|
||||
horizontal: 10,
|
||||
},
|
||||
labels: {
|
||||
colors: theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000'
|
||||
colors: theme === 'dark' ? '#fff' : '#000'
|
||||
}
|
||||
},
|
||||
colors: ['#3B82F6', '#EC4899'],
|
||||
tooltip: {
|
||||
theme: theme === 'dark' || systemTheme === 'dark' ? 'dark' : 'light',
|
||||
theme: theme === 'dark' ? 'dark' : 'light',
|
||||
y: {
|
||||
formatter: function (val: number) {
|
||||
return val + " mahasiswa";
|
||||
|
||||
@@ -21,7 +21,7 @@ interface Props {
|
||||
}
|
||||
|
||||
export default function StatusMahasiswaFilterPieChart({ selectedYear, selectedStatus }: Props) {
|
||||
const { theme, systemTheme } = useTheme();
|
||||
const { theme } = useTheme();
|
||||
const [data, setData] = useState<StatusMahasiswaData[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
@@ -67,7 +67,7 @@ export default function StatusMahasiswaFilterPieChart({ selectedYear, selectedSt
|
||||
reset: true
|
||||
}
|
||||
},
|
||||
background: theme === 'dark' || systemTheme === 'dark' ? '#0F172B' : '#fff',
|
||||
background: theme === 'dark' ? '#0F172B' : '#fff',
|
||||
},
|
||||
labels: ['Laki-laki', 'Perempuan'],
|
||||
colors: ['#3B82F6', '#EC4899'],
|
||||
@@ -82,7 +82,7 @@ export default function StatusMahasiswaFilterPieChart({ selectedYear, selectedSt
|
||||
horizontal: 10
|
||||
},
|
||||
labels: {
|
||||
colors: theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000',
|
||||
colors: theme === 'dark' ? '#fff' : '#000',
|
||||
}
|
||||
},
|
||||
dataLabels: {
|
||||
@@ -101,7 +101,7 @@ export default function StatusMahasiswaFilterPieChart({ selectedYear, selectedSt
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
theme: theme === 'dark' || systemTheme === 'dark' ? 'dark' : 'light',
|
||||
theme: theme === 'dark' ? 'dark' : 'light',
|
||||
y: {
|
||||
formatter: function (val: number) {
|
||||
return val + " mahasiswa"
|
||||
|
||||
@@ -20,7 +20,7 @@ interface Props {
|
||||
}
|
||||
|
||||
export default function TingkatPrestasiChart({ selectedJenisPrestasi }: Props) {
|
||||
const { theme, systemTheme } = useTheme();
|
||||
const { theme } = useTheme();
|
||||
const [data, setData] = useState<TingkatPrestasiData[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
@@ -94,7 +94,7 @@ export default function TingkatPrestasiChart({ selectedJenisPrestasi }: Props) {
|
||||
reset: true
|
||||
}
|
||||
},
|
||||
background: theme === 'dark' || systemTheme === 'dark' ? '#0F172B' : '#fff',
|
||||
background: theme === 'dark' ? '#0F172B' : '#fff',
|
||||
},
|
||||
plotOptions: {
|
||||
bar: {
|
||||
@@ -110,7 +110,7 @@ export default function TingkatPrestasiChart({ selectedJenisPrestasi }: Props) {
|
||||
},
|
||||
style: {
|
||||
fontSize: '12px',
|
||||
colors: [theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000']
|
||||
colors: [theme === 'dark' ? '#fff' : '#000']
|
||||
}
|
||||
},
|
||||
stroke: {
|
||||
@@ -125,22 +125,22 @@ export default function TingkatPrestasiChart({ 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: {
|
||||
@@ -149,18 +149,18 @@ export default function TingkatPrestasiChart({ 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,
|
||||
},
|
||||
@@ -169,7 +169,7 @@ export default function TingkatPrestasiChart({ selectedJenisPrestasi }: Props) {
|
||||
},
|
||||
colors: ['#3B82F6', '#10B981', '#F59E0B', '#EF4444', '#8B5CF6', '#EC4899', '#06B6D4'],
|
||||
tooltip: {
|
||||
theme: theme === 'dark' || systemTheme === 'dark' ? 'dark' : 'light',
|
||||
theme: theme === 'dark' ? 'dark' : 'light',
|
||||
y: {
|
||||
formatter: function (val: number) {
|
||||
return val + " mahasiswa";
|
||||
@@ -186,11 +186,11 @@ export default function TingkatPrestasiChart({ 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,
|
||||
|
||||
@@ -21,7 +21,7 @@ interface Props {
|
||||
}
|
||||
|
||||
export default function TingkatPrestasiPieChart({ selectedYear, selectedJenisPrestasi }: Props) {
|
||||
const { theme, systemTheme } = useTheme();
|
||||
const { theme } = useTheme();
|
||||
const [data, setData] = useState<TingkatPrestasiData[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
@@ -72,7 +72,7 @@ export default function TingkatPrestasiPieChart({ selectedYear, selectedJenisPre
|
||||
const chartOptions: ApexOptions = {
|
||||
chart: {
|
||||
type: 'pie',
|
||||
background: theme === 'dark' || systemTheme === 'dark' ? '#0F172B' : '#fff',
|
||||
background: theme === 'dark' ? '#0F172B' : '#fff',
|
||||
toolbar: {
|
||||
show: true,
|
||||
tools: {
|
||||
@@ -99,7 +99,7 @@ export default function TingkatPrestasiPieChart({ selectedYear, selectedJenisPre
|
||||
horizontal: 10
|
||||
},
|
||||
labels: {
|
||||
colors: theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000'
|
||||
colors: theme === 'dark' ? '#fff' : '#000'
|
||||
}
|
||||
},
|
||||
dataLabels: {
|
||||
@@ -118,7 +118,7 @@ export default function TingkatPrestasiPieChart({ selectedYear, selectedJenisPre
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
theme: theme === 'dark' || systemTheme === 'dark' ? 'dark' : 'light',
|
||||
theme: theme === 'dark' ? 'dark' : 'light',
|
||||
y: {
|
||||
formatter: function (val: number) {
|
||||
return val + " mahasiswa"
|
||||
|
||||
@@ -21,7 +21,7 @@ interface Props {
|
||||
}
|
||||
|
||||
export default function TotalBeasiswaChart({ selectedYear, selectedJenisBeasiswa }: Props) {
|
||||
const { theme, systemTheme } = useTheme();
|
||||
const { theme } = useTheme();
|
||||
const [data, setData] = useState<TotalBeasiswaData[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
@@ -107,7 +107,7 @@ export default function TotalBeasiswaChart({ selectedYear, selectedJenisBeasiswa
|
||||
reset: true
|
||||
}
|
||||
},
|
||||
background: theme === 'dark' || systemTheme === 'dark' ? '#0F172B' : '#fff',
|
||||
background: theme === 'dark' ? '#0F172B' : '#fff',
|
||||
},
|
||||
plotOptions: {
|
||||
bar: {
|
||||
@@ -123,7 +123,7 @@ export default function TotalBeasiswaChart({ selectedYear, selectedJenisBeasiswa
|
||||
},
|
||||
style: {
|
||||
fontSize: '12px',
|
||||
colors: [theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000']
|
||||
colors: [theme === 'dark' ? '#fff' : '#000']
|
||||
}
|
||||
},
|
||||
stroke: {
|
||||
@@ -138,22 +138,22 @@ export default function TotalBeasiswaChart({ selectedYear, selectedJenisBeasiswa
|
||||
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: {
|
||||
@@ -162,18 +162,18 @@ export default function TotalBeasiswaChart({ selectedYear, selectedJenisBeasiswa
|
||||
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,
|
||||
},
|
||||
@@ -182,7 +182,7 @@ export default function TotalBeasiswaChart({ selectedYear, selectedJenisBeasiswa
|
||||
},
|
||||
colors: ['#3B82F6', '#EC4899'],
|
||||
tooltip: {
|
||||
theme: theme === 'dark' || systemTheme === 'dark' ? 'dark' : 'light',
|
||||
theme: theme === 'dark' ? 'dark' : 'light',
|
||||
y: {
|
||||
formatter: function (val: number) {
|
||||
return val + " mahasiswa";
|
||||
@@ -199,11 +199,11 @@ export default function TotalBeasiswaChart({ selectedYear, selectedJenisBeasiswa
|
||||
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,
|
||||
|
||||
@@ -21,7 +21,7 @@ interface Props {
|
||||
}
|
||||
|
||||
export default function TotalBeasiswaPieChart({ selectedYear, selectedJenisBeasiswa }: Props) {
|
||||
const { theme, systemTheme } = useTheme();
|
||||
const { theme } = useTheme();
|
||||
const [data, setData] = useState<TotalBeasiswaData[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
@@ -55,7 +55,7 @@ export default function TotalBeasiswaPieChart({ selectedYear, selectedJenisBeasi
|
||||
const chartOptions: ApexOptions = {
|
||||
chart: {
|
||||
type: 'pie',
|
||||
background: theme === 'dark' || systemTheme === 'dark' ? '#0F172B' : '#fff',
|
||||
background: theme === 'dark' ? '#0F172B' : '#fff',
|
||||
toolbar: {
|
||||
show: true,
|
||||
tools: {
|
||||
@@ -85,7 +85,7 @@ export default function TotalBeasiswaPieChart({ selectedYear, selectedJenisBeasi
|
||||
return legendName;
|
||||
},
|
||||
labels: {
|
||||
colors: theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000'
|
||||
colors: theme === 'dark' ? '#fff' : '#000'
|
||||
}
|
||||
},
|
||||
dataLabels: {
|
||||
@@ -104,7 +104,7 @@ export default function TotalBeasiswaPieChart({ selectedYear, selectedJenisBeasi
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
theme: theme === 'dark' || systemTheme === 'dark' ? 'dark' : 'light',
|
||||
theme: theme === 'dark' ? 'dark' : 'light',
|
||||
y: {
|
||||
formatter: function (val: number) {
|
||||
return val + " mahasiswa"
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -21,7 +21,7 @@ interface Props {
|
||||
}
|
||||
|
||||
export default function TotalPrestasiPieChart({ selectedYear, 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);
|
||||
@@ -55,7 +55,7 @@ export default function TotalPrestasiPieChart({ selectedYear, selectedJenisPrest
|
||||
const chartOptions: ApexOptions = {
|
||||
chart: {
|
||||
type: 'pie',
|
||||
background: theme === 'dark' || systemTheme === 'dark' ? '#0F172B' : '#fff',
|
||||
background: theme === 'dark' ? '#0F172B' : '#fff',
|
||||
toolbar: {
|
||||
show: true,
|
||||
tools: {
|
||||
@@ -82,7 +82,7 @@ export default function TotalPrestasiPieChart({ selectedYear, selectedJenisPrest
|
||||
horizontal: 10
|
||||
},
|
||||
labels: {
|
||||
colors: theme === 'dark' || systemTheme === 'dark' ? '#fff' : '#000'
|
||||
colors: theme === 'dark' ? '#fff' : '#000'
|
||||
}
|
||||
},
|
||||
dataLabels: {
|
||||
@@ -101,7 +101,7 @@ export default function TotalPrestasiPieChart({ selectedYear, selectedJenisPrest
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
theme: theme === 'dark' || systemTheme === 'dark' ? 'dark' : 'light',
|
||||
theme: theme === 'dark' ? 'dark' : 'light',
|
||||
y: {
|
||||
formatter: function (val: number) {
|
||||
return val + " mahasiswa"
|
||||
|
||||
Reference in New Issue
Block a user