Skip to content

Fix heatmap brick generation edge cases #651

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

Merged
merged 8 commits into from
Jun 20, 2016
Merged

Fix heatmap brick generation edge cases #651

merged 8 commits into from
Jun 20, 2016

Conversation

etpinard
Copy link
Contributor

fixes #605

and also the case where x or y is set to [] for heatmap and contour traces.

This PR also adds a toBeClose2DArray custom jasmine matcher, which is convenient to assert 2D arrays like heatmap and contour z.

@etpinard etpinard added bug something broken status: reviewable labels Jun 15, 2016
@@ -12,7 +12,10 @@ module.exports = {
return Math.abs(expected[i] - element) < precision;
});

var passed = tested.indexOf(false) < 0;
var passed = (
expected.length === actual.length &&
Copy link
Contributor Author

@etpinard etpinard Jun 15, 2016

Choose a reason for hiding this comment

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

toBeCloseArray loops over the actual array which led to false positive assertions when the expected array is longer than the actual array.

The patch fixes this problem.

@etpinard
Copy link
Contributor Author

etpinard commented Jun 15, 2016

More clearly, test cases:

were failing before b913a5b .

@etpinard etpinard merged commit c709f63 into master Jun 20, 2016
@etpinard etpinard deleted the heatmap-1-xy branch June 20, 2016 18:57
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.

Heatmap crashes with d3 errors when plotting with x-axis and y-axis traces of single element arrays
1 participant