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

chart not rendered when line color is transparent but fill color is blue #5453

Open
john-stemberger opened this issue Apr 24, 2024 · 0 comments

Comments

@john-stemberger
Copy link

Summary
I would like to render a filled area that is blue but I do not want the solid line that forms the upper bounds of the line
E.G:

Screenshot 2024-04-24 at 11 01 47 AM

instead of

Screenshot 2024-04-24 at 11 02 00 AM

To do this I set the DataSet color = transparent with fillColor = red/blue (fillAlpha = 25) but when I do this all the lines and fill regions disappear

Other things I have tried:

  1. setting the lineWidth = 0 but this leaves a very thin line at the top (1 px)
  2. setting the color to have the same alpha as fillAlpha but this leaves a slightly darker line at the top (due to the double painting)

Expected Behavior
filled region should still render if the fill color is not transparent but the color is transparent

Possible Solution
The root of the problem is that the LineChartRendered uses mRenderPaint when drawing the bitmap to the canvas (line 103) and the mRenderPaint color is set to transparent. Doing this results in the entire bitmap being rendered as transparent.

One possible solution would be to pass null instead of mRenderPaint

Device (please complete the following information):

  • Device: Pixel 6 Pro
  • Android Version: API 33
  • Library Version: 3.1.0
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