fixing bug

This commit is contained in:
Ichsan Kurniawan
2026-04-22 15:50:14 +07:00
parent dbc70a6671
commit 29c2181acb
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ const PieChart: FC<Props> = ({ 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())
@@ -21,7 +21,7 @@ const DonutChart: FC<Props> = ({ 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) {
}
@@ -27,7 +27,7 @@ const DonutChart: FC<Props> = ({ 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) {
}