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

Pie chart labels getting cut off

2 Answers 963 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Thien
Top achievements
Rank 1
Thien asked on 29 Jun 2015, 06:53 PM

When the chart's width is constrained it does not scale to fit and the labels get cut off. I found this post but do not see any of these settings in the Html/Javascript version of the pie chart

http://www.telerik.com/forums/pie-chart-labels-are-being-cut-off

Changing the margins/paddings is not an ideal solution as we have dynamic data populating the pie charts so one setting that may work might not work for another dataset.

2 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 01 Jul 2015, 02:36 PM
Hi Thien,

By design, Kendo UI Pie Chart will not resize automatically to accommodate for the labels size. What I would suggest in order to avoid the labels cutting is to set series.padding dynamically (via the chart.options): 
// get reference to the chart widget
var chart = $("#chart").data("kendoChart");
// set series.padding via the chart options
chart.options.series[0].padding = 100
// redraw the chart
chart.redraw();

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
Jay
Top achievements
Rank 1
answered on 20 Apr 2016, 01:41 PM

the above snippet helped my simliar problem but I had to use

chart.refresh();

instead of

chart.redraw();

 

Tags
Charts
Asked by
Thien
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Jay
Top achievements
Rank 1
Share this question
or