plotly / plotly/plotly.js

Boxplot Category Cutoff Issues

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

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

bug P3
主要言語
JavaScript
スター
18.3k
フォーク
2k
平均マージ
2日 12時間
マージ済み PR(30日)
28

説明

Hi--I've got a boxplot I want to show all options of a category array on, regardless of whether data is present. For the purposes of demonstration, let's consider the categories to be days of the week, and it's important that the user be able to see if a day of the week is missing data.

I can use category array to get missing boxes that fall in the middle of the data to appear, but entries at the start / end won't show up:

Image

I can specify a manual range (in terms of the indexes per docs), but then the boxes get cut off awkwardly (same thing would happen on the right if Sunday was present):

Image

This gets even worse when there are multiple traces (in this case a full box from one trace is cut off):

Image

The only way I see to resolve this is to use negative indexes (or extra indexes if the issue is on the right side), but that doesn't seem very future proof (since it bucks the docs), and sits a bit awkwardly.

Image

Is there a better way to do this?

Here's a codepen reproducing the graphs I used here: https://codepen.io/lswainemoore/pen/yyLOdbo.

Thanks for any help!

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

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

はじめの一歩

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

調査の方向性

まず、リンクされた CodePen の平日別 boxplot のケースを再現し、layout.xaxis.range のドキュメントと比較します。カテゴリ軸の範囲が boxplot トレースにどのように適用されるかを追跡し、そのうえで端の切り捨てが想定されたものか、修正すべきものかを判断します。報告されたケースが、煩雑な手動のインデックス調整なしに、明確にサポートされた動作を示せば完了です。

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

評価

技術スタック
javascript
領域
data-visualization
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
28/100

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

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