kesekian kalinya

This commit is contained in:
Randa Firman Putra
2025-09-07 03:43:41 +07:00
parent bf248459f8
commit eaaf9f6436
3 changed files with 15 additions and 7 deletions

View File

@@ -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