kesekian kalinya
This commit is contained in:
@@ -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