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

How Add PolarAreaSeries to RadPolarChart?

1 Answer 71 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Minseok Bang
Top achievements
Rank 1
Minseok Bang asked on 01 Nov 2012, 04:36 AM
I want to add PolarAreaSeries to RadPolarChart.

ex, RadChart,  radchart1.Defeault.DataSeries.Add(Series);

but RadPolarChart is not any "Add" method.

I can't find it.


in here, I watch "RadPolarChart Bining" movie clip tutorial. but there movie Clip introduce Binding method using Data Class.

do not want to write Any Code in Xaml . write Only C# Behind Code for dynamically Binding.


How Can I add PolarAreaSeries to PolarChart in behind Code?

simple quenstion :)

waiting for your reply.


1 Answer, 1 is accepted

Sort by
0
Petar Kirov
Telerik team
answered on 05 Nov 2012, 04:21 PM
Hi,

Here is an example of creating a RadPolarChart in code-behind: 
RadPolarChart polarChart = new RadPolarChart();
 
polarChart.RadialAxis = new NumericRadialAxis();
polarChart.PolarAxis = new PolarAxis();
 
var series = new PolarAreaSeries();
 
series.DataPoints.Add(new PolarDataPoint { Angle = 45, Value = 5 });
series.DataPoints.Add(new PolarDataPoint { Angle = 60, Value = 2 });
series.DataPoints.Add(new PolarDataPoint { Angle = 90, Value = 7 });
series.DataPoints.Add(new PolarDataPoint { Angle = 120, Value = 2 });
series.DataPoints.Add(new PolarDataPoint { Angle = 180, Value = 5 });
series.DataPoints.Add(new PolarDataPoint { Angle = 240, Value = 6 });
series.DataPoints.Add(new PolarDataPoint { Angle = 300, Value = 7 });
 
polarChart.Series.Add(series);
 
this.LayoutRoot.Children.Add(polarChart);

Please note that you need to set the 2 axes, because otherwise the chart will not know how to visualize the series.

All the best,
Petar Kirov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ChartView
Asked by
Minseok Bang
Top achievements
Rank 1
Answers by
Petar Kirov
Telerik team
Share this question
or