StartAngle for Silverlight Pie & Doughnuts

4 posts, 0 answers
  1. B@ett
    B@ett avatar
    5 posts
    Member since:
    May 2010

    Posted 16 Dec 2010 Link to this post

    How does one go about modifying the 'Start Angle' of pie & doughnut charts?
    I have spent a significant amount of time exploring my options to no avail. While there is an example for how to do this in Pie Chart Start Angle for ajax, I have been unable to locate any such solution for silverlight, specifically from the code behind.

    e.g. PieSeriesDefinition Pie = new ...
    Pie.StartAngle?

    Any Suggestions?

    Thanks in advance for your help!
  2. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 20 Dec 2010 Link to this post

    Hi B@ett,

    You can achieve the desired effect like this (positive value shifts the starting point counter-clockwise, negative value shifts the starting point clockwise):

    RadChart1.DefaultSeriesDefinition = new PieSeriesDefinition() { StartAngle = 90 };
    RadChart1.ItemsSource = new int[] { 1, 2, 3 };

    The same approach applies for DoughnutSeriesDefinition as well.


    Regards,
    Freddie
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. B@ett
    B@ett avatar
    5 posts
    Member since:
    May 2010

    Posted 20 Dec 2010 Link to this post

    Thanks Freddie,
    I have tried to incorporate that already and unfortunately I get a compiling error.  Am I missing a reference?
    Thanks,
    B@ett

    using System.Collections.Generic;
    using System.Windows.Media;
    using Telerik.Windows.Controls;
    using System;
    using Telerik.Windows.Controls.Charting;
    using System.Windows;
    using System.Windows.Controls;
    using System.Xml.Serialization;
    // //////////////////////////////
    // / / / / / / / / / / / / / / 
    // _Series is a new SeriesMapping in a custom Chart Area
    // //////////////////////////////  
      
    case Chart_Type.Pie:
    Series.SeriesDefinition = new PieSeriesDefinition() { StartAngle = 90 };
             break;
    ERROR : :
    C#: Unknown member 'StartAngle' of 'Telerik.Windows.Controls.Charting.PieSeriesDefinition'
    --I am using the 3Qtr 2010 Telerik controls package for Silverlight. Any ideas?
  4. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 20 Dec 2010 Link to this post

    Hello B@ett,

    The StartAngle property was introduced with the latest official version of the control (Q3 2010 - v.2010.3.1110) -- could you confirm that the version number of the referenced assemblies in your application is equal to this version?

    We have attached a sample application for your reference.


    Kind regards,
    Freddie
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
Back to Top