This is a migrated thread and some comments may be shown as answers.

How can you determine which chart legend items are enabled?

3 Answers 182 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Larry
Top achievements
Rank 1
Larry asked on 28 Oct 2013, 02:32 PM
I am using a bar chart with stacked series in version v2013.2.726. The user can click on items in the legend to disable or enable them. I would like to determine which items are enabled.

I tried using the following property: kendoChart._sourceSeries[i].visible. But it does not seem to accurately reflect the enabled state of the legend item when in the click event handler.

Is there any way to do this?

3 Answers, 1 is accepted

Sort by
0
Larry
Top achievements
Rank 1
answered on 29 Oct 2013, 03:14 PM
So I found that using the property kendoChart.options.series[i].visible does accurately track the state of the legend items.

Is this property considered part of the public API?
0
Accepted
Iliana Dyankova
Telerik team
answered on 30 Oct 2013, 11:17 AM
Hello Larry,

Checking series visibility via the chart options is OK and is suitable for this scenario. 

Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Larry
Top achievements
Rank 1
answered on 30 Oct 2013, 01:12 PM
Thanks. That's good to hear.
Tags
Charts
Asked by
Larry
Top achievements
Rank 1
Answers by
Larry
Top achievements
Rank 1
Iliana Dyankova
Telerik team
Share this question
or