Add an option to set the opacity of markers in the legend
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 18.3k
- Fork
- 2k
- Merge medio
- 2g 12h
- PR unite (30g)
- 28
Descrizione
Can you kindly consider adding an option to set the opacity of legend markers? Currently, the opacities of the legend's markers are tied to the opacity values of the traces.
Plotly Version
plotly.js v2.35.2
Some scatter plots use a very low opacity (<0.10) to display the concentration of overlapping data points.
👇 This can result in imperceptible marker colors in the legend, as shown below:
👇 Feature request: add an option to set the legend marker opacity
I used a workaround to manually set the opacity of the scatterpts class using CSS.
/* current workaround */
.legendpoints .scatterpts {
opacity: 1 !important;
}
Related posts:
- Issue: px.scatter_geo opacity changes markers opacity and legend items opacity. Is there a way to change one but not the other?
- Legend marker opacity and spacing
- Configuring the alpha (opacity, transparency) for the items in legend of scatter plot of plotly
Thank you for maintaining one of the best DataViz libraries! 👍
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Usa il CodePen collegato per riprodurre i marker della legenda del grafico a dispersione a bassa opacità in plotly.js e analizza il comportamento dei marker della legenda alla base del workaround .legendpoints .scatterpts. Definisci un’opzione il cui valore controlli l’opacità dei marker della legenda indipendentemente dall’opacità della traccia, quindi verifica che sia l’aspetto della legenda sia il rendering della traccia rimangano corretti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- data-visualization
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100