When calling on geom_area tooltip activates when hovering over line, not area
まだ誰も着手していません。
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Calling ggplotly on ggplot invoking geom_area results in a plot in which the tooltip activates when hovering over the "lines" separating the areas. I would have expected the tooltip to activate when hovered over the filled area.
Here is some reprex
library("ggplot2")
library("plotly")
#create the data
data <- data.frame('year' = rep(1981:2020, 2),
"type" = rep(c("a", "b"), 40),
"value" = runif(80))
#Generate the plot
ggplotly(
ggplot(data,
aes(x = year, y = value, fill = type)) +
geom_area(col = "grey", size = 0.5) #set the line col so that you can see the activation when close to the line
)
I don't see any open or closed issues on this. Online, I only see this solution: https://stackoverflow.com/questions/47331323/ggplotly-and-geom-area-display-informations-when-hovering-over-an-area-not-a, which seems convoluted.
Regardless of that solution, I would still assume the expected behavior for geom_area is for the tooltip to activate over the area, not the line.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、提供された reprex を R、ggplot2、plotly で実行し、その後、geom_area のホバー動作について ggplotly 変換を調べます。塗りつぶされた領域にホバーしたときにツールチップが有効になり、領域を分ける線上でのみ有効になるのではない状態になれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- r
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100