Nevron Open Vision Documentation
Chart / Charts / Types / Polar / Polar Chart
In This Topic
    Polar Chart
    In This Topic

    The polar chart displays data in a polar coordinate system. In the polar chart points are scaled using their value and angle. The following code shows how to create a simple polar chart:

    C#
    Copy Code

    // Add a NOV widget inside the form
    NChartView chartView = new NChartView();

    // create a dock panel with label and chart
    NDockPanel dockPanel = new NDockPanel();
    chartView.Surface.Content = dockPanel;

    // craete a docked label
    NLabel label = new NLabel();
    label.Text = "My First Polar Chart";
    label.Margins = new NMargins(10);
    label.Font = new NFont(NFontDescriptor.DefaultSansFamilyName, 12);
    label.TextFill = new NColorFill(NColor.Black);
    label.TextAlignment = ENContentAlignment.MiddleCenter;
    NDockLayout.SetDockArea(label, ENDockArea.Top);
    dockPanel.AddChild(label);

    // create a new polar chart
    NPolarChart polarChart = new NPolarChart();
    polarChart.Margins = new NMargins(10);
    NDockLayout.SetDockArea(polarChart, ENDockArea.Center);
    dockPanel.AddChild(polarChart);
    polarChart.SetPredefinedPolarAxes(ENPredefinedPolarAxes.AngleValue);

    // create a polar point series
    NPolarPointSeries point = new NPolarPointSeries();
    point.DataPoints.Add(new NPolarPointDataPoint(70, 10));
    point.DataPoints.Add(new NPolarPointDataPoint(150, 20));
    point.DataPoints.Add(new NPolarPointDataPoint(240, 30));
    polarChart.Series.Add(point);

    Like in the case of the cartesian chart you can take advantage of the SetPredefinedPolarAxes method that initializes a set of value and angle axes. The following table lists the available options:

    ENPredefinedPolarAxes Description
    AngleValue Represents a polar chart with two axes - one value axis and one angle axis
    AngleValueSecondaryValue Represents a polar chart with three axes - two value axes and one angle axis
    AngleSecondaryAngleValue Represents a polar chart with three axes - two angle axes and one value axis

    By default all polar series are configured to use X values from data points (e.g. have their UseXValues property set to true).

     

    See Also