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

Stacked Column with dynamic show/hide Line charts on same chart

3 Answers 189 Views
Charts
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 17 Feb 2015, 06:27 PM
I'm working on a chart where I need a stacked column, an optionally, two line charts that I can show/hide on demand via some checkboxes. Here is my work in progress on jsFiddle: 

jsFiddle Chart

There are several "features" I'll be adding to this jsFiddle (tooltips, series click, data driven title, etc), but the purpose of this post is to ask the following:

1. I've told the "Transaction Count" and "Average" line charts to be visible: false - why are they showing up?
2. Why do I have more than 3 series listed on the right in the legend? I only want the legend for the stacked column chart. I assume they are for the 2 line charts. How can I have the lines colors match up with the column colors and have no more than 3 legends on the right? So, only one "Series One" legend (blue) and if we show the line chart(s), their color will also be blue.

Thanks,
--John

3 Answers, 1 is accepted

Sort by
0
Accepted
Iliana Dyankova
Telerik team
answered on 19 Feb 2015, 09:03 AM
Hi John,

Up to the questions
1. This issue is due to the outdated Kendo UI version which is used in the jsFiddle - series.visible option is not supported in v2012.1.322. However I updated the example to the latest official release and everything is working as expected; 
2. In order to display only the column series names in the legend you should set visibleInLegend: false to the line series (updated example).

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
John
Top achievements
Rank 1
answered on 19 Feb 2015, 03:46 PM
Thank You Iliana,
One more question related to the Legend. You see how the order of the legend is "Series One", "Series Three", "Series Two". How can I control the order to be the same as it appears in the data? The order of the data shows the series in order "One", "Two", "Three" and that's how I would like the legend to appear from top to bottom.
Thanks,
--John
0
Iliana Dyankova
Telerik team
answered on 20 Feb 2015, 09:36 AM

Hi John,

Currently Kendo UI Chart doesn't provide control over the ordering of the legend items, however we are working on this feature and will do our best to provide it as soon as possible.

Regards,

Iliana Nikolova
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Charts
Asked by
John
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
John
Top achievements
Rank 1
Share this question
or