We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Multi Level Doughnut onPointClick

Hi,

can anyone provide assistance on a multilevel doughnut chart 'onPointClick' event.   I need to get the exact cell I have clicked on.   using this 'sender.model.primaryXAxis.labels[sender.data.region.Region.PointIndex] ' I can get one part, but I cant seem to get both references to tell me the exact cell I have clicked on.

Any assistance on this would be greatly appreciated

TIA
Trevor

5 Replies

AT Anandaraj T Syncfusion Team December 16, 2016 06:21 AM UTC

Hi Trevor, 

 

Thanks for using Syncfusion products. 

 

Query #1: I need to get the exact cell I have clicked on 

 

We can achieve this requirement using the pointRegionClick event of chart widget. We have prepared a simple sample for this requirement in the following link 

 

http://jsplayground.syncfusion.com/5jtoqsey  

 

Please refer the following code snippet to achieve this 

 

[JS] 

 

            $("#container").ejChart( 
            { 
                //Other chart configurations                 
                pointRegionClick: 'onclick', 
             }); 
 
        function onclick(sender) { 
            //Index of the clicked point 
            var pointIndex = sender.data.region.Region.PointIndex, 
                 
                //Index of the series 
                seriesIndex = sender.data.region.Region.SeriesIndex, 
                 
                //Get point object using series index and point index 
                dataPoint = sender.model.series[seriesIndex].points[pointIndex]; 
             
             //alert is used for demonstration purpose 
             alert("X value : " + dataPoint.x 
                + " Y value : " + dataPoint.y 
                + " Text : " + dataPoint.text); 
           
              //Other operations after clicking chart 
        } 

 

Please let us know if you have any concern. 

 

Regards, 

Anand 


TR Trevor December 16, 2016 09:15 AM UTC

Perfect,

thanks for the help.

Regards
Trevor


DD Dharanidharan Dharmasivam Syncfusion Team December 19, 2016 04:51 AM UTC

Hi Trevor, 
 
Thanks for your update. 
Kindly revert us, if you need further assistance on this. 

Thanks, 
Dharani. 



PN Preethi Nesakkan Gnanadurai Syncfusion Team July 7, 2017 08:51 AM UTC

I'm sorry, but we were unable to automatically parse the data from this email.

Could you please ensure that you fill in the 'Current Promise Date' field in the table in YYYY-MM-DD format, and also add any comments you need to in the comments field in the table next to each line item you wish to update.

Best Regards
 



DD Dharanidharan Dharmasivam Syncfusion Team July 10, 2017 12:44 PM UTC

Hi Trevor, 
 
Thanks for your update, 
 
Since we are not clear with your query, kindly provide more information on your query. Also, we would like to know whether the addressed query is related to chart component, so that we can analyze and provide you the solution sooner. 

Thanks, 
Dharani. 



SIGN IN To post a reply.
Loader.
Live Chat Icon For mobile
Up arrow icon