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

extend zhoverformat to 2d histogram types #2127

Merged
merged 3 commits into from
Oct 27, 2017
Merged

Conversation

alexcjohnson
Copy link
Collaborator

#2106 interacted with #2113 - still not quite sure why this didn't show up in the tests before but no matter: two more types need zhoverformat: histogram2d and histogram2dcontour. contourcarpet would need it as well, but it doesn't support hover at all right now.

Used the opportunity to 🌴 a little bit, moving zhoverformat into contour/style_defaults and a new heatmap/style_defaults

Also short-circuited supplyDefaults for histogram2d(contour) with no data, as we do for other trace types.

cc @etpinard

Copy link
Contributor

@etpinard etpinard left a comment

Choose a reason for hiding this comment

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

Fantastic PR 💃

@@ -546,6 +549,121 @@ describe('hover info', function() {
.catch(fail)
.then(done);
});

it('should display correct label content with specified format - contour', function(done) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh wow. Lovely tests!

handleStyleDefaults(traceIn, traceOut, coerce, layout, lineDfltColor, 2);
handleStyleDefaults(traceIn, traceOut, coerce, layout, {
hasHover: false,
defaultColor: lineDfltColor,
Copy link
Contributor

Choose a reason for hiding this comment

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

🔈 Shoutout to @rreusser 's numerous carpet image mocks !

@alexcjohnson alexcjohnson merged commit 4b8b10d into master Oct 27, 2017
@alexcjohnson alexcjohnson deleted the separators-fix branch October 27, 2017 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants