Back to Devexpress

PolarPointSeriesView Class

corelibraries-devexpress-dot-xtracharts-f5d72360.md

latest5.9 KB
Original Source

PolarPointSeriesView Class

Represents a series view of the Polar Point type.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
public class PolarPointSeriesView :
    RadarPointSeriesView
vb
Public Class PolarPointSeriesView
    Inherits RadarPointSeriesView

Remarks

The PolarPointSeriesView class provides the functionality of a series view of the Polar Point 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 Point type please see the Polar Point Chart topic.

Example

The following example demonstrates how to create a ChartControl with a series of the PolarPointSeriesView 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 polarPointChart = new ChartControl();

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

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

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

    // Adjust the view-type specific properties of the series.
    PolarPointSeriesView myView = (PolarPointSeriesView)series1.View;

    myView.PointMarkerOptions.Kind = MarkerKind.Star;
    myView.PointMarkerOptions.StarPointCount = 5;
    myView.PointMarkerOptions.Size = 20;

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

    // Add a title to the chart, and hide the legend.
    polarPointChart.Titles.Add(new ChartTitle());
    polarPointChart.Titles[0].Text = "A Polar Point Chart";
    polarPointChart.Legend.Visible = false;

    // Add the chart to the form.
    polarPointChart.Dock = DockStyle.Fill;
    this.Controls.Add(polarPointChart);
}
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 polarPointChart As New ChartControl()

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

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

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

    ' Adjust the view-type specific properties of the series.
    Dim myView As PolarPointSeriesView = CType(series1.View, PolarPointSeriesView)

    myView.PointMarkerOptions.Kind = MarkerKind.Star
    myView.PointMarkerOptions.StarPointCount = 5
    myView.PointMarkerOptions.Size = 20

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

    ' Add a title to the chart, and hide the legend.
    polarPointChart.Titles.Add(New ChartTitle())
    polarPointChart.Titles(0).Text = "A Polar Point Chart"
    polarPointChart.Legend.Visible = False

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

Implements

IXtraSerializable

IXtraSupportDeserializeCollectionItem

Inheritance

Object ChartElement SeriesViewBase RadarSeriesViewBase RadarPointSeriesView PolarPointSeriesView

See Also

PolarPointSeriesView Members

DevExpress.XtraCharts Namespace