[FEATURE]: Freeze hovertext on click
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- javascript
- Bereich
- data-visualization
Rechercherichtung
Beginne damit, Plotly.Fx.hover und den internen Callback nachzuverfolgen, der den hovertext mit dem Cursor bewegt. Sieh dir die zugehörigen Issues #7578 und #998 zusammen mit dem verlinkten D3.js-Prototypen an. Als erledigt gilt die Aufgabe, wenn ein Klick die aktuelle Position des hovertext einfriert, ein zweiter Klick die Cursorbewegung wiederherstellt und programmatic hover weiterhin nutzbar bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Description
I would like to freeze the location of my hovertext with a click callback. Once frozen, the hovertext would no longer follow the cursor, but instead be frozen in place. Another click would release the hovertext, so that it follows the cursor again. I feel like this should be possible by temporarily disabling the internal plotly callback that moves the hovertext with the cursor.
Why should this feature be added?
There are two ways for moving the hovertext. You can move it with the cursor or you can move it programmatically with Plotly.Fx.hover. If you are moving the hovertext programmatically, it is helpful to 'turn off' the cursor interaction, otherwise the user may inadvertently move the hovertext when they move the cursor. In my project, the user is trying to find an 'optimal' location in the heatmap. I think it would be useful if they could make an initial placement of hovertext using the cursor, click to freeze it there, and then make subsequent 'tweeks' to the hovertext location using input fields elsewhere in the app.
Mocks/Designs
This prototype is built from the D3.js heatmap example and a global frozen variable as suggested on StackOverflow. Notice how the tooltip follows the cursor until the user clicks, whereupon the tooltip is frozen at the clicked location until the user clicks again and unfreezes the tooltip. I would be happy to neaten & share the code if that would be helpful.
Notes
- Similar to #7578 but slightly simpler, since I am not seeking to make comparisons between different parts of the same plot.
- Similar to #998 in the sense that I want to persist the hovertext on click.
- There is a workaround for temporarily disabling all mouse interactions on StackOverflow.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 18.3k
- Forks
- 2k
- Ø Merge
- 1 T. 14 Std.
- Gemergte PRs (30 T.)
- 21
Entwicklungsumgebung
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
-
chore P3 plotly-internal size: 3 task
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
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
-
bug infrastructure P2
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in plotly/plotly.js
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 90/100
Maintainer antworten meist innerhalb von 1 Tag
-
Design only Leadership Survey SLFS
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
bcgov/digital-journeys#2293 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
tursodatabase/turso#9405 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Toolkit
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 1 Tag
-
API Bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
ProjectSidewalk/SidewalkWebpage#5556 ·
Maintainer antworten meist innerhalb von 1 Tag