Funnel Chart with onLegendItemClick - how to handle series point visibility?

1 Answer 32 Views
Charts
chris
Top achievements
Rank 1
chris asked on 30 May 2024, 09:59 AM | edited on 30 May 2024, 10:00 AM

I'm using the funnel chart type and need to allow users to click on the legend to show / hide data points within the chart.  This works fine if I do not handle the onLegendItemClick event as the chart takes care of this functionality itself.

The issue is I need to pass which of the data points are visible to a related chart.  When I handle the event the built in functionality is lost, does anyone know how I can replicate this in code so I can pass the selections to another component?

 

TIA

1 Answer, 1 is accepted

Sort by
0
Filip
Telerik team
answered on 03 Jun 2024, 08:47 AM

Hi, chris,

When handling the `onLegendItemClick` event the show and hide toggling functionality has to be handled manually, here is an example of how it can be done:

https://stackblitz.com/edit/react-ejnsan-2rnjug?file=app%2Fmain.tsx

Please give this approach a try and in case this is not what you are looking for can you modify the StackBlitz example with your scenario?

Regards,
Filip
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources!

Tags
Charts
Asked by
chris
Top achievements
Rank 1
Answers by
Filip
Telerik team
Share this question
or