hovertemplate doesn't work for points in boxplots
オープン
まだ誰も着手していません。
bug
plotly.js
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Using hovertemplate on a boxplot breaks the tooltips for data points, it simply doesn't appear at all:

# Using hoverinfo (works)
plot_ly() %>% add_trace(y = 1:10, type = "box", hoverinfo = "y", boxpoints = "all", pointpos = 0)
# Using hovertemplate (doesn't work)
plot_ly() %>% add_trace(y = 1:10, type = "box", hovertemplate = "%{y}", boxpoints = "all", pointpos = 0)
When inspecting the hovertemplate graph using my browser's dev tools I found that this appears in the console when I move the mouse over a data point:
test2.html:1820 Uncaught TypeError: t.replace is not a function
at Object.l.hovertemplateString (test2.html:1820)
at SVGGElement.<anonymous> (test2.html:1820)
at test2.html:1820
at ut (test2.html:1820)
at Array.W.each (test2.html:1820)
at A (test2.html:1820)
at test2.html:1820
at test2.html:1820
at l (test2.html:1820)
at Object.r.throttle (test2.html:1820)
hovertemplate works as expected for other graph types, like e.g.:
plot_ly() %>% add_trace(y = 1:10, type = "bar", hovertemplate = "%{y}")
plotly 4.9.0
R 3.4.4
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
boxpoints と hovertemplate を使った 2 つの R の例を boxplot で再現し、その後、動作する棒グラフの例と比較します。ブラウザーエラーに表示されている hovertemplateString の呼び出しから始めて、boxplot のポイントのホバー経路を追跡します。hovertemplate が boxplot のデータポイントに対して t.replace エラーなしでレンダリングされれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, r
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100