I'm using v2015.1.331.40 and if the series I feed my pie chart has 0 for all values AND I have ShowSmartLables = true, then my code just hangs when it tries to render the chart.
private static void ThisChartHangs()
{
Telerik.WinControls.UI.RadChartView chart = null;
try
{
chart = new Telerik.WinControls.UI.RadChartView();
chart.AreaType = Telerik.WinControls.UI.ChartAreaType.Pie;
chart.Width = 360;
chart.Height = 360;
chart.ShowSmartLabels = true;
var series = new Telerik.WinControls.UI.PieSeries();
for (int x = 0; x < 8; x++)
{
series.DataPoints.Add(new Telerik.Charting.PieDataPoint(0.0, "Type " + x.ToString()));
}
chart.Series.Add(series);
using (var bmp = new System.Drawing.Bitmap(chart.ClientSize.Width, chart.ClientSize.Height))
{
chart.DrawToBitmap(bmp, chart.Bounds);
using (var stream = new System.IO.FileStream(@"c:\temp\NeverRenders.png", System.IO.FileMode.Create, System.IO.FileAccess.Write))
{
bmp.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
}
}
}
catch (Exception ex)
{
throw;
}
finally
{
if (chart != null)
{
foreach (var series in chart.Series)
{
series.DataPoints.Clear();
}
chart.Dispose();
}
}
}