enable tonexty without fallback to tozeroy
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 18.3k
- フォーク
- 2k
- 平均マージ
- 2日 12時間
- マージ済み PR(30日)
- 28
説明
In our use case, we are plotting quantiles of a data set, with lower and upper bound as well as the median. For convenience, we need to fill in the area between the upper and lower bound shown.
The way we have solved this is by setting fill_type=tonexty on all traces and fill_color=gray on the top four traces, but fill_color=None on the bottom trace.
It looks like this:

The problem is if a user disables the bottom trace, the tonexty fill of the second-to-last trace falls back to tozeroy:

This makes no sense in our case. The expected/intended behavior is:

We have tried/considered several methods:
- Creating a stackgroup; this does allow a fill 'inside' the group only, but requires the trace values to be stacked, which they fundamentally aren't; hiding a trace in that case moves the traces above, which is incorrect.
- Disabling the trace toggle; this hides the problem of course, but it also disables a useful feature
- Dynamically changing the
fill_colors when a trace is hidden; this might work, but I can't find an event to hook into, and since we are using Dash, doing this kind of hacking between Python and clientside callbacks is nontrivial at best.
The best solution would be a fill_type that fills to next but falls back to no fill.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、issue に記載されている quantile-trace の例を再現し、直前の trace が非表示の場合に fill_type=tonexty がどのように動作するかを確認します。既存の Plotly.js の fill の動作を調査し、塗りつぶしなしのフォールバックをどのように表現すべきかを判断します。非表示の trace のケースで、tozeroy にフォールバックせず、残りの境界間の領域が保持されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- data-visualization
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100