Back to Devexpress

PolarAreaSeriesView Class

corelibraries-devexpress-dot-xtracharts-adc6f839.md

latest5.3 KB
Original Source

PolarAreaSeriesView Class

Represents a series view of the Polar Area type.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
public class PolarAreaSeriesView :
    RadarAreaSeriesView
vb
Public Class PolarAreaSeriesView
    Inherits RadarAreaSeriesView

Remarks

The PolarAreaSeriesView class provides the functionality of a series view of the Polar Area type within a chart control.

Note that a particular view type can be defined for a series via its SeriesBase.View property.

For more information on series views of the Polar Area type please see the Polar Area Chart topic.

Example

The following example demonstrates how to create a ChartControl with a series of the PolarAreaSeriesView type, set its general properties, and add this chart to a form at runtime. Before proceeding with this example, first create a Windows Forms Application in Visual Studio, and include all necessary assemblies to the References list of your project.

Then, add the following code to the Form.Load event handler.

csharp
using System;
using System.Windows.Forms;
using DevExpress.XtraCharts;
// ...

private void Form1_Load(object sender, EventArgs e) {
    // Create a new chart.
    ChartControl polarAreaChart = new ChartControl();

    // Add a polar series to it.
    Series series1 = new Series("Series 1", ViewType.PolarArea);

    // Populate the series with points.
    series1.Points.Add(new SeriesPoint(0, 90));
    series1.Points.Add(new SeriesPoint(90, 70));
    series1.Points.Add(new SeriesPoint(180, 50));
    series1.Points.Add(new SeriesPoint(270, 100));

    // Add the series to the chart.
    polarAreaChart.Series.Add(series1);

    // Flip the diagram (if necessary).
    ((PolarDiagram)polarAreaChart.Diagram).StartAngleInDegrees = 180;
    ((PolarDiagram)polarAreaChart.Diagram).RotationDirection = 
        RadarDiagramRotationDirection.Counterclockwise;

    // Add a title to the chart and hide the legend.
    ChartTitle chartTitle1 = new ChartTitle();
    chartTitle1.Text = "Polar Area Chart";
    polarAreaChart.Titles.Add(chartTitle1);
    polarAreaChart.Legend.Visible = false;

    // Add the chart to the form.
    polarAreaChart.Dock = DockStyle.Fill;
    this.Controls.Add(polarAreaChart);
}
vb
Imports System
Imports System.Windows.Forms
Imports DevExpress.XtraCharts
' ...

Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
    ' Create a new chart.
    Dim polarAreaChart As New ChartControl()

    ' Add a polar series to it.
    Dim series1 As New Series("Series 1", ViewType.PolarArea)

    ' Populate the series with points.
    series1.Points.Add(New SeriesPoint(0, 90))
    series1.Points.Add(New SeriesPoint(90, 70))
    series1.Points.Add(New SeriesPoint(180, 50))
    series1.Points.Add(New SeriesPoint(270, 100))

    ' Add the series to the chart.
    polarAreaChart.Series.Add(series1)

    ' Flip the diagram (if necessary).
    CType(polarAreaChart.Diagram, PolarDiagram).StartAngleInDegrees = 180
    CType(polarAreaChart.Diagram, PolarDiagram).RotationDirection = _ 
RadarDiagramRotationDirection.Counterclockwise

    ' Add a title to the chart and hide the legend.
    Dim chartTitle1 As New ChartTitle()
    chartTitle1.Text = "Polar Area Chart"
    polarAreaChart.Titles.Add(chartTitle1)
    polarAreaChart.Legend.Visible = False

    ' Add the chart to the form.
    polarAreaChart.Dock = DockStyle.Fill
    Me.Controls.Add(polarAreaChart)
End Sub

Implements

IXtraSerializable

IXtraSupportDeserializeCollectionItem

ISupportTransparency

Inheritance

Object ChartElement SeriesViewBase RadarSeriesViewBase RadarPointSeriesView RadarLineSeriesView RadarAreaSeriesView PolarAreaSeriesView

See Also

PolarAreaSeriesView Members

DevExpress.XtraCharts Namespace