lineColorBelowBaseline question


I have a graph where I need to set the line to a line color when it’s over a threshold and a different color when it’s below a threshold, and the thresholds can change at any time.

I believe the bottom can be changed by using something like SChartLineSeries lineColorBelowBaseline and setting the baseline, but don’t see any documentation on how setting the baseline impacts the graph, unless it’s only used for lineColorBelowBaseline?

Is there an equivalent to lineColorBelowBaseline , something like lineColorAboveTopBaseline or something that would allow me to change the color of the portion of a series that is above a specified value?



just following up to see if this is possible.


Hi foobar,

The baseline has two uses; firstly as you’ve discovered, you can set the colour above/below the baseline. The second is for bars and columns, where the baseline is the point at which the base of the column/bar is drawn from.

While there is no option to specify a second baseline, you could achieve a similar effect by using the SChartAnnotation horizontalBandAtPosition: method to create a band of colour along the background. This would make areas of the background obviously appear in different colours, even if the line did not cross the threshold limit.