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

Arithmetic calculations in kendo format

1 Answer 79 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Gopinath
Top achievements
Rank 1
Gopinath asked on 12 Dec 2014, 08:07 PM
Hi Team,

I am displaying a pie chart in ASP.Net MVC.

.Series(series =>
        {
            series.Pie(new dynamic[] {
                new {category="Forms Created",value=Model.value1,color="#9de219"},
                new {category="Forms Allowed",value=Model.value2,color="#50dd48"}

            })
.Tooltip(tooltip => tooltip
            .Visible(true)
                    .Template("#= category # - #= kendo.format('{0}', value)#")
        )

Now the tool tip is displaying the value of corresponding category.

I would like to display value of (category 1 value - category 2 value) in my tool tip.


Could you advise is this is possible to format in kendo?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Hristo Germanov
Telerik team
answered on 16 Dec 2014, 04:19 PM
Hi Gopinath,

In the tooltip template you have access to the series.data and you can output all values that you want. You can pass the item index to the series and then you can access the indexes around the hovered item.

I hope this helps.

Regards,
Hristo Germanov
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
Asked by
Gopinath
Top achievements
Rank 1
Answers by
Hristo Germanov
Telerik team
Share this question
or