How to know the selected Dataset in ChartJs ?

0
0

Hello, there. I’ve created a Bar Chart with four Datasets (blue, yellow, red and green) and grouped them by month.

When I click on a Bar, how can I get that Bar parent Dataset? I mean, if the bar belongs to the Blue one, or the Yellow one, etc.

I tried whit the ChartClickEventArgs but it only returns the values and the index for the selected month(group) and nothing about the selected DataSet.

Thank you for your help.

  • You must to post comments
0
0

Hi Jennifer,

I’ve just enhanced the GitHub extension here: https://github.com/iceteagroup/wisej-extensions/tree/2.2/Wisej.Web.Ext.ChartJs. The ChartClickEventArgs now has the SelectedDataSet and SelectedValue properties to show information about a chart directly underneath a click.

Can you give it a try and let me know if it works for you?

Regards,

Levie

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.