How to observe on tapping event for Area and Stacked Area charts?

Hi there,

Thanks for providing the super cool interactions for charts. I know how to play with `onPointTap` events now, but that seems not appropriate for Area charts. Basically, I have a stacked area chart, and I want to detect which series is the one that user taps.

Do we have a callback for that?

Thanks!


3 Replies

YG Yuvaraj Gajaraj Syncfusion Team March 7, 2022 03:51 PM UTC

Hi Opoiitis, 
 
Most welcome, using the onPointTap callback only we can fetch the tapped series information. In the area type series, the event will be triggered when tapped on the exact point i.e we have enabled marker in the below sample. Here the callback will be triggered while tapping in the marker, if you tap other than the marker region, the event will not trigger for area type series. So we request ot use the onPointTap callback for fetching the point information. 
 
  
Regards, 
Yuvaraj. 



OP Opoiitis March 13, 2022 06:50 PM UTC

Hi Yuvaraj,


Thanks for the kind response! I now understand how to use `onPointTap` to observe taps on markers and points. Moreover, I think it's intuitive for users to tap the areas. Can you take it as a Feature Request and provide an API like `onAreaTap` or `onSeriesTap`? Thanks!



YG Yuvaraj Gajaraj Syncfusion Team March 15, 2022 01:51 PM UTC

Hi Opoiitis, 
 
We regret for the inconvenience since we couldn't consider your scenario as a feature request. Since if we need to provide tapped event overall over the area series, we need to store the entire region, this will leads to performance hurdles. so could not consider this and no other possible workaround for your scenario. Since your requirement is to identify the series alone, we suggest to enable marker for the area series, kindly use onPointTap as suggested in our previous update. 
 
Regards, 
Yuvaraj. 


Loader.
Up arrow icon