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

Add (x|y|z)hoverformat to a number of cartesian and gl3d traces #5563

Merged
merged 8 commits into from
Apr 9, 2021

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Mar 22, 2021

Addressing #5552 by adding (x|y|z)hoverformat to the following traces: scatter, histogram, bar, box, ohlc, candlestick, waterfall, funnel, violin,contour, heatmap, histogram2d, histogram2dcontour, scattergl, splom, scatter3d, mesh3d, surface, isosurface, volume, streamtube and cone.
In addition, it is now possible to use (u|v|w)hoverformat in cone and streamtube.

@plotly/plotly_js

@archmoj archmoj added this to the NEXT milestone Mar 22, 2021
@archmoj archmoj mentioned this pull request Mar 22, 2021
@archmoj archmoj changed the title Add (x|y)hoverformat to a number of cartesian traces Add (x|y)hoverformat to a number of cartesian and gl3d traces Mar 22, 2021
@nicolaskruchten
Copy link
Contributor

Can I get a Pen for this please?

@archmoj
Copy link
Contributor Author

archmoj commented Mar 23, 2021

Can I get a Pen for this please?

scatter codepen

@nicolaskruchten
Copy link
Contributor

Nice, this looks pretty much exactly like what we need :)

@archmoj archmoj changed the title Add (x|y)hoverformat to a number of cartesian and gl3d traces Add (x|y|z)hoverformat to a number of cartesian and gl3d traces Mar 23, 2021
val = ax.d2l(val);
}

return Axes.hoverLabelText(ax, val, hoverformat);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please note that Axes.hoverLabelText was not used in gl3d hover before. And for for log axes it was needed to convert the value.

@@ -388,7 +392,7 @@ proto.render = function() {
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right above here toPrecision(3) is used for formatting norm and divergence instead of Axes.hoverLabelText. Should we keep/change that?

Copy link
Collaborator

Choose a reason for hiding this comment

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

In principle yes but that's extremely low priority IMO

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

💃 Looks great, just the one final case that needs a noDates

@archmoj archmoj merged commit e446743 into master Apr 9, 2021
@archmoj archmoj deleted the xy-hoverformat branch April 9, 2021 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants