initial commit
This commit is contained in:
72
app/detail/asal-daerah/page.tsx
Normal file
72
app/detail/asal-daerah/page.tsx
Normal file
@@ -0,0 +1,72 @@
|
||||
'use client';
|
||||
|
||||
import { useState } from "react";
|
||||
import AsalDaerahChart from "@/components/charts/AsalDaerahChart";
|
||||
import AsalDaerahPerAngkatanChart from "@/components/charts/AsalDaerahPerAngkatanChart";
|
||||
import FilterTahunAngkatan from "@/components/FilterTahunAngkatan";
|
||||
|
||||
export default function AsalDaerahDetailPage() {
|
||||
const [selectedYear, setSelectedYear] = useState<string>("all");
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-gray-50 dark:bg-[var(--background)] p-4">
|
||||
<div className="container mx-auto max-w-7xl space-y-2">
|
||||
{/* Filter Section */}
|
||||
<FilterTahunAngkatan
|
||||
selectedYear={selectedYear}
|
||||
onYearChange={setSelectedYear}
|
||||
/>
|
||||
|
||||
{/* Chart Section - Enhanced Size */}
|
||||
<div className="grid grid-cols-1 lg:grid-cols-1 gap-6">
|
||||
{/* Chart untuk semua data atau dual chart ketika tahun tertentu dipilih */}
|
||||
{selectedYear === "all" ? (
|
||||
<div className="lg:col-span-2">
|
||||
<AsalDaerahChart
|
||||
height="h-[600px] sm:h-[600px] lg:h-[600px]"
|
||||
showDetailButton={false}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
<AsalDaerahPerAngkatanChart
|
||||
tahunAngkatan={selectedYear}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Information Section */}
|
||||
<div className="bg-white dark:bg-slate-900 rounded-lg shadow-sm p-6">
|
||||
<h2 className="text-xl font-semibold text-gray-900 dark:text-white mb-4">
|
||||
Informasi Visualisasi
|
||||
</h2>
|
||||
<div className="grid md:grid-cols-2 gap-6">
|
||||
<div>
|
||||
<h3 className="font-medium text-gray-900 dark:text-white mb-2">
|
||||
Grafik Utama (Asal Daerah)
|
||||
</h3>
|
||||
<ul className="text-sm text-gray-600 dark:text-gray-300 space-y-1">
|
||||
<li>• Menampilkan distribusi mahasiswa berdasarkan asal kabupaten/kota</li>
|
||||
<li>• Data geografis menunjukkan sebaran mahasiswa dari berbagai daerah</li>
|
||||
<li>• Grafik horizontal bar chart untuk kemudahan membaca nama daerah</li>
|
||||
</ul>
|
||||
</div>
|
||||
{selectedYear !== "all" && (
|
||||
<div>
|
||||
<h3 className="font-medium text-gray-900 dark:text-white mb-2">
|
||||
Grafik Per Angkatan ({selectedYear})
|
||||
</h3>
|
||||
<ul className="text-sm text-gray-600 dark:text-gray-300 space-y-1">
|
||||
<li>• Menampilkan distribusi asal daerah untuk angkatan {selectedYear}</li>
|
||||
<li>• Data spesifik untuk tahun angkatan yang dipilih</li>
|
||||
<li>• Insight detail sebaran geografis per angkatan</li>
|
||||
</ul>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user