Skip to content

Carpet plot rebase #1595

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 23 commits into from
Apr 17, 2017
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
eee837f
Add ensure array lib function to allocate/resize
rreusser Apr 13, 2017
5a0b788
Add axis cartesian axis visibility option
rreusser Apr 13, 2017
89e095e
Add measureText function to drawing
rreusser Apr 13, 2017
e1a0417
Tweak showscale to allow unset (instead of strictly false)
rreusser Apr 13, 2017
620cd43
Contour plot lines to use non-scaling stroke
rreusser Apr 13, 2017
728a6f4
Genericize heatmap xyz variable names
rreusser Apr 13, 2017
c2994e7
More carefully track legend trace isolation indices
rreusser Apr 13, 2017
fe9850c
Add optional overrides to contour handleStyleDefaults
rreusser Apr 13, 2017
d1f2258
Genericize tolerances in find_all_paths to make way for carpet
rreusser Apr 13, 2017
4bcf438
Add flag to disable scatter marker culling (needed for carpet)
rreusser Apr 13, 2017
6b896d8
Tweak contour colorscale logic since carpet may set infinities
rreusser Apr 13, 2017
b8c71e1
Add group to plot
rreusser Apr 13, 2017
e4971ef
Carpet plots
rreusser Apr 13, 2017
c98553a
make rreusser's carpet tests pass
etpinard Apr 13, 2017
71b96f3
add a few carpet interaction tests
etpinard Apr 13, 2017
bc1c5c8
:hocho: arraytools dep (sorry @bpostlethwaite)
etpinard Apr 14, 2017
9c76d7a
exit early in axis defaults when visible is false
etpinard Apr 14, 2017
85d6b8a
add axis `visible: false` mock
etpinard Apr 14, 2017
54f092d
implement axis visible in 3D
etpinard Apr 14, 2017
d9cb011
add 3d axis `visible: false` mock
etpinard Apr 14, 2017
f1e8aee
Merge pull request #1596 from plotly/carpet-test-etienne
etpinard Apr 17, 2017
bc0f890
extendFlat -> slice
etpinard Apr 17, 2017
c2a7092
Merge pull request #1599 from plotly/axis-visible-3d
etpinard Apr 17, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/components/drawing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -678,3 +678,13 @@ drawing.setPointGroupScale = function(selection, x, y) {

return scale;
};

drawing.measureText = function(tester, text, font) {
var dummyText = tester.append('text')
.text(text)
.call(drawing.font, font);

var bbox = drawing.bBox(dummyText.node());
dummyText.remove();
return bbox;
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see why you did it this way, but it seems a little redundant, we're making a new node only to clone it in the global tester, then we delete them both. If this ends up getting called a lot, for performance we may want to break up drawing.bBox in such a way that this element can get created in the global tester in the first place.

Copy link
Contributor Author

@rreusser rreusser Apr 13, 2017

Choose a reason for hiding this comment

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

That makes sense. I didn't appreciate that the tester was also cloning it. And to add to that, it looks like I only ended up using it in one place. 😕

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(but on the plus side, to answer your question, at least it doesn't end up getting called a lot 😄 )