Add an option to set the opacity of markers in the legend
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 18.3k
- フォーク
- 2k
- 平均マージ
- 2日 12時間
- マージ済み PR(30日)
- 28
説明
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! 👍
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リンクされた CodePen を使用して、plotly.js で低い不透明度の散布図の凡例マーカーを再現し、.legendpoints .scatterpts ワークアラウンドの背後にある凡例マーカーの挙動を調査します。値によって凡例マーカーの不透明度をトレースの不透明度とは独立して制御するオプションを定義し、その後、凡例の外観とトレースのレンダリングの両方が正しいままであることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- data-visualization
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100