Skip to content

Commit bd05ab5

Browse files
authored
fix when component update (#5931)
The custom chart onDataPointClick did not function well in the editor and view more, This is now fixed
1 parent 56e21a6 commit bd05ab5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/client/src/components/designSystems/appsmith/ChartComponent.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,15 @@ class ChartComponent extends React.Component<ChartComponentProps> {
375375
renderAt: this.props.widgetId + "chart-container",
376376
width: "100%",
377377
height: "100%",
378+
events: {
379+
dataPlotClick: (evt: any) => {
380+
const data = evt.data;
381+
this.props.onDataPointClick({
382+
x: data.categoryLabel,
383+
y: data.dataValue,
384+
});
385+
},
386+
},
378387
...this.getCustomFusionChartDataSource(),
379388
};
380389
this.chartInstance = new FusionCharts(chartConfig);

0 commit comments

Comments
 (0)