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) { }