Spline Area Series click action on chart


I have integrated spline area chat. when click on ping i got click action but when clicking on any when in chat so not getting any call back so it difficult to fine clickable are on chat.

 eg: if user click on area related to 29 of x-axis. it should change bottom data. currently only top point is only clickable.

Screenshot 2022-02-04 at 3.05.06 PM.png 


1 Reply

YG Yuvaraj Gajaraj Syncfusion Team February 7, 2022 03:47 PM UTC

Hi Nikunj, 
 
Greetings from Syncfusion. Using the onPointTap callback, this will trigger only while tapping only on the exact data point. If you wish to know other than that, you can use the onChartInteractionDown callback. This will return the pixel point where you have tapped, using the pixelToPoint public method you can fetch the point. We have provided the code snippet and UG links below for your reference. 
 
Code snippet: 
ChartSeriesController? seriesController; 
 
@override 
Widget build(BuildContext context) { 
  return Scaffold( 
      body: SfCartesianChart( 
        onChartTouchInteractionDown: (ChartTouchInteractionArgs args) { 
          CartesianChartPoint<dynamic> chartpoint = 
              // Here it will return the point value. 
              seriesController! 
                  .pixelToPoint(Offset(args.position.dx, args.position.dy)); 
        }, 
        series: <ChartSeries<SampleData, num>>[ 
          SplineAreaSeries( 
              onRendererCreated: (ChartSeriesController controller) { 
                seriesController = controller; 
              }, 
              // Other required properties 
          ), 
        ], 
      )); 
  } 
 
 
Hope this will help you to achieve your requirement. 
 
Regards, 
Yuvaraj. 


Loader.
Up arrow icon