diff --git a/app/dashboard/page.tsx b/app/dashboard/page.tsx
index d61ad6c..7f26a98 100644
--- a/app/dashboard/page.tsx
+++ b/app/dashboard/page.tsx
@@ -104,7 +104,7 @@ export default function TotalMahasiswaPage() {
{/* Demographics Section */}
-
diff --git a/app/page.tsx b/app/page.tsx
index 971842b..fce41e8 100644
--- a/app/page.tsx
+++ b/app/page.tsx
@@ -203,7 +203,7 @@ export default function DashboardPage() {
-
diff --git a/components/charts/AsalDaerahChart.tsx b/components/charts/AsalDaerahChart.tsx
index 464d280..613e941 100644
--- a/components/charts/AsalDaerahChart.tsx
+++ b/components/charts/AsalDaerahChart.tsx
@@ -253,6 +253,15 @@ 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 dynamicHeight = Math.max(minHeight, (data.length * barHeight) + padding);
+ return `${dynamicHeight}px`;
+ };
+
return (
@@ -261,7 +270,10 @@ export default function AsalDaerahChart() {
-
+
{
+ const minHeight = 200;
+ const barHeight = 25; // Height per bar in pixels
+ const padding = 100; // Extra space for title, legend, etc.
+ const dynamicHeight = Math.max(minHeight, (data.length * barHeight) + padding);
+ return `${dynamicHeight}px`;
+ };
+
return (
@@ -307,7 +316,10 @@ export default function AsalDaerahPerAngkatanChart({ tahunAngkatan }: Props) {
-