Adding layers makes tooltips disappear
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- javascript, r
- Bereich
- data-visualization
Rechercherichtung
Führe zunächst das bereitgestellte ggplotly-reproduzierbare Beispiel aus und vergleiche das Hover-Verhalten in der Nähe und in größerer Entfernung von der Staatsgrenze. Verfolge, wie geschichtete Polygon- und Pfad-Traces die Tooltip-Auswahl behandeln; als erledigt gilt die Aufgabe, wenn Tooltips mit County-Namen in der Nähe von Grenzen verfügbar bleiben, ohne den vorgeschlagenen Workaround zu erfordern. Im Issue wird weder eine Datei noch ein Test genannt, daher erfordert das Auffinden des relevanten Hover-Codes und das Hinzufügen einer Regressionstestabdeckung Vertrautheit mit dem Projekt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Hi there,
I'm experiencing the same issue as @borenstein, referenced here: Adding layer makes tool tips disappear. Someone asked @borenstein to post the issue here but I didn't see a record of it. Here's a shorter reproducible example and summary; please note their solution (comparing data on hover) doesn't work in my use case (not shown here).
I want to create a plot where users can hover over a map and a tooltip for a single layer appears, for example, showing the names of US counties, with state boundaries overlaid on the map. If your mouse is "far" from a state boundary, the tooltip appears. However, if you are "close" (e.g., southeastern edge of map), the tooltip does not appear.
I've tried identifying the traces that contain parts of my plot that I don't want to show tooltips for - as in these stack overflow posts:
-
ggplotly - only return tooltip hover text on certain geom objects
-
Disable hover information for a specific layer (geom) of plotly
But, it doesn't work.
library(plotly)
library(tidyverse)
### New England: *sometimes* shows tool tips
new_england <- c("maine", "new hampshire", "vermont", "massachusetts", "connecticut", "rhode island")
b <- ggplot2::map_data("state") %>%
filter(region %in% new_england)
a <- data.frame(group = seq(3085), val = rnorm(3085)) %>%
left_join(ggplot2::map_data("county"), by = "group") %>%
filter(region %in% new_england)
p <- ggplot(a, aes(long, lat, group = group)) +
geom_polygon(aes(fill = val, text = subregion)) +
geom_path(data = b, color = "black")
ggplotly(p, tooltip="text")
Tagging @MountainCedar so they know I've filed an issue about this.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 18.4k
- Forks
- 2k
- Ø Merge
- 1 T. 21 Std.
- Gemergte PRs (30 T.)
- 18
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus plotly/plotly.js
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
chore P3 plotly-internal size: 3 task
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
plotly/plotly.js#8064 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
chore P1 plotly-internal size: 1 task
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
chore P3 plotly-internal size: 1 task
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
plotly/plotly.js#7648 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in plotly/plotly.js
Ähnliche Issues
-
Edit: RTE News LogoOffencheck:failed logos:edit
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
iptv-org/database#36354 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 4 Tagen
-
agentic-workflows documentation workflow-editor
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
githubnext/gh-aw-workshop#4139 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
CircuitVerse/CircuitVerse#7967 · 1 Kommentar · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
CopilotKit/aimock#491 ·
Maintainer antworten meist innerhalb von 1 Tag
-
cvss-severity:high devguard l3montree-cybersecurity/.../devguard-documentation pkg:devguard/l3montree-c.../devguard-documentation risk:low state:open
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
l3montree-dev/devguard-documentation#338 · 1 Kommentar ·