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

4 posts, 1 answers
  1. John
    John avatar
    23 posts
    Member since:
    Jan 2015

    Posted 17 Feb 2015 Link to this post

    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
  2. Answer
    Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 19 Feb 2015 Link to this post

    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!
     
  3. John
    John avatar
    23 posts
    Member since:
    Jan 2015

    Posted 19 Feb 2015 in reply to Iliana Nikolova Link to this post

    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
  4. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 20 Feb 2015 Link to this post

    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!
     
Back to Top