From 29c2181acb9ad0a11ee6b80f1179ff331fd244a8 Mon Sep 17 00:00:00 2001 From: Ichsan Kurniawan Date: Wed, 22 Apr 2026 15:50:14 +0700 Subject: [PATCH] fixing bug --- app/(dashboard)/components/PieChart.tsx | 2 +- .../user/component/EmployeePerformance/DonutChart.tsx | 2 +- app/performance/[id]/components/DonutChart.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/(dashboard)/components/PieChart.tsx b/app/(dashboard)/components/PieChart.tsx index eb65b5d..f25722c 100644 --- a/app/(dashboard)/components/PieChart.tsx +++ b/app/(dashboard)/components/PieChart.tsx @@ -32,7 +32,7 @@ const PieChart: FC = ({ data }) => { // height: windowWidth > 800 ? 1000 : 400, events: { click(e, chart, options) { - const { selectedDataPoints, labels } = options.globals + const { selectedDataPoints, labels } = options?.globals if (selectedDataPoints.length > 0) { const workingStatus = labels[selectedDataPoints[0]] setSelectedWorkingStatus(workingStatus?.toUpperCase()) diff --git a/app/admin/administration/user/component/EmployeePerformance/DonutChart.tsx b/app/admin/administration/user/component/EmployeePerformance/DonutChart.tsx index 0659231..756ca1d 100644 --- a/app/admin/administration/user/component/EmployeePerformance/DonutChart.tsx +++ b/app/admin/administration/user/component/EmployeePerformance/DonutChart.tsx @@ -21,7 +21,7 @@ const DonutChart: FC = ({ data, labels, colors }) => { events: { click(e, chart, options) { // const { seriesIndex, dataPointIndex } = options - const { selectedDataPoints } = options.globals + const { selectedDataPoints } = options?.globals // console.log(selectedDataPoints) if (selectedDataPoints.length > 0) { } diff --git a/app/performance/[id]/components/DonutChart.tsx b/app/performance/[id]/components/DonutChart.tsx index 055352c..226f6f6 100644 --- a/app/performance/[id]/components/DonutChart.tsx +++ b/app/performance/[id]/components/DonutChart.tsx @@ -27,7 +27,7 @@ const DonutChart: FC = ({ data, labels, colors }) => { events: { click(e, chart, options) { // const { seriesIndex, dataPointIndex } = options - const { selectedDataPoints } = options.globals + const { selectedDataPoints } = options?.globals // console.log(selectedDataPoints) if (selectedDataPoints.length > 0) { }