plotly / plotly/plotly.R

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

Abierto
#1,833 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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

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

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Ejecute la reproducción de R proporcionada con plot_ly, marcadores de dispersión y hovermode establecido en "closest" o "y" para confirmar el comportamiento de hover ausente y mal formado. Rastree la ruta de renderizado de hover utilizada por el paquete de R y su salida de gráfico interactivo; se considera completado cuando el primer punto muestra hoverinfo y los casos de hovermode indicados se renderizan de forma coherente, sin recortes, duplicaciones ni posiciones de eje ausentes.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
r
Área
data-visualization, frontend
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
38/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.