Add support for clickable hover text or a per pt onclick attribute
See original GitHub issueUsers can put links inside hover labels, but when user try to click the link, the hover label obviously disappears. So perhaps we could add optional “sticky” hover labels, where you click and the hover label is persistent until you click again?
Defining what sticky means will be tricky. It probably doesn’t apply to every situation. Maybe we could add it as a new layout.hovermode
e.g. 'hovermode: 'sticky'
.
So, maybe instead we could define a linkonclick
attribute e.g. linkonclick: ['https://plot.ly/~empet/101', 'https://plot.ly', /* ... one link per data pt */]
that way clicking on a data pt would open the link instead of hovering on the data pt -> move mouse over link in hover label -> click on it.
cc @jackparmer
Issue Analytics
- State:
- Created 7 years ago
- Reactions:21
- Comments:31 (8 by maintainers)
Top Results From Across the Web
Hover on Clickable - javascript - Stack Overflow
I add one more class for your header text to control toggle effect. And add effect like clickable on it. .clickable-header{ cursor: pointer;...
Read more >HTML onclick Attribute - W3Schools
The onclick attribute fires on a mouse click on the element. Applies to. The onclick attribute is part of the Event Attributes, and...
Read more >fancybox3 · Documentation
fancybox is designed to display images, video, iframes and any HTML content. For your convenience, there is a built in support for inline...
Read more >Handling Hover, Focus, and Other States - Tailwind CSS
Using utilities to style elements on hover, focus, and more. Every utility class in Tailwind can be applied conditionally by adding a modifier...
Read more >Hover Box on Mobile mode | Velo by Wix
How can I write a code for the mobile version, so if you tap on the "skill" a text box pops up with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jackparmer I think clicking on the marker itself would be ideal to toggle the stickiness of the hover tag.
+1 for utility
looks like this is still open? any updates?