Skip to content

Support hovertemplate on hoveron: fills#6121

Open
fredricj wants to merge 6 commits into
plotly:masterfrom
fredricj:scatter-hoveron-fills
Open

Support hovertemplate on hoveron: fills#6121
fredricj wants to merge 6 commits into
plotly:masterfrom
fredricj:scatter-hoveron-fills

Conversation

@fredricj

Copy link
Copy Markdown

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

Scatter trace currently doesn't hovertemplate on hoveron: fills. Change this to allow hovertemplate on fills when mode=='lines'
Comment thread src/traces/scatter/hover.js
Comment thread src/traces/scatter/hover.js Outdated
Comment thread src/traces/scatter/hover.js Outdated
@archmoj archmoj added status: reviewable community community contribution feature something new labels Mar 10, 2022
@archmoj

archmoj commented Mar 23, 2022

Copy link
Copy Markdown
Contributor

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!

Comment thread src/traces/scatter/defaults.js Outdated
@archmoj

archmoj commented Jul 13, 2024

Copy link
Copy Markdown
Contributor

@fredricj Are you interested in completing this PR?

@archmoj archmoj modified the milestone: v2.34.0 Jul 13, 2024
@fredricj

Copy link
Copy Markdown
Author

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.

@archmoj archmoj added this to the v2.35.0 milestone Jul 19, 2024
@archmoj

archmoj commented Jul 19, 2024

Copy link
Copy Markdown
Contributor

@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!

@gvwilson gvwilson removed their assignment Aug 2, 2024
@gvwilson gvwilson added P2 considered for next cycle and removed status: has TODOs labels Aug 8, 2024
@archmoj archmoj modified the milestones: v2.35.0, v2.36.0 Aug 22, 2024
@archmoj archmoj removed this from the v2.36.0 milestone Oct 22, 2024
@fredricj

fredricj commented Mar 4, 2025

Copy link
Copy Markdown
Author

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.

@gvwilson gvwilson requested a review from marthacryan March 4, 2025 16:06
@gvwilson

gvwilson commented Mar 4, 2025

Copy link
Copy Markdown
Contributor

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

@gvwilson gvwilson requested review from camdecoster and removed request for marthacryan October 10, 2025 12:14
@gvwilson

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community community contribution feature something new P2 considered for next cycle

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants