You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to draw gridlines on top of the data in CombinedChartView.
I have two lines with different data and in order to create the effect of shaded area between them, higher dataSet has drawFillEnabled with white color (semi-transparent) to Y axisMinimum and lower dataSet has the same fillFormatter with black (alpha 1) fill. This results in expected shading between the lines, but since I have Y axis gridlines enabled, the lower black fill covers the gridlines below the lower dataSet.
I have used chart.rightAxis.drawGridLinesBehindDataEnabled = false in order to draw them on top of the data, but this had no effect.
What did you expect to happen?
I expected to be able to draw the gridlines on top of the dataSet so they would remain visible.
What happened instead?
Lower dataSet fill, covered the gridlines
Charts Environment
v3.5.0/Branch/Commit Number: Xcode version:11.4.1 Swift version:5.2.2 Platform(s) running Charts:iOS macOS version running Xcode:10.15.4
The text was updated successfully, but these errors were encountered:
So, I managed to figure it out and resolve this issue.
drawGridLinesBehindDataEnable flag, in fact, works.
The only thing missing is the note, that in order to make it work, this flag needs to be set equally on all of the axes that are enabled, even though some of them have their grid lines disabled.
What did you do?
I'm trying to draw gridlines on top of the data in CombinedChartView.
I have two lines with different data and in order to create the effect of shaded area between them, higher dataSet has drawFillEnabled with white color (semi-transparent) to Y axisMinimum and lower dataSet has the same fillFormatter with black (alpha 1) fill. This results in expected shading between the lines, but since I have Y axis gridlines enabled, the lower black fill covers the gridlines below the lower dataSet.
I have used
chart.rightAxis.drawGridLinesBehindDataEnabled = false
in order to draw them on top of the data, but this had no effect.What did you expect to happen?
I expected to be able to draw the gridlines on top of the dataSet so they would remain visible.
What happened instead?
Lower dataSet fill, covered the gridlines
Charts Environment
v3.5.0/Branch/Commit Number:
Xcode version:11.4.1
Swift version:5.2.2
Platform(s) running Charts:iOS
macOS version running Xcode:10.15.4
The text was updated successfully, but these errors were encountered: