mirror of
https://github.com/ichsankurnia/hats-app.git
synced 2026-12-05 10:56:28 +00:00
fixing bug
This commit is contained in:
@@ -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) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user