Is there a IGGaugeRange equivalent for IGChartView that allows me to place brushed bands across a series?
Something like this...
Try this sample. I set up 3 ranges and if you tap any of the series the ranges change values.
I kept most things pertaining to the stacked series separate. Just felt a bit cleaner that way.
Let me know if you run into any issues.
I tried setting up something like this...
-(void)updateRanges:(id)sender
{
NSNumber *upper = @(50);
NSNumber *lower = @(-10);
self.stackedAreaDSH = [[IGStackedSeriesDataSourceHelper alloc] initWithData:@[ lower, upper ] fields:@[ @"floatValue" ]];
self.stackedAreaSeries.dataSource = self.stackedAreaDSH;
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[IGCategoryDatePoint floatValue]: unrecognized selector sent to instance 0x16d214d0'
Which comes from this line of code:
[self.chartView insertItemAtIndex:(self.trendData.count-1) withSource:self];
Can you help me out and post a sample IGStackedSeriesDataSourceHelper to mimic the image I supplied above? I don't know how to use the Stacked DSH properly... let alone improperly. ;)
Is it possible to mix stacked and non-stacked series on the same chart?
The only series that can display multiple colors are the stacked series, but then you're substituting number of series for number of stacked fragments, so not that much different. I'm not entirely sure why you're getting the crash, but the only time that could happen is when you pass a IGCategoryDatePoint into a range series. Somehow your range series isn't getting the correct data point. Maybe a stacked series approach would be cleaner. You would need a single datasource and a small data model class that holds a numeric property for each range. I'm afraid there isn't anything cleaner than that.