Data Source Helper
Send Feedback

Glossary Item Box

Topic Overview


This topic provides an introductory overview of the data source helper in the IGFunnelChartView™ and demonstrates how to configure it using a code example.

In this topic


Data source helper summary

Using the IGFunnelChartViewDataSourceHelper eliminates the need to implement any of the required protocol methods found in the IGFunnelChartViewDataSource class. Thus, allowing you to simplify the wiring up of data to the IGFunnelChartView control by using the data source helper specialized for this control.

The IGFunnelChartViewDataSourceHelper is extremely flexible in how it loads the values and labels. These initialization methods for directly loading your data arrays or with an array custom NSObjects are supported.

  • initWithValues:
  • initWithValues:innerLabels:outerLabels:
  • initWithData:valuePath:
  • initWithData:valuePath:innerLabelPath:outerLabelPath:

Additionally, the IGFunnelChartViewDataSourceHelper can be initialized using the generic init method, and the properties; data, values, innerLabels, outerLabels, valuePath, innerLabelPath, outerLabelPath, depending on the use case, can be manually set.

Data Source Helper – Code Example


The code below demonstrates loading an NSMutableArray of NSObjects containing properties for the value of the funnel slice and the inner and outer labels. After initializing the IGFunnelChartViewDataSourceHelper with data and values, assign the data source helper instance to the dataSource property found on the IGFunnelChartView.


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


In Objective-C:

NSMutableArray *data = [[NSMutableArray alloc]init];
// ...Add NSObjects to the array, the NSObject in this example must contain the property named “value”, a property named “innerLabel”, and a property named “outerLabel”.
IGFunnelChartViewDataSourceHelper *funnelChartDataSourceHelper = [[IGFunnelChartViewDataSourceHelper alloc]initWithData:data valuePath:@"value" innerLabelPath:@"innerLabel" outerLabelPath:@”outerLabel”];
funnelChartView.dataSource = funnelChartDataSourceHelper;

In C#:

List<DataObject> data = new List<DataObject>;
// ...Add custom data NSObjects to the list collection, the NSObject in this example must contain the property named “value”, a property named “innerLabel”, and a property named “outerLabel”.
IGFunnelChartViewDataSourceHelper funnelChartDataSourceHelper = new IGFunnelChartViewDataSourceHelper (data.ToArray (), "value", "innerLabel", "outerLabel");
funnelChartView.DataSource = funnelChartDataSourceHelper;

Related Content


The following topic provides additional information related to this topic.



This topic serves as a gateway to the features and functionality of the IGFunnelChartView control.