Add an option to set the opacity of markers in the legend
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 18.3k
- Forks
- 2k
- Ø Merge
- 2 T. 12 Std.
- Gemergte PRs (30 T.)
- 28
Beschreibung
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! 👍
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Verwende den verlinkten CodePen, um die Scatter-Plot-Legendenmarker mit niedriger Opazität in plotly.js nachzubilden und das Verhalten der Legendenmarker hinter dem .legendpoints .scatterpts-Workaround zu untersuchen. Definiere eine Option, deren Wert die Opazität der Legendenmarker unabhängig von der Opazität des Traces steuert, und überprüfe anschließend, dass sowohl das Erscheinungsbild der Legende als auch das Rendern des Traces korrekt bleiben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- data-visualization
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100