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

Pie Chart Display issue

2 Answers 52 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Mark Cheeseborough
Top achievements
Rank 1
Mark Cheeseborough asked on 20 Jul 2010, 02:42 PM

I am using the RadChart control to display a pie chart on my page.

However, it seems to be ignoring the LegendDisplayMode and StartAngle that I am setting on the series.

The RadChart is added to the page with the following:

1.<telerik:RadChart ID="ComplianceActionsChart" runat="server" SkinsOverrideStyles="true"
2.  ChartTitle-TextBlock-Text="Compliance Actions Pie Chart" AutoLayout="True" Skin="DeepRed"
3.  Width="330px" Height="200px" PlotArea-EmptySeriesMessage-TextBlock-Text="There is no data available yet."
4.  DefaultType="Pie">
5.</telerik:RadChart>

The code to create the series is:

1.ChartSeries dataSeries = new ChartSeries("Current Data", ChartSeriesType.Pie);
2.dataSeries.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.ItemLabels;
3.dataSeries.Appearance.StartAngle = -90;
4. 
5.ChartSeriesItem free = new ChartSeriesItem(aCurrentData.Item1);
6.free.Name = "Item 1";
7.free.Label.TextBlock.Text = "#%";
8.dataSeries.AddItem(free);
I have 4 more items which are added to the chart.

When it displays, the legend only contains "Current Data" instead of the item names and the pie chart has the default rotation.

I tried creating the series in the aspx file with the appearance values set, but this produced the same result.

Is there anything I am missing in setting this up?

2 Answers, 1 is accepted

Sort by
0
Accepted
Ves
Telerik team
answered on 22 Jul 2010, 04:10 PM
Hello Mark Cheeseborough,

It seems SkinsOverrideStyles setting is the one that interferes with the rotation angle and legend display mode. Please, set it to false. If you still need it set to true (that is, you need the built-in skins to override your style settings in RadChart) you can wire the BeforeLayout event and configure the chart series there.

Best regards,
Ves
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mark Cheeseborough
Top achievements
Rank 1
answered on 22 Jul 2010, 04:18 PM
Thanks, it's working as I hoped now.
Tags
Chart (Obsolete)
Asked by
Mark Cheeseborough
Top achievements
Rank 1
Answers by
Ves
Telerik team
Mark Cheeseborough
Top achievements
Rank 1
Share this question
or