The MindFusion Forums
Gauge and Chart Components >> Html Canvas & JavaScript >> Event Listener for bar chart
https://mindfusion.eu/Forum/YaBB.pl?num=1520314476

Message started by Nilesh Jagtap on Mar 6th, 2018 at 5:34am

Title: Event Listener for bar chart
Post by Nilesh Jagtap on Mar 6th, 2018 at 5:34am
Hi Team,

We are evaluating different javascript chart options for one of the charting requirement in our product. But going through the JS chart for Bar Chart, I did not find any clear documentation for click events.

Could you please post a link to document or a sample example where we can click on bar items to drill down further into data.

Thanks,
Nilesh

Title: Re: Event Listener for bar chart
Post by Lyubo on Mar 6th, 2018 at 10:00am
Hello,

The Dashboard control and the various inheriting chart classes expose the DataItemClicked event, which is raised, when a chart data element is clicked by the user. To subscribe to the event, pass a handler function like this:


Code (javascript):
barChart.dataItemClicked.addEventListener(function (args) {
    // do something in response to the event.
});


We will provide you with an example showing a possible way to drill down into data shortly.

Regards,
Lyubo

Title: Re: Event Listener for bar chart
Post by Lyubo on Mar 6th, 2018 at 12:36pm
Hi,

The following sample shows one way to implement drilling down to a more detailed view of the data and then back to the summary:
https://mindfusion.eu/_samples/DrillDown.zip.

Regards,
Lyubo

Title: Re: Event Listener for bar chart
Post by Nilesh Jagtap on Mar 12th, 2018 at 4:22am
Thank you for quick response.

Cheers!

The MindFusion Forums » Powered by YaBB 2.6.11!
YaBB Forum Software © 2000-2024. All Rights Reserved.