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

Donut chart animation not working when paasing only one record ?????

1 Answer 100 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Palak
Top achievements
Rank 1
Palak asked on 07 Jan 2014, 08:54 AM
I am using kendo ui Donut chart to display category and its
value on Donut chart.

When there is  5
category data in “Model.ChartDataList”
the Donut chart animation is working  fine.
But when it receive only 1 category data in “Model.ChartDataList” the Donut chart animation is not working.

Is there any way to slow the speed of animation of Donut
chart ?

How can I control the animation of Donut chart ?

 And why it is not animating when there is only 1 category data in “Model.ChartDataList”.

Class ChartData{

public string CategoryName {get;set;}
public int Value {get;set;}

}

Class donutViewModel{

public  List< ChartData> ChartDataList {get;set;}

}

 

  @(Html.Kendo().Chart(Model.ChartDataList)
      .Name("Chart")
      .Legend(legend => legend.Visible(false))
       .Title(title => title.Font("Bold 12px Calibri").Text("CHART"))
        
      .Tooltip(tooltip => tooltip
                          .Visible(true)
                          .Template("${category}-${value}%")
                          .Format("{0}%")
         
      )
            .Series(series =>
            {
                   series.Donut(m => m.Value,m => m.CategoryName);
            })
  )

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 08 Jan 2014, 04:34 PM
Hello Palak,

Animations are related to rendering multiple chart series - when there is only one series no animations are played. If you wish to have consistent behaviour regardless the categories number you could entirely stop the animations (documentation link):
@(Html.Kendo().Chart(Model)
  //....
  .Transitions(false)
)

Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Charts
Asked by
Palak
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or