Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drawGridLinesBehindDataEnabled has no effect on CombinedChart #4357

Closed
Yoorque opened this issue Apr 30, 2020 · 1 comment
Closed

drawGridLinesBehindDataEnabled has no effect on CombinedChart #4357

Yoorque opened this issue Apr 30, 2020 · 1 comment

Comments

@Yoorque
Copy link

Yoorque commented Apr 30, 2020

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

@Yoorque Yoorque closed this as completed May 8, 2020
@Yoorque
Copy link
Author

Yoorque commented May 8, 2020

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.

@Yoorque Yoorque reopened this May 8, 2020
@Yoorque Yoorque closed this as completed May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant