plotly / plotly/plotly.R

Plot does not show hoverinfo for first data point when default hovermode or set to 'closest'

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

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

主要言語
R
スター
2.7k
フォーク
641
PR マージ指標
30日以内にマージされた PR はありません

説明

As written in the title, the hoverinfo for the first (bottom left) data point when layout.hovermode= 'closest' or kept as default does not appear.

# call library
library(plotly)

# reset fig
fig <- NULL

# add an extra line to check behavior on right hand side of graph
cars_one_extra_line <- rbind(cars,c(25,90))

# plot
fig <- plot_ly(cars_one_extra_line)
fig <- fig %>% add_trace(x = ~speed, 
                         y = ~dist, 
                         color = ~dist,
                         colors = 'RdBu',
                         type = 'scatter',
                         mode = 'markers')
fig <- fig %>% layout(hovermode = "closest") 
fig

This is shown in the screenshot below. If the cursor is moved to the point above, the hoverinfo appears.
Screen Shot 2020-08-04 at 20 15 37

In an effort to understand the behavior, I also tried other tags. Strangely, the hovermode = 'y' also seems to have a weird behavior. Things to note are the following:

  • text is tilted,
  • text is sometimes obscured beyond the viewing frame (not shown in this example but does occur in certain cases),
  • text is sometimes shown twice but in two places,
  • y axis position is not always shown (for points at the top and bottom of the chart)

Screen Shot 2020-08-04 at 20 13 14
Screen Shot 2020-08-04 at 20 13 03

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

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

はじめの一歩

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

調査の方向性

plot_ly、散布マーカー、および hovermode を "closest" または "y" に設定して、提供された R の再現コードを実行し、hover の欠落および不正な動作を確認します。R パッケージとそのインタラクティブなグラフ出力で使用される hover のレンダリングパスを追跡します。完了の条件は、最初の点に hoverinfo が表示され、報告されている hovermode のケースが、クリッピング、重複、軸位置の欠落なしに一貫してレンダリングされることです。

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

評価

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

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

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