kesekian kalinya
This commit is contained in:
@@ -80,8 +80,12 @@ export default function TotalMahasiswaPage() {
|
||||
|
||||
{/* Demographics Section */}
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<AsalDaerahChart />
|
||||
<ProvinsiMahasiswaChart />
|
||||
<div className="col-span-1">
|
||||
<AsalDaerahChart />
|
||||
</div>
|
||||
<div className="col-span-1">
|
||||
<ProvinsiMahasiswaChart />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
|
||||
@@ -7,6 +7,7 @@ import { useTheme } from "next-themes";
|
||||
import StatistikMahasiswaChart from "@/components/charts/StatistikMahasiswaChart";
|
||||
import JenisPendaftaranChart from "@/components/charts/JenisPendaftaranChart";
|
||||
import AsalDaerahChart from "@/components/charts/AsalDaerahChart";
|
||||
import ProvinsiMahasiswaChart from "@/components/chartsDashboard/ProvinsiMahasiswaPieChart";
|
||||
|
||||
interface MahasiswaTotal {
|
||||
total_mahasiswa: number;
|
||||
@@ -203,9 +204,12 @@ export default function DashboardPage() {
|
||||
<div className="col-span-1">
|
||||
<JenisPendaftaranChart />
|
||||
</div>
|
||||
<div className="col-span-2">
|
||||
<div className="col-span-1">
|
||||
<AsalDaerahChart />
|
||||
</div>
|
||||
<div className="col-span-1">
|
||||
<ProvinsiMahasiswaChart />
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
|
||||
@@ -255,9 +255,9 @@ export default function AsalDaerahChart() {
|
||||
|
||||
// Calculate dynamic height based on number of kabupaten
|
||||
const calculateHeight = () => {
|
||||
const minHeight = 200;
|
||||
const barHeight = 25; // Height per bar in pixels
|
||||
const padding = 100; // Extra space for title, legend, etc.
|
||||
const minHeight = 100;
|
||||
const barHeight = 15; // Height per bar in pixels
|
||||
const padding = 50; // Extra space for title, legend, etc.
|
||||
const dynamicHeight = Math.max(minHeight, (data.length * barHeight) + padding);
|
||||
return `${dynamicHeight}px`;
|
||||
};
|
||||
@@ -271,7 +271,7 @@ export default function AsalDaerahChart() {
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div
|
||||
className="w-full max-w-5xl mx-auto"
|
||||
className="w-full max-w-xl mx-auto"
|
||||
style={{ height: calculateHeight() }}
|
||||
>
|
||||
<Chart
|
||||
|
||||
Reference in New Issue
Block a user