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

populating Pie series label with more data in

1 Answer 61 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Nilesh
Top achievements
Rank 1
Nilesh asked on 10 Feb 2015, 08:33 PM
Good afternoon,

I am trying to populate the Label with more than two values from which comes Database and one value is string and one is float. I want to convert  float value  to percentage.  I tried something like this. But it is displaying dataCol1 only, also I want format dataCol2 to  percentage. How I can I achieve this.

Chart,LabelsAppearance.ClientTemplate = "#=dataItem.dataCol1#" + "<br/>" + "#=dataItem.dataCol2#"



Thanks

1 Answer, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 12 Feb 2015, 12:29 PM
Hello Nilesh,

You must ensure there are dataCol1 and dataCol2 data source field names. Note that the field names are case sensitive. Also the string concatenation is not necessary here.

Regarding formatting values in templates you can use the kendo.format() method. See an example in the Formatting Numbers help article.

Regards,
Danail Vasilev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Chart (HTML5)
Asked by
Nilesh
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Share this question
or