Search code examples
ioscore-plot

iOS - CorePlot gradient overlays the others


I'm using CorePlot version 1.2 for my app, and for my reasons, i need to keep this version.

When i plot the graph, i've notice that the gradient color below one of my scatter plot overlays the other plot.

More specific the colors of others serie are like "darkened" under the gradient shadow and more brilliant outside that area.

See the pic for more details

the plot
(source: altervista.org)

I would like to have the same color for the others serie(also under the gradient shadow) but i'm not able to solve this problem.

Thanks in advance.


Solution

  • The gradient fills under the plots are drawn in the same layer as the plot line. Having the fills behind all of the plot lines requires extra plots—two for each existing plot. One set should draw the fills and the other should draw plot lines with no fill. Put the fills behind the plot lines (add them to the graph first). Each pair of plots (fill and line) should share the same plot data.