question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for clickable hover text or a per pt onclick attribute

See original GitHub issue

Users 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:open
  • Created 7 years ago
  • Reactions:21
  • Comments:31 (8 by maintainers)

github_iconTop GitHub Comments

25reactions
PaNDanesecommented, Jun 3, 2017

what do you think the right interaction is for allowing a user to select copy paste what is in a hover tag?

@jackparmer I think clicking on the marker itself would be ideal to toggle the stickiness of the hover tag.

  • Click on the marker and the hover tag persists and you can then copy/paste hover tag-text and click on hyperlinks in the hover tag
  • Click on the marker again and the hover tag “unsticks”.

+1 for utility

6reactions
bill10commented, Aug 19, 2019

looks like this is still open? any updates?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found