plotly / plotly/plotly.js

Add an option to set the opacity of markers in the legend

オープン
#7,208 コメント 2 件 リアクション 4 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

feature P3
主要言語
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;
}

👇 CodePen for Testing

image

Related posts:

Thank you for maintaining one of the best DataViz libraries! 👍

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

リンクされた CodePen を使用して、plotly.js で低い不透明度の散布図の凡例マーカーを再現し、.legendpoints .scatterpts ワークアラウンドの背後にある凡例マーカーの挙動を調査します。値によって凡例マーカーの不透明度をトレースの不透明度とは独立して制御するオプションを定義し、その後、凡例の外観とトレースのレンダリングの両方が正しいままであることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
data-visualization
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。