Pie Chart Display issue

Thread is closed for posting
3 posts, 1 answers
  1. Mark Cheeseborough
    Mark Cheeseborough avatar
    2 posts
    Member since:
    Sep 2012

    Posted 20 Jul 2010 Link to this post

    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. Answer
    Ves
    Admin
    Ves avatar
    2926 posts

    Posted 22 Jul 2010 Link to this post

    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
  3. Mark Cheeseborough
    Mark Cheeseborough avatar
    2 posts
    Member since:
    Sep 2012

    Posted 22 Jul 2010 Link to this post

    Thanks, it's working as I hoped now.
Back to Top