plotly / plotly/plotly.js

[BUG]: last period label sometimes not drawn when using negative ticklabelindex

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

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

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

説明

Here is an example of the last ticklabel not being drawn. The figure's ticklabelindex is set to -1:

Plotly 3.6.0 (missing last label)
Image

Plotly 3.5.1 (all labels visible)
Image

This is a regression from #7735. In version 3.5.1 ticklabelindex was ignored because no minor ticks were drawn. In version 3.6.0 ticklabelindex is not ignored and so for this figure, the label is expected to be drawn to the left of each major tick (ticklabelindex -1). However, there is no tick to the right of the last period and so that period is not labeled.

Before ticklabelindex, period labels were only ever drawn to the right of a major tick. There is logic in plotly to add a helper tick before the first period, making sure it will be labeled. For negative ticklabelindex, the same logic is required for the period at the end of the axis range.

Codepen: https://codepen.io/toffi-fee/pen/MYJEWLY

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

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

はじめの一歩

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

調査の方向性

リンクされた CodePen を使って不足しているラベルを再現し、3.5.1 と 3.6.0 の動作を比較します。ticklabelindex の処理と最初の期間に対する既存の helper-tick ロジックを追跡し、そのうえで、インデックスが負の場合に、範囲の終端における同等のケースで最後の期間にラベルが付くことを確認します。

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

評価

技術スタック
javascript
領域
data-visualization
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
65/100

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

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