pixlet icon indicating copy to clipboard operation
pixlet copied to clipboard

Support stacked Plots

Open elyscape opened this issue 2 years ago • 5 comments

Currently, if you put multiple Plots in a Stack, the top one completely obscures the ones beneath it. It would be nice if there was an attribute you could set that would cause it make the background transparent, so that you could effectively draw a chart with multiple lines. This would probably be incompatible with setting fill_color or fill_color_inverted on the Plots higher in the stack unless an alpha component were to be specified for those fields.

elyscape avatar Aug 25 '22 23:08 elyscape

Actually, to generalize this: it would be nice if Plot supported a transparent background so that you could put any content behind it.

elyscape avatar Aug 25 '22 23:08 elyscape

I think you mean for the line color to be transparent like the fill is? I think that has been a long requested feature. The line colors do accept rgba colors, I just can't remember if they actually get changed or just start stacking as it's been awhile since I've used the plot feature and can't remember if the go code actually switched the line color to allow for the alpha to actually be used.

rs7q5 avatar Aug 27 '22 20:08 rs7q5

I mean the plot background. Right now, if you try to stack two plots, only the second plot is displayed.

elyscape avatar Aug 27 '22 20:08 elyscape

I have stacked two line plots before, so I'm not sure exactly what you are talking about. I did not have them filled though. did you set a plot background color? The fill color should accept a transparency too.

rs7q5 avatar Aug 27 '22 22:08 rs7q5

If you are talking about the fill overlapping when stacking plots, yeah it's annoying I wish it blended the colors or just overlay them.

I know it does it with Text, which is why I wish it did it with plots too. I have looked at it a while back but I don't think the change is necessarily trivial (as you mentioned in the original post), but I know it overlaps with render.Text and transparency.

rs7q5 avatar Aug 27 '22 23:08 rs7q5