Nevron .NET Vision
Chart for .NET / User's Guide / Chart Types / Polar / Polar Area

In This Topic
    Polar Area
    In This Topic

    A Polar Area chart displays a filled closed contour in a 2-dimensional polar coordinate system. The contour is defined by a sequence of data points, where the position of each data point is specified by its distance from the center and its angle of rotation. The following figure displays a Polar Area chart.




    Figure 1.

     Creating a Polar Area series

    Polar Area series are represented by the NPolarAreaSeries type. An instance of this type must be added to the series collection of a Polar Chart (NPolarChart object).

    C#
    Copy Code
    // clear the Charts collection and create a new polar chart
    NPolarChart chart = new NPolarChart();
    chartControl.Charts.Clear();
    chartControl.Charts.Add(chart);
    
    // add a polar area series to the chart
    NPolarAreaSeries polarArea = new NPolarAreaSeries();
    chart.Series.Add(polarArea);
    
    Visual Basic
    Copy Code
    ' clear the Charts collection and create a new polar chart
    Dim chart As New NPolarChart
    chartControl.Charts.Clear()
    chartControl.Charts.Add(chart)
    
    ' add a polar area series to the chart
    Dim polarArea As New NPolarAreaSeries
    chart.Series.Add(polarArea)
    
     Passing Data

    Once the series is created you can add some data in it. Polar series use the Values data series for the polar data point radiuses (distances from the center). In addition to this data series the polar series provides another data series of type Double, which holds the polar data point angles. It is accessible through the Angles property of the NPolarSeries class.

    You can either manipulate directly the Values and Angles data series, or use the data point interface to add data. The NPolarDataPoint class provides several constructors that can be very helpful when you add data points. Please refer to the Working with Data Points topic for more information.

     Formatting commands
    Besides the standard formatting commands you can use the following commands in format strings:

    <angle_in_degrees> - the current data point angle in degrees (extracted from the Angles data series)
    <angle_in_radians> - the current data point angle in radians (extracted from the Angles data series)
     Related Examples
    Windows forms: Chart Gallery\Polar\Polar Area