﻿ Polar Line Series
 Polar Line Series Send Feedback

Glossary Item Box

## Topic Overview

#### Purpose

This topic provides a conceptual overview of the Polar Line series in the IGChartView™ control and provides a code example showing you how to add it to the chart views.

#### In this topic

This topic contains the following sections:

## Introduction

#### Polar Line series summary

The Polar Line series renders data as a collection of straight lines connected to polar coordinates against a circular polar plot. Using the same concepts of the Line Series, the polar Line series uses polar coordinates to wraps data points around a circular plot.

Polar coordinates consist of an ordered pair with the values representing the data points distance from and the angle formed in relation to the center. As opposed to stretching them along a Cartesian plane, as the Line Series does. As with other series types, multiple Polar Scatter series can be plotted on the same data chart and they can overlay one another to show differences and similarities between data sets.

#### Data requirements

While the IGChartView control allows for easy binding to your own data model, it is important that you supply the appropriate data amount and type required by that series. If the data model does not meet the series’ minimum requirements, the IGChartView will appear blank.

Required – to render polar line data, the bound data model must contain 2 numeric fields, one for each of the two polar coordinates (angle and radius).

## Adding a Polar Line Series to the IGChartView – Code Example

#### Description

The code below uses the IGPolarSeriesDataSourceHelper to supply randomly generated data to a polar line series that first gets added to the IGChartView instance, and then the IGChartView is added as a subview of the current UIView.

#### Prerequisites

This code example requires the inclusion of the IGChartView framework, detail about how to add this framework can be found in the Adding the Chart Framework File topic.

#### Code

In Objective-C:

```    NSMutableArray *angle = [[NSMutableArray alloc] init];
for (int i = 0; i < 25; i++) {
[angle addObject:[[NSNumber alloc] initWithDouble:(i * 14)]];
}

NSMutableArray *radius = [[NSMutableArray alloc] init];
for (int i = 0; i < 25; i++) {
}

IGPolarSeriesDataSourceHelper *source = [[IGPolarSeriesDataSourceHelper alloc] init];
source.angleValues = angle;

IGChartView *infraChart = [[IGChartView alloc] initWithFrame:self.view.frame];

IGNumericAngleAxis *angleAxis = [[IGNumericAngleAxis alloc] initWithKey:@"angleAxis"];
angleAxis.minimum = 0;
angleAxis.maximum = 360;
angleAxis.interval = 30;

IGPolarLineSeries *polarLineSeries = [[IGPolarLineSeries alloc] initWithKey:@"polarLineSeries"];
polarLineSeries.angleAxis = angleAxis;
polarLineSeries.dataSource = source;
polarLineSeries.markerType = IGMarkerTypeNone;

```

In C#:

```   List<NSObject> angle = new List<NSObject>();   Random r = new Random();   for(int i = 0; i < 25; i++)      angle.Add(new NSNumber(i*14));   List<NSObject> radius= new List<NSObject>();   for(int i = 0; i < 25; i++)      radius.Add(new NSNumber(r.Next()% 100));   IGPolarSeriesDataSourceHelper source = new IGPolarSeriesDataSourceHelper ();   source.AngleValues =  angle.ToArray();    source.RadiusValues =  radius.ToArray();   IGChartView chart = new IGChartView(this.View.Frame);   chart.AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth;   this.View.AddSubview(chart);      IGNumericAngleAxis angleAxis= new IGNumericAngleAxis ("xAxis");   IGNumericRadiusAxis radiusAxis= new IGNumericRadiusAxis ("yAxis");   chart.AddAxis(angleAxis);   chart.AddAxis(radiusAxis);   angleAxis.minimum = 0;
angleAxis.maximum = 360;
angleAxis.interval = 30;   IGPolarLineSeries series= new IGPolarLineSeries ("series");   series.AngleAxis= angleAxis;   series.RadiusAxis = radiusAxis;   series.DataSource = source;   chart.AddSeries(columnSeries);```

## Related Content

#### Topics

The following topics provide additional information related to this topic.

Topic

Purpose

This is a group of topics explaining the various types of Polar series supported by the IGChartView control.