Change Database
This commit is contained in:
@@ -94,14 +94,6 @@ export default function AsalDaerahChart() {
|
||||
},
|
||||
tickAmount: undefined,
|
||||
},
|
||||
grid: {
|
||||
padding: {
|
||||
top: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
left: 0
|
||||
}
|
||||
},
|
||||
fill: {
|
||||
opacity: 1,
|
||||
},
|
||||
|
||||
@@ -178,7 +178,6 @@ export default function AsalDaerahStatusChart({ selectedYear, selectedStatus }:
|
||||
};
|
||||
|
||||
const series = processSeriesData();
|
||||
console.log('Processed series data:', series);
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
|
||||
@@ -3,10 +3,6 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
|
||||
|
||||
interface TahunAngkatan {
|
||||
tahun_angkatan: number;
|
||||
}
|
||||
|
||||
interface Props {
|
||||
selectedYear: string;
|
||||
onYearChange: (year: string) => void;
|
||||
@@ -14,7 +10,7 @@ interface Props {
|
||||
}
|
||||
|
||||
export default function FilterTahunAngkatan({ selectedYear, onYearChange, showAllOption = true }: Props) {
|
||||
const [tahunAngkatan, setTahunAngkatan] = useState<TahunAngkatan[]>([]);
|
||||
const [tahunAngkatan, setTahunAngkatan] = useState<number[]>([]);
|
||||
|
||||
useEffect(() => {
|
||||
const fetchTahunAngkatan = async () => {
|
||||
@@ -45,10 +41,10 @@ export default function FilterTahunAngkatan({ selectedYear, onYearChange, showAl
|
||||
)}
|
||||
{tahunAngkatan.map((tahun) => (
|
||||
<SelectItem
|
||||
key={tahun.tahun_angkatan}
|
||||
value={tahun.tahun_angkatan.toString()}
|
||||
key={tahun}
|
||||
value={tahun.toString()}
|
||||
>
|
||||
{tahun.tahun_angkatan}
|
||||
{tahun}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
|
||||
@@ -153,7 +153,7 @@ export default function JenisPendaftaranPerAngkatanChart({ tahunAngkatan }: Prop
|
||||
if (!Array.isArray(result)) {
|
||||
throw new Error('Invalid data format received from server');
|
||||
}
|
||||
|
||||
|
||||
// Process data for pie chart
|
||||
const jenisPendaftaran = [...new Set(result.map(item => item.jenis_pendaftaran))].sort();
|
||||
const jumlahData = jenisPendaftaran.map(jenis => {
|
||||
|
||||
Reference in New Issue
Block a user