LineChart area colors


HI guys, I’m having a slight issue with setting custom colors to a LineChart.

What I’m trying to set is the lineColor, as well as the area color using the following code;

SChartLineSeriesStyle *style = [[SChartLineSeriesStylealloc] init];
style.showFill = YES;
style.fillWithGradient = YES;
style.areaColor = [UIColor redColor];
style.areaColorLowGradient = [UIColor redColor];

style.lineColor = [UIColor greenColor];
It seems, however, as if setting the areaColor and lineColor are somewhat mutually exclusive. When you play a little with these settings, you either get a custom fill color, or a custom line color. I just can't manage to get both.
Is there anything I'm missing here?


Hi Maximillian,

What you want here is .areaLineColor, instead of .lineColor, which should get your lines coloured correctly :slight_smile: