plotly.js icon indicating copy to clipboard operation
plotly.js copied to clipboard

Sunburst leaf opacity does not apply to black text

Open Kully opened this issue 4 years ago • 1 comments

Description of the Issue

When you change the opacity of the leaf for a sunburst trace, text that is supposed to be black (based on the background color of the sector the text belongs to), it does not get affected by the opacity.

See the codepen here: https://codepen.io/Kully/pen/QWdyvJg

image

_Notice that all the text in the leaves of the chart move towards translucent as the opacity knob is turned, except for Cain.

This issue first came up in creating parity tests for the new icicle trace here #5546.

Kully avatar Mar 25 '21 20:03 Kully

If you set paper_bgcolor you'll see it's not just the black text: Screen Shot 2021-03-30 at 12 02 38 PM The right solution to this is to apply the opacity to a group that contains both the shape and the text. If you apply the opacity to the shape and the text separately, then for partial opacity the shape color will start to bleed through the text color, which is not what we want.

alexcjohnson avatar Mar 30 '21 16:03 alexcjohnson