[FEATURE]: Freeze hovertext on click
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 35/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- javascript
- Domaine
- data-visualization
Piste de recherche
Commencez par suivre Plotly.Fx.hover et le callback interne qui déplace le hovertext avec le curseur. Examinez les issues associées #7578 et #998 ainsi que le prototype D3.js lié. La tâche sera considérée comme terminée lorsqu’un clic figera l’emplacement actuel du hovertext, qu’un second clic rétablira le mouvement du curseur et que le hover programmatique restera utilisable.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- JavaScript
- Étoiles
- 18.3k
- Forks
- 2k
- Merge moyen
- 2 j 12 h
- PR mergées (30 j)
- 28
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de plotly/plotly.js
-
chore P3 plotly-internal size: 3 task
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
-
bug P2 size: 1
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
plotly/plotly.js#8057 · 3 commentaires · 1 personne assignée ·
-
chore P1 plotly-internal size: 1 task
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
-
chore P3 plotly-internal size: 1 task
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
Toutes les issues de plotly/plotly.js
Issues similaires
-
bot:ai-assisted component:compact-js status:untriaged
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
midnightntwrk/midnight-sdk#403 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 92/100
-
Difficulté 1/5 1-3 heures Accessibilité débutants 86/100
DavidAnson/markdownlint-cli2#940 ·
-
documentation
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
Difficulté 2/5 1-3 heures Accessibilité débutants 90/100