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

[Solved] StartAngle for Silverlight Pie & Doughnuts

3 Answers 100 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
B@ett
Top achievements
Rank 1
B@ett asked on 16 Dec 2010, 11:39 PM
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!

3 Answers, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 20 Dec 2010, 12:29 PM
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
0
B@ett
Top achievements
Rank 1
answered on 20 Dec 2010, 04:00 PM
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?
0
Giuseppe
Telerik team
answered on 20 Dec 2010, 06:51 PM
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
Tags
Chart
Asked by
B@ett
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
B@ett
Top achievements
Rank 1
Share this question
or