From 72dcf452e2c0ff0c77ddd39a292c2ed9cb4feba5 Mon Sep 17 00:00:00 2001 From: Randa Firman Putra Date: Tue, 24 Jun 2025 04:29:36 +0700 Subject: [PATCH] Fix Bug For Asal Daerah Charts --- components/AsalDaerahBeasiswaChart.tsx | 1 - components/AsalDaerahLulusChart.tsx | 1 - components/AsalDaerahPerAngkatanChart.tsx | 8 -------- components/AsalDaerahPrestasiChart.tsx | 1 - 4 files changed, 11 deletions(-) diff --git a/components/AsalDaerahBeasiswaChart.tsx b/components/AsalDaerahBeasiswaChart.tsx index 39a0657..d99a9e7 100644 --- a/components/AsalDaerahBeasiswaChart.tsx +++ b/components/AsalDaerahBeasiswaChart.tsx @@ -141,7 +141,6 @@ export default function AsalDaerahBeasiswaChart({ selectedYear, selectedJenisBea }, maxWidth: 200, }, - tickAmount: undefined, }, grid: { padding: { diff --git a/components/AsalDaerahLulusChart.tsx b/components/AsalDaerahLulusChart.tsx index 1585dac..0babd45 100644 --- a/components/AsalDaerahLulusChart.tsx +++ b/components/AsalDaerahLulusChart.tsx @@ -98,7 +98,6 @@ export default function AsalDaerahLulusChart({ selectedYear }: AsalDaerahLulusCh }, maxWidth: 200, }, - tickAmount: undefined, }, grid: { padding: { diff --git a/components/AsalDaerahPerAngkatanChart.tsx b/components/AsalDaerahPerAngkatanChart.tsx index a3e1533..c5e21d3 100644 --- a/components/AsalDaerahPerAngkatanChart.tsx +++ b/components/AsalDaerahPerAngkatanChart.tsx @@ -114,7 +114,6 @@ export default function AsalDaerahPerAngkatanChart({ tahunAngkatan }: Props) { }, maxWidth: 200, }, - tickAmount: undefined, }, grid: { padding: { @@ -228,18 +227,11 @@ export default function AsalDaerahPerAngkatanChart({ tahunAngkatan }: Props) { data: jumlah }]); - // Calculate the maximum value from data - const maxValue = Math.max(...jumlah); - - // Add 10% padding to the maximum value - const xAxisMax = Math.ceil(maxValue * 1.1); - setOptions(prev => ({ ...prev, xaxis: { ...prev.xaxis, categories: kabupaten, - max: xAxisMax }, chart: { ...prev.chart, diff --git a/components/AsalDaerahPrestasiChart.tsx b/components/AsalDaerahPrestasiChart.tsx index 0558acb..d5892b9 100644 --- a/components/AsalDaerahPrestasiChart.tsx +++ b/components/AsalDaerahPrestasiChart.tsx @@ -141,7 +141,6 @@ export default function AsalDaerahPrestasiChart({ selectedYear, selectedJenisPre }, maxWidth: 200, }, - tickAmount: undefined, }, grid: { padding: {