alpha component in the legend
- Dominant language
- Swift
- Stars
- 28k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
I am charting about 20,000 data points in a scatter chart. To draw these nicely without it becoming a solid blob of color I'm using a low alpha component around 0.18. Then as points stack the color deepens and you get a very good chart out of it. Everything works fine for that.
The Legend however pulls its colors directly from the datasets. That would make sense as long as someone is not doing the technique I am doing. With 20,000 points and low alpha, when the single square is added to the Legend the low alpha makes it hard to see and depending on the color, not at all.
There is no easy way to configure and change this, as there is no interface for it that I am aware of. Suggestions are to add a flag where the user can tell it to use alpha or not when drawing the legend.
Or just strip alpha entirely in the init()
Instead of:
self.formColor = formColor
This gives better results:
self.formColor = formColor?.withAlphaComponent(1)
Contributor guide
Assessment
This issue has not been assessed yet.