SwiftChart
SwiftChart copied to clipboard
Specify the color above or below other than zero
Is it possible to specify a color above or below other than zero ?
Sure, use the ChartSeries.colors
option. E.g.
let series = ChartSeries([0, 6, 2, 8, 4, 7, 3, 10, 8])
series.colors = (above: ChartsColors.redColor(), below: ChartsColors.blueColor())
Sorry my question was not correct. Is it possible above and below 100 and not zero ?
I misread the title :)
I believe changing the 0 in this line should do it! I can't try it now but if you want to send a PR it would be greatly appreciated.
I think it should be provided as an option of ChartSeries
. How could we call it ?
Changing the zero ? For the name ... It's your baby ;) but why not ChartColorsLimit, ChartColorsLine. Sorry, I don't know what is a PR and how to post it, I don't use Github except for download a project :o/
@Cyphontin sounds like the best time to contribute something back 👍
Thank you for your time @gpbl