pointRegionClick doesn't fire for type stackingSplineArea

I can't get the "pointRegionClick" event to fire for type chart type "stackingSplineArea".
Is there another method of obtaining the clicked point on a stacked chart?

3 Replies

DD Dharanidharan Dharmasivam Syncfusion Team December 11, 2017 08:20 AM UTC

Hi Pete, 

Thanks for using our products. 

We have analyzed your query. We have tried to replicate the reported scenario, unfortunately the reported scenario is not replicated and the point region click event is working fine at our end. Sample used for testing can be find from below link. 


In the above sample, we have two series and with marker enabled. Also we have shown an alert box, using pointRegionClick event.  

Screenshot: 

 

Also we would like to let you know that, in case spline type series, the pointRegionClick event will be used triggered only on the exact point(to find the exact location we have enabled the marker and the event will be triggered only when clicked on marker). 

Since we are not aware on your exact scenario on which the reported issue is reproduced, kindly revert us with the following information, which will be helpful in further analysis and provide you the solution sooner. 

  • Try to reproduced the reported scenario with the attached sample.
  • Or provide your sample with replication steps.
  • Current version of Essential Studio you are using?
  • Browser with version details in which the reported scenario occurs.
  • Do you have any console errors, if so, kindly share the error details.

Thanks, 
Dharani. 



PR Pete Reeves December 15, 2017 12:20 PM UTC

Thanks for the reply, I realise now that you have to click on the points to trigger that event. 
We need a way of clicking anywhere on the chart and returning all the data at that point, or at least the x-axis index so I can look the data up elsewhere.
Is that possible?

Thanks.


DD Dharanidharan Dharmasivam Syncfusion Team December 18, 2017 12:15 PM UTC

Hi Pete, 

Thanks for the update. 

   We have analyzed your query. Your requirement can be achieved through a work around in chartClick event. In this event we can get the closest point with respect to the mouse location. Find the code snippet below to achieve this requirement. 

JS: 
 
        $("#container").ejChart({ 
              //... 
              chartMouseMove:"pointMove", 
      }); 
       
     function pointMove(args){ 
              var ser = [], series = args.model.series[parseInt(args.data.id.split("Series")[1])]; 
               if(series){ 
                      var nearPoint = getNearestPoint(ser,series,args.data.location.x, args.data.location.y ), 
                            element = document.getElementById("chartValue"); 
                             element.innerText = "X Value : " +nearPoint.point[0].x; 
              } 
} 


Screenshot: 
 

Sample for reference can be find from below link. 

Kindly revert us, if you have any concerns. 

Thanks, 
Dharani. 


Loader.
Up arrow icon