Hi,
i have an array ("objects") of objects like this
@property NSNumber *value1;
@property NSNumber *value2;
@property NSString *textForLabel;
I use
[[IGStackedSeriesDataSourceHelper alloc] initWithData:objects fields:@[@"value1",@"value2"] labelPath:@"textForLabel"];
[_chartView addStackedSeriesForType:[IGStackedColumnSeries class] usingKey:@"columnSeries" withDataSource:source firstAxisKey:@"xAxis" secondAxisKey:@"yAxis"];
I get this result:
How do I display columns side by side and not one above the other? I have to use another data source? Thank you
thanks!
A stacked data source is for stacked data charts. You most likely are looking to use the IGCategorySeriesDataSourceHelper and hook it up a IGColumnSeries. That would display a single value per bar. The add a second IGColumnSeries (and second helper) for the second bar
something like
*h1= IGCategorySeriesDataSourceHelper initWithData:data andValuePath:value1
*h2 = IGCategorySeriesDataSourceHelper initWithData:data andValuePath:value2
_chartView addSeriesForType: IGColumnSeries .... withDataSource:h1;
_chartView addSeriesForType: IGColumnSeries .... withDataSource:h2;