Issues with Line Chart Fill Gradient


#1

Hello,

I’m having issues with a gradient being displayed under a line chart. While the areaColor is being displayed correctly, it extends down to the bottom of the area, rather than fading to the specified areaColorLowGradient. See my implementation of the delegate method below as well as the screenshot of the issue here. Thanks for the help!

- (SChartSeries*)sChart:(ShinobiChart*)chart seriesAtIndex:(int)index
{
    SChartLineSeries *series = [SChartLineSeries new];
    series.stackIndex = @(index);
    series.title = @"CRI";
    
    FBCRIVitalLevel vitalLevel = [self.CRITrend[index][FBDatasourceCRITrendVitalKey] integerValue];
    UIColor *vitalColor = [[FBStyleManager sharedManager] dataColorForVitalLevel:vitalLevel];
    
    series.style.showFill = YES;
    series.style.fillWithGradient = YES;
    series.style.areaLineWidth = @(2);
    series.style.areaLineColor = vitalColor;
    series.style.areaColor = [vitalColor colorWithAlphaComponent:0.75];
    series.style.areaColorLowGradient = [vitalColor colorWithAlphaComponent:0.1];
    
    return series;
}

#2

Hi,

I’ve tried your code and it does look like you’ve found a bug with stacked area fills. Currently, they are only working correctly for non-stacked areas. 

I’m sorry about this and I’ve raised a ticket to have it dealt with.

Regards

Stuart