Column Series -- Missing series values



I am trying to create a column stacked series.  X-Axis being years.   For each year number of series varies.  Following is the sample data set.

Year    Series      Amount

2010   Series1           100

2010   Series2           200

2011  Series1           100

2012 Series2            300

Notice the missing series values for each year.  I am returning number of series as 2 as there two distinct series.  Chart errors out while trying to get data points for  2011, Series2.  If I assign nil value chart crashes. How do I accomplish this.   I am doing this in swift.

Any help is appreciated.


Hi vasudc,

Our charts support nil data point values which may be of help here. When your data source asks for the data point of series 2 for the index relating to x-value 2011, you should be able to just set a nil y-value:

SChartDataPoint *dp = [SChartDataPoint new];
dp.xValue = //set 2011;
dp.yValue = nil;

This should result in the chart simply not rendering a y-value for that series/data point. I hope that’s helpful! :slight_smile: