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

Plotly.react #2341

Merged
merged 40 commits into from
Feb 9, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
54b6969
Plotly.react
alexcjohnson Feb 2, 2018
aab4f11
remove flagAxForDelete from _restyle
alexcjohnson Feb 6, 2018
45c56b0
allow 0 in pushUnique
alexcjohnson Feb 7, 2018
e58b74d
test Plotly.react with component arrays
alexcjohnson Feb 7, 2018
1074804
_skipSD -> _skipDefaults
alexcjohnson Feb 7, 2018
0548db3
test of polar toggle staticPlot
alexcjohnson Feb 7, 2018
698fa4f
multiline if statements for better debugging
alexcjohnson Feb 7, 2018
3c56243
only add _private attrs to legend after supplyDefaults
alexcjohnson Feb 7, 2018
f01bab9
cleanData should modify textposition in place
alexcjohnson Feb 7, 2018
2fbd97c
don't slice uneven arrays in scatter and related traces
alexcjohnson Feb 7, 2018
f873b26
stop slicing and generating fake arrays in scatter3d and surface defa…
alexcjohnson Feb 7, 2018
5aaa0df
remove old obsolete exponentformat/showexponent fallback
alexcjohnson Feb 7, 2018
7a3b075
cleaner handling of bin defaults
alexcjohnson Feb 7, 2018
5814642
test_dashboard: highlight the displayed mock in search results
alexcjohnson Feb 8, 2018
8fbe06e
store slider & updatemenu dimensions in _private attrs
alexcjohnson Feb 8, 2018
afc05c9
stop slicing data arrays in scattergeo
alexcjohnson Feb 8, 2018
898c39d
hacky handling for reshaped arrays in Plotly.react
alexcjohnson Feb 8, 2018
e9270fc
handle transforms in Plotly.react - by looking at _fullInput
alexcjohnson Feb 8, 2018
414a9b8
clean up carpet pushing stuff back to _fullTrace late
alexcjohnson Feb 8, 2018
e982ca1
annotatinons3d pdata -> _pdata
alexcjohnson Feb 8, 2018
b856ad8
fix for 3d scenes modifying axes range to linear
alexcjohnson Feb 8, 2018
88ad7f2
test a bunch of mocks for noop react redraws
alexcjohnson Feb 8, 2018
ade3cca
review comments - :hocho: commented-out code, comment on cleanData
alexcjohnson Feb 8, 2018
4b98be6
fixes for mapbox with Plotly.react
alexcjohnson Feb 8, 2018
3178b2e
update polar for Plotly.react compatibility
alexcjohnson Feb 8, 2018
564dff6
stop filling new [] in pie defaults
alexcjohnson Feb 8, 2018
be4932d
fix bugs in rangeslider with explicit range and relayout
alexcjohnson Feb 8, 2018
0752aa5
clean up rangeselector for Plotly.react
alexcjohnson Feb 8, 2018
9ba4be9
update scatterternary for Plotly.react
alexcjohnson Feb 8, 2018
9795b69
avoid NaN in (un)selected.marker.opacity
alexcjohnson Feb 8, 2018
57c7d6c
fix for transformed histograms to give consistent _fullInput
alexcjohnson Feb 8, 2018
3a11062
more complete diffing of config
alexcjohnson Feb 8, 2018
896471c
update scattergeo test
alexcjohnson Feb 8, 2018
e12ce1b
wider acceptance range for toimage test
alexcjohnson Feb 8, 2018
46c6642
more complete set of Plotly.react noop mocks to test
alexcjohnson Feb 8, 2018
4197c32
lint
alexcjohnson Feb 8, 2018
f9d6151
fix scattergl uneven array handling
alexcjohnson Feb 9, 2018
c8a07e8
updated gl3d_ribbons mock
alexcjohnson Feb 9, 2018
2a7d640
reset package-lock to master
alexcjohnson Feb 9, 2018
5d6a4a0
get the right _xlength for surface if x is 2D
alexcjohnson Feb 9, 2018
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
2 changes: 1 addition & 1 deletion src/traces/surface/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ proto.update = function(data) {
yaxis = sceneLayout.yaxis,
zaxis = sceneLayout.zaxis,
scaleFactor = scene.dataScale,
xlen = data._xlength,
xlen = z[0].length,
ylen = data._ylength,
coords = [
ndarray(new Float32Array(xlen * ylen), [xlen, ylen]),
Expand Down
8 changes: 4 additions & 4 deletions src/traces/surface/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
return;
}

traceOut._xlength = z[0].length;
traceOut._ylength = z.length;

coerce('x');
var x = coerce('x');
coerce('y');

traceOut._xlength = (Array.isArray(x) && Array.isArray(x[0])) ? z.length : z[0].length;
traceOut._ylength = z.length;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

_xlength and _ylength are used in two places, to try and describe how much of each array to use - one in surface/convert (only for the surface type) and again in gl3d/scene (for all 3d types). The two do things in different ways, and especially since surface can use x/y arrays of either 1 or 2 dimensions, they weren't getting things right. I was trying to do better at handling mismatched arrays but this at least gets it right again for arrays of the correct length (and brings back the original gl3d_ribbons mock), and I've added an item for surface to #2353 to explore the mismatched cases more fully.


var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
handleCalendarDefaults(traceIn, traceOut, ['x', 'y', 'z'], layout);

Expand Down
Binary file modified test/image/baselines/gl3d_ribbons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.