ayo bisa
This commit is contained in:
@@ -50,7 +50,7 @@ export default function AsalDaerahChart({
|
||||
distributed: false,
|
||||
barHeight: '90%',
|
||||
dataLabels: {
|
||||
position: 'top',
|
||||
position: 'center',
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -60,10 +60,9 @@ export default function AsalDaerahChart({
|
||||
return val.toString();
|
||||
},
|
||||
style: {
|
||||
fontSize: '14px',
|
||||
fontSize: '12px',
|
||||
colors: [theme === 'dark' ? '#fff' : '#000']
|
||||
},
|
||||
offsetX: 10,
|
||||
},
|
||||
stroke: {
|
||||
show: true,
|
||||
@@ -268,7 +267,7 @@ export default function AsalDaerahChart({
|
||||
const calculateHeight = () => {
|
||||
const minHeight = 100;
|
||||
const barHeight = 15; // Tinggi per bar dalam piksel
|
||||
const padding = 50; // Ruang ekstra untuk judul, legenda, dll
|
||||
const padding = 100; // Ruang ekstra untuk judul, legenda, dll
|
||||
const dynamicHeight = Math.max(minHeight, (data.length * barHeight) + padding);
|
||||
return `${dynamicHeight}px`;
|
||||
};
|
||||
@@ -292,7 +291,7 @@ export default function AsalDaerahChart({
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div
|
||||
className={`${height} w-full max-w-xl mx-auto`}
|
||||
className={`${height} w-full`}
|
||||
style={{ height: calculateHeight() }}
|
||||
>
|
||||
<Chart
|
||||
|
||||
Reference in New Issue
Block a user