When calling on geom_area tooltip activates when hovering over line, not area
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- R
- Estrellas
- 2.7k
- Forks
- 641
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza ejecutando el reprex proporcionado con R, ggplot2 y plotly; después, inspecciona la conversión de ggplotly para comprobar el comportamiento de hover de geom_area. Se considera terminado cuando el tooltip se activa al pasar el cursor sobre el área rellena, en lugar de hacerlo únicamente a lo largo de las líneas que separan las áreas.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- r
- Área
- data-visualization
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 38/100