chart not rendered when line color is transparent but fill color is blue
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:
instead of
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:
- setting the lineWidth = 0 but this leaves a very thin line at the top (1 px)
- 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