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

Series Label for only Second Series

3 Answers 43 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 09 Mar 2015, 07:56 PM
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

3 Answers, 1 is accepted

Sort by
0
Ed
Top achievements
Rank 1
answered on 10 Mar 2015, 01:38 AM
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?
0
Iliana Dyankova
Telerik team
answered on 11 Mar 2015, 04:29 PM
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!
 
0
Ed
Top achievements
Rank 1
answered on 11 Mar 2015, 06:19 PM
Thanks Iliana,
I've decided to go with notes instead. Works better for what I want to do.
--Ed
Tags
Charts
Asked by
Ed
Top achievements
Rank 1
Answers by
Ed
Top achievements
Rank 1
Iliana Dyankova
Telerik team
Share this question
or