Series Label for only Second Series

4 posts, 0 answers
  1. Ed
    Ed avatar
    168 posts
    Member since:
    Sep 2013

    Posted 09 Mar 2015 Link to this post

    Using the Column chart with exactly two series ("previous billing cycle" and "current billing cycle"). The series are not stacked, but side-by-side, I only want to display the series label on top of the bar for the second series, which is always "current billing cycle". How can I achieve this?

    Second question: I want the series label to be a percent change between the first series and the second series. Should I do this calculation in the parse function?

    Thanks,
    --Ed
  2. Ed
    Ed avatar
    168 posts
    Member since:
    Sep 2013

    Posted 09 Mar 2015 in reply to Ed Link to this post

    Is there a way to create a template to look at the data item and see what the series name is (which I will know) and only output the value for that series name?
  3. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 11 Mar 2015 Link to this post

    Hi Ed,

    Straight to the questions
    - ...I only want to display the series label on top of the bar for the second series, which is always "current billing cycle"....
    For this requirement you should set labels.visible true only to the second series: 
    //....
    series: [{
       name: "previous billing cycle",
       //....
       }, {
       name: "current billing cycle",
       labels: {
          visible: true
       },
       //....
    },
    - I want the series label to be a percent change between the first series and the second series. Should I do this calculation in the parse function?
    Yes, in order to achieve this you should manually calculate the percent change. A similar basic example is available here.

    Is there a way to create a template to look at the data item and see what the series name is (which I will know) and only output the value for that series name?
    The fields which can be used in the series.labels.template for column chart are: 
    * category
    * dataItem
    * series
    * value

    Regards,
    Iliana Nikolova
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  4. Ed
    Ed avatar
    168 posts
    Member since:
    Sep 2013

    Posted 11 Mar 2015 in reply to Iliana Nikolova Link to this post

    Thanks Iliana,
    I've decided to go with notes instead. Works better for what I want to do.
    --Ed
Back to Top