gravity-ui / yagr

Yet another graph renderer
https://yagr.tech
MIT License
102 stars 7 forks source link

Legend icon visibility for area graphs with transparent colors #231

Open jamel opened 5 days ago

jamel commented 5 days ago

When rendering area graphs with transparency enabled for colors, the legend icons become unreadable. This is because the transparent fill colors used for the areas are directly applied to the legend icons, reducing their visibility and making it difficult to distinguish between series.

Below is an example illustrating the problem. Notice how the icons for "Series 5" and "Series 4" are particularly hard to see:

bad

A better approach would be to use the lineColor property for the legend icons when area graph is rendered. This way, the icons remain clear and visually distinct.

good

Would it be possible to implement this change or provide an alternative way to address this issue? Let me know what you think.