﻿ Polar Area Series      Polar Area Series Send Feedback

Glossary Item Box

## Topic Overview

#### Purpose

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

#### In this topic

This topic contains the following sections:

## Introduction

#### Polar Area series summary

The Polar Area series takes the shape of a filled polygon whose corners (vertices) are represented by the data point’s polar coordinates. Using the same concepts of the Area Series, the Polar Area 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 Area Series does. As with other series types, multiple Polar Area series can be plotted on the same data chart and may overlay one another to show differences and similarities between data sets. Figure 1: Polar Area series

#### Data requirements

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

Required: The bound data model must contain two numeric fields representing the angle and radius of each data point.

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

#### Description

The following code uses the IGBubbleSeriesDataSourceHelper to supply randomly generated data to a bubble 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++) {
[radius addObject:[[NSNumber alloc] initWithDouble:(arc4random() % 100)]];
}

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

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

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

IGPolarAreaSeries *polarAreaSeries = [[IGPolarAreaSeries alloc] initWithKey:@"polarAreaSeries"];
polarAreaSeries.angleAxis = angleAxis;
polarAreaSeries.radiusAxis = radiusAxis;
polarAreaSeries.dataSource = source;
polarAreaSeries.markerType = IGMarkerTypeNone;

[infraChart addSeries:polarAreaSeries];
[self.view addSubview:infraChart];
```

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;   IGPolarAreaSeries series= new IGPolarAreaSeries ("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.