Polar Chart in ASP.NET MVC Charts

18 Nov 20184 minutes to read

Polar

To render a polar series in your chart, you need to follow a few steps to configure it correctly. Here’s a concise guide on how to do this:

  • Set the series type: Define the series Type as Polar in your chart configuration. This indicates that the data should be represented as a polar chart, which is ideal for plotting data points on a circular graph.

Binding data with series

You can bind data to the chart using the DataSource property within the series configuration. This allows you to connect a JSON dataset or remote data to your chart. To display the data correctly, map the fields from the data to the chart series XName and YName properties.

Draw types

Use the DrawType property to change the series plotting type in a Polar chart to line, column, area, range column, spline, scatter, stacking area, spline area, or stacking column. The default value of DrawType is Line.

Line

To render a line draw type, you need to follow a few steps to configure it correctly.

Set the series type: Define the series DrawType as Line in your chart configuration. This indicates that the data should be represented as a polar line chart, with lines connecting each data point.

Spline

To render a spline draw type, you need to follow a few steps to configure it correctly.

Set the series type: Define the series DrawType as Spline in your chart configuration. This indicates that the data should be represented as a polar spline chart, with smooth, curved lines connecting each data point.

Area

To render an area draw type, you need to follow a few steps to configure it correctly.

Set the series type: Define the series DrawType as Area in your chart configuration. This indicates that the data should be represented as a polar area chart, with filled areas below the lines connecting each data point.

Stacked Area

To render a stacked area draw type, you need to follow a few steps to configure it correctly.

Set the series type: Define the series DrawType as StackingArea in your chart configuration. This indicates that the data should be represented as a polar stacked area chart, with areas stacked on top of each other, displaying the cumulative value of multiple series.

Column

To render a column draw type, you need to follow a few steps to configure it correctly.

Set the series type: Define the series DrawType as Column in your chart configuration. This indicates that the data should be represented as a polar column chart, allowing for the comparison of values across categories.

Stacked Column

To render a stacked column draw type, you need to follow a few steps to configure it correctly.

Set the series type: Define the series DrawType as StackingColumn in your chart configuration. This indicates that the data should be represented as a polar stacked column chart, with each column consisting of multiple segments stacked on top of each other.

Range Column

To render a range column draw type, you need to follow a few steps to configure it correctly.

Set the series type: Define the series DrawType as RangeColumn in your chart configuration. This indicates that the data should be represented as a polar range column chart, where each column spans a range of values.

Scatter

To render a scatter draw type, you need to follow a few steps to configure it correctly.

Set the series type: Define the series DrawType as Scatter in your chart configuration. This indicates that the data should be represented as a polar scatter chart.

Spline area

To render an spline area draw type, you need to follow a few steps to configure it correctly.

Set the series type: Define the series DrawType as SplineArea in your chart configuration. This indicates that the data should be represented as a polar spline area chart, where the series is drawn with smooth, curved lines connecting each data point, and the area beneath the line is filled with color.

Series customization

Start Angle

You can customize the start angle of the polar series using startAngle property. By default, StartAngle is 0 degree.

Radius

You can customize the radius of the polar series using Coefficient property. By default, Coefficient is 100.

Empty points

Data points with null or undefined values are considered empty. Empty data points are ignored and not plotted on the chart.

Mode

Use the Mode property to define how empty or missing data points are handled in the series. The default mode for empty points is Gap.

Fill

Use the Fill property to customize the fill color of empty points in the series.

Border

Use the Border property to customize the width and color of the border for empty points.

Events

Series render

The SeriesRender event allows you to customize series properties, such as data, fill, and name, before they are rendered on the chart.

Point render

The PointRender event allows you to customize each data point before it is rendered on the chart.

See Also