Radial Column Series
Send Feedback

Glossary Item Box

Topic Overview

Purpose

This topic provides a conceptual overview of the IGChartView™ control and provides a code sample demonstrating how to add it to the chart view.

In this topic


Introduction

Radial Column series summary

The Radial column series uses a collection of rectangles emanating from the center of the chart toward the data point’s coordinates. The radial column series uses the same concepts of data plotting as the column series but wraps data points around a circle rather than stretching them along a horizontal line.

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 of the type of series that is being used, the IGChartView will appear blank.

Required – the bound data model must contain 1 numeric field to render radial pie data.


Adding a Radial Column Series to the IGChartView – Code Example

Description

The code below uses the IGCategorySeriesDataSourceHelper to supply randomly generated data to a radial column series that first gets added to the IGChartView instance, and then the current UIView adds the IGChartView as a subview.

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 *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];
    
    IGRadialColumnSeries *radialColumnSeries = [[IGRadialColumnSeries alloc] initWithKey:@"radialColumnSeries"];
    radialColumnSeries.angleAxis = angleAxis;
    radialColumnSeries.valueAxis = radiusAxis;
    radialColumnSeries.dataSource = source;
    radialColumnSeries.markerType = IGMarkerTypeNone;
    
    [infraChart addSeries:radialColumnSeries];
    [self.view addSubview:infraChart];

In C#:



List<NSObject> data = new List<NSObject>();
Random r = new Random();
for(int i = 0;i <25; i++)
{
double val = r.Next() % 100;
data.Add(new NSNumber(val));
}

IGCategoryDateSeriesDataSourceHelper source = new IGCategoryDateSeriesDataSourceHelper();
source.Values = data.ToArray();



IGChartView chart = new IGChartView(this.View.Frame);
chart.AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth;

this.View.AddSubview(chart);


IGCategoryAngleAxis angleAxis = new IGCategoryAngleAxis("angleAxis");
IGNumericRadiusAxis radiusAxis = new IGNumericRadiusAxis("radiusAxis");
chart.AddAxis(angleAxis );
chart.AddAxis(radiusAxis );

radiusAxis.InnerRadiusExtentScale = 0.10f;


IGRadialColumnSeries series= new IGRadialColumnSeries("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

The IGChartView control chart series is divided into several groups, this parent topic contains links and details about each one.