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

Fix Drawable LineChart Fill Bug #5284

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

giantramen
Copy link

PR Checklist:

  • [x ] I have tested this extensively and it does not break any existing behavior.
  • I have added/updated examples and tests for any new behavior.
  • If this is a significant change, an issue has already been created where the problem / solution was discussed: [N/A, or add link to issue here]

PR Description

The LineChart fill draws using intervals to avoid
memory issues, but with a larger data set and many
different (darker) colors Android does not draw the
drawable all the way to the edge of the interval.
This makes it look like there are spaces between the fill.
Draw a little beyond the existing interval so there are no gaps.

Here is what it looks like before my change, look closely at the white vertical lines at ~1/5 ~3/5 ~4/5 of the way across the X-axis.
fill issue

The same color with the fix no longer has gaps.
fill fixed

The LineChart fill draws using intervals to avoid
memory issues, but with a larger data set and many
different (darker) colors Android does not draw the
drawable all the way to the edge of the interval.
This makes it look like there are spaces between the fill.
Draw a little beyond the existing interval so there are no gaps.
hannesa2 pushed a commit to AppDevNext/AndroidChart that referenced this pull request Apr 2, 2022
The LineChart fill draws using intervals to avoid
memory issues, but with a larger data set and many
different (darker) colors Android does not draw the
drawable all the way to the edge of the interval.
This makes it look like there are spaces between the fill.
Draw a little beyond the existing interval so there are no gaps.

PhilJay#5284
@hannesa2
Copy link
Contributor

hannesa2 commented Apr 2, 2022

@giantramen
Copy link
Author

@hannesa2 There's actually an issue with this when the fill color isn't fully opaque so you probably want to remove that.
Up for suggestions on how to fix this issue for the non-opaque cases, for my use case, we can guard around it at the client-side.
image

@hannesa2
Copy link
Contributor

hannesa2 commented Apr 7, 2022

so you probably want to remove that.

What should I do ? If it's related to my fork, then let's continue there

@Paget96
Copy link

Paget96 commented Dec 11, 2022

I really like this library and using it in my apps, I would like to call people to continue with this awesome thing. I have forked the repo and started working on it! So I am ready as well to accept pull requests, I'll notify other people from here as well!
Would be more than happy if we continue with this awesome project.

Code is full kotlin now!

Make your pull requests here:
https://github.com/Paget96/MPAndroidChart

Only do it for larger sets so we can still use opacity on smaller datasets.
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

Successfully merging this pull request may close these issues.

None yet

3 participants