How Add PolarAreaSeries to RadPolarChart?

2 posts, 0 answers
  1. Minseok Bang
    Minseok Bang avatar
    19 posts
    Member since:
    Oct 2009

    Posted 31 Oct 2012 Link to this post

    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.


  2. Petar Kirov
    Admin
    Petar Kirov avatar
    425 posts

    Posted 05 Nov 2012 Link to this post

    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.

  3. DevCraft banner
Back to Top