Skip to content
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

Hovertemplate for box/violin points #3685

Merged
merged 2 commits into from
Mar 26, 2019
Merged

Conversation

etpinard
Copy link
Contributor

Slipping this in 1.46.0.

This PR first fixes an unreported bug for scatter traces with hoveron: 'points+fills' and then adds hovertemplate support for box/violin points. Please note that hovertemplate has no effect on the box/violin mean/q1/q3/kde etc labels. This part will remain unresolved until we can spec the API.

cc @plotly/plotly_js and @nicolaskruchten

.then(function() { _hoverNatural(gd, 180, 200); })
.then(function() {
assertHoverLabelContent({
nums: 'trace 1',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before the fix, this used to show '%{x} | %{y}', that is the raw hover template string.

@antoinerg
Copy link
Contributor

This PR introduces a first-level attribute hovertemplate that applies only to points. This seems like a reasonable default and it shouldn't be a problem in the future as I think our next API will have second-level (or higher) attributes hovertemplate for the other elements.

Thanks for the addition @etpinard ! 💃

@etpinard etpinard merged commit 7b2946a into master Mar 26, 2019
@etpinard etpinard deleted the box-violin-pts-hovertemplate branch March 26, 2019 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants