Plotly.js: Ability to constrain legend background to the legend text

Created on 16 Aug 2019  路  5Comments  路  Source: plotly/plotly.js

In this example, the legend's background color spans the entire width of the graph. It'd be nice if it only spanned the legend text, so that the lines on the right of the graph aren't beneath the semi-transparent white legend background.

image

bug

Most helpful comment

All 5 comments

nice!

Actually, I can't even reproduce this bug on latest, let alone on my dev branch.

My attempt: https://codepen.io/etpinard/pen/OJLXRJa?editors=1010

Which font are you using?

https://codepen.io/etpinard/pen/OJLXRJa?editors=1010 now has a minimal reproducible example.

The problem happens with horizontal legends when legendgroup is set.

How do you get the semi-transparent legend background in your screenshot above?
It's possible to set bgcolor=rgba(x,y,z,128) for example but it's ignored. Only 0 (transparent) or >0 (non-transparent) seem to have any effect.
Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nicolaskruchten picture nicolaskruchten  路  3Comments

n-riesco picture n-riesco  路  3Comments

jonmmease picture jonmmease  路  3Comments

empet picture empet  路  3Comments

bryaan picture bryaan  路  3Comments