plotly / plotly/plotly.js

Resizing pie chart with tooltips misaligns it and throws error

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

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

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

説明

When using a certain combination of settings, pie charts can become misaligned, throwing the error trace.insidetextfont is undefined:
image

To reproduce the bug, first hover over the pie chart to bring up a tooltip, then resize the sandbox window to make the pie chart resize itself. The bug will not appear if you resize the chart without bringing up a tooltip at some point first.

I've created a minimum reproduction here:

<Plot
  data={[
    {
      values: [1, 2],
      type: "pie",
      textinfo: "none",
      hovertext: ["Tooltip 1", "Tooltip 2"]
    }
  ]}
  style={{
    width: "100%"
  }}
  useResizeHandler
/>

Note that you don't need multiple pie sections to get the error (that's for demonstrating the misalignment), but you do appear to need everything else in some form, including, interestingly, textinfo: "none".

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

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

はじめの一歩

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

調査の方向性

リンクされたCodeSandboxの再現環境から始め、次の手順を再現します: 円グラフにマウスを合わせてから、sandboxウィンドウのサイズを変更します。trace.insidetextfont is undefined エラーと位置ずれが説明できるまで、リサイズとツールチップのインタラクションを追跡します; textinfo: "none"hovertext を使用した場合も含め、エラーや視覚的なずれなしにグラフのサイズが変更されれば完了です。

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

評価

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

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

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