Radial Area Series
Send Feedback

Glossary Item Box

Topic Overview

Purpose

This topic is a conceptual overview of the IGChartView™ control’s Radial Area Series and provides a code example demonstrating how to add it to the chart view.

In this topic


Introduction

Radial Area series summary

Radial Area series has a shape of a filled polygon bound by a collection of straight lines connecting data points. The Radial Area series uses the same concepts of data plotting as the Area Series but wraps data points around a circle rather than stretching them along a horizontal line.

Data requirements

While the IGChartView control allows easy binding to your own data model, make sure to supply the appropriate amounts and types of data required by the series. Failing to do so causes the IGChartView to appear blank.

Required – the data model must contain one numeric field to render Radial Line Series data.


Adding a Radial Area Series to the IGChartView – Code Example

Description

The code below uses the IGCategorySeriesDataSourceHelper to supply randomly generated data to a Radial Area series by first adding to the IGChartView instance, then next adding the IGChartView 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 is available in the Adding the Chart Framework File topic.

Code

In C#:

List<NSObject> values = new List<NSObject>();
for (int i = 0; i < 25; i++) {
      values.Add(new NSNumber((new Random(i).Next() % 100)));
}
IGCategorySeriesDataSourceHelper source = new IGCategorySeriesDataSourceHelper();
source.Values = values.ToArray();
IGChartView infraChart = new IGChartView(this.View.Frame);
IGCategoryAngleAxis angleAxis = new IGCategoryAngleAxis("angleAxis");
IGNumericRadiusAxis radiusAxis = new IGNumericRadiusAxis("radiusAxis");
radiusAxis.InnerRadiusExtentScale = 0.10f;
infraChart.AddAxis(angleAxis);
infraChart.AddAxis(radiusAxis);
IGRadialAreaSeries radialAreaSeries = new IGRadialAreaSeries("radialAreaSeries");
radialAreaSeries.AngleAxis = angleAxis;
radialAreaSeries.ValueAxis = radiusAxis;
radialAreaSeries.DataSource = source;
radialAreaSeries.MarkerType = IGMarkerType.IGMarkerTypeNone;
infraChart.AddSeries(radialAreaSeries);
(this.View).AddSubview(infraChart);

In Objective-C:

    NSMutableArray *values = [[NSMutableArray alloc] init];
    for (int i = 0; i < 25; i++)     {        [values addObject:[[NSNumber alloc] initWithDouble:(arc4random() % 100)]];    }
    
    IGCategorySeriesDataSourceHelper *source = [[IGCategorySeriesDataSourceHelper alloc] init];    source.values = values;
    
    IGChartView *infraChart = [[IGChartView alloc] initWithFrame:self.view.frame];
    
    IGCategoryAngleAxis *angleAxis = [[IGCategoryAngleAxis alloc] initWithKey:@"angleAxis"];    IGNumericRadiusAxis *radiusAxis = [[IGNumericRadiusAxis alloc] initWithKey:@"radiusAxis"];    radiusAxis.innerRadiusExtentScale = 0.10;    [infraChart addAxis:angleAxis];    [infraChart addAxis:radiusAxis];
    
    IGRadialAreaSeries *radialAreaSeries = [[IGRadialAreaSeries alloc] initWithKey:@"radialAreaSeries"];
    radialAreaSeries.angleAxis = angleAxis;
    radialAreaSeries.valueAxis = radiusAxis;
    radialAreaSeries.dataSource = source;
    radialAreaSeries.markerType = IGMarkerTypeNone;
    
    [infraChart addSeries:radialAreaSeries];
    [self.view addSubview:infraChart];

Related Content

Topics

The following topics provide additional information related to this topic.

Topic

Purpose

This collection of topics explains each of the individual charts supported by the IGChartView control.