plotly.js icon indicating copy to clipboard operation
plotly.js copied to clipboard

Support hovertemplate on hoveron: fills

Open fredricj opened this issue 3 years ago • 4 comments
trafficstars

Scatter trace currently doesn't hovertemplate on hoveron: fills. Change this to allow hovertemplate on fills when mode=='lines'

fredricj avatar Feb 16 '22 09:02 fredricj

Looking good to me. @fredricj could you please add a test here to lock the behavior? Also please create draftlogs/6121_add.md file as described here. Thank you!

archmoj avatar Mar 23 '22 23:03 archmoj

@fredricj Are you interested in completing this PR?

archmoj avatar Jul 13 '24 18:07 archmoj

We are using this feature on our site so getting it in would be great. I did for some reason miss the additional comments you made, but there is also some other issue I discovered when creating tests which I didn't have time to resolve. Right now I don't remember what so I will need to revisit the changes again and see what it was.

fredricj avatar Jul 19 '24 12:07 fredricj

@fredricj FYI - I added this PR to our v2.35.0 milestone. Let's try to make it to the finish line. Please fetch upstream/master and merge it into this branch to have the latest tests updates. Thank you!

archmoj avatar Jul 19 '24 13:07 archmoj

I think I have completed all the tasks for this PR now.

Looking back at how we use it, I wonder if it makes sense to implement hovertemplate for mode=lines. Unless I'm mistaken you can only have one line/polygon per trace, and the text generated from hovertemplate would then be the same wherever you hover in the areas filled and you could then use text/hovertext instead. It still might make sense to include it to get access to the trace data, but I'm not sure on this. The reason we implemented this on our side is (likely) due to the fact we couldnt get hovertext to work. Testing now it seems the "text" option works while "hovertext" does not, which I assume is a bug.

fredricj avatar Mar 04 '25 09:03 fredricj

@marthacryan please have a look at this one when you have time

gvwilson avatar Mar 04 '25 16:03 gvwilson

@camdecoster related to stuff you're currently working on?

gvwilson avatar Oct 10 '25 12:10 gvwilson