testing yuk

This commit is contained in:
Randa Firman Putra
2025-09-14 16:59:31 +07:00
parent 248fed0d0b
commit 60211ae829
63 changed files with 315 additions and 315 deletions

View File

@@ -6,7 +6,7 @@ import { ApexOptions } from 'apexcharts';
import { useTheme } from 'next-themes';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
// Dynamically import ApexCharts to avoid SSR issues
// Import ApexCharts secara dinamis untuk menghindari masalah SSR
const Chart = dynamic(() => import('react-apexcharts'), { ssr: false });
interface IPKLulusTepatData {
@@ -138,7 +138,7 @@ export default function IPKLulusTepatChart({ selectedYear }: IPKLulusTepatChartP
left: 0
}
},
colors: ['#3B82F6'], // Blue color for line
colors: ['#3B82F6'], // Warna biru untuk garis
tooltip: {
theme: theme === 'dark' ? 'dark' : 'light',
y: {
@@ -160,7 +160,7 @@ export default function IPKLulusTepatChart({ selectedYear }: IPKLulusTepatChartP
}
});
// Update theme when it changes
// Perbarui tema saat berubah
useEffect(() => {
const currentTheme = theme;
setOptions(prev => ({
@@ -248,7 +248,7 @@ export default function IPKLulusTepatChart({ selectedYear }: IPKLulusTepatChartP
const fetchedData: IPKLulusTepatData[] = await response.json();
setData(fetchedData);
// Process data for chart
// Proses data untuk chart
const tahunAngkatan = fetchedData.map(item => item.tahun_angkatan);
const rataRataIPK = fetchedData.map(item => item.rata_rata_ipk);
@@ -264,7 +264,7 @@ export default function IPKLulusTepatChart({ selectedYear }: IPKLulusTepatChartP
},
}));
} catch (error) {
setError(error instanceof Error ? error.message : 'An error occurred');
setError(error instanceof Error ? error.message : 'Terjadi kesalahan');
console.error('Error fetching data:', error);
} finally {
setLoading(false);