-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support hovertemplate on hoveron: fills #6121
base: master
Are you sure you want to change the base?
Conversation
Scatter trace currently doesn't hovertemplate on hoveron: fills. Change this to allow hovertemplate on fills when mode=='lines'
@@ -76,7 +76,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout | |||
dfltHoverOn.push('fills'); | |||
} | |||
coerce('hoveron', dfltHoverOn.join('+') || 'points'); | |||
if(traceOut.hoveron !== 'fills') coerce('hovertemplate'); | |||
coerce('hovertemplate', false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could oossibly use
coerce('hovertemplate', false); | |
coerce('hovertemplate'); |
so that hovertemplate
defaults to blank string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we keep the initial if statement and just add a condition for lines mode
?
if(traceOut.hoveron !== 'fills' || traceOut.mode === 'lines') coerce('hovertemplate');
@fredricj Are you interested in completing this PR? |
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 FYI - I added this PR to our |
Scatter trace currently doesn't hovertemplate on hoveron: fills. Change this to allow hovertemplate on fills when mode=='lines'