8000 catcup 8 sept by ErwanMAS · Pull Request #1 · ErwanMAS/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

catcup 8 sept #1

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 31 commits into from
Sep 8, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c87ccb3
Lib.sort
alexcjohnson Aug 24, 2018
1f4898c
fix a bunch of edge cases in cartesian autorange
alexcjohnson Aug 31, 2018
0541cd1
rangemode only applies to linear axes
alexcjohnson Aug 31, 2018
4e71dfa
lint fx/hover
alexcjohnson Aug 31, 2018
2fde3dc
better ordering of trace hoverlabels for matching positions
alexcjohnson Aug 31, 2018
68b489d
continue lines off the edge toward invalid log values
alexcjohnson Sep 1, 2018
be38e93
stacked area charts!
alexcjohnson Sep 1, 2018
8547cf8
test duplicate position stacking
alexcjohnson Sep 4, 2018
eed76c6
comment on log_lines_fills mock structure and purple points
alexcjohnson Sep 4, 2018
13b54da
include chrome/ff versions in Lib.sort docstring
alexcjohnson Sep 4, 2018
2092354
convert some stacked area TODOs to Notes since we've discussed them
alexcjohnson Sep 5, 2018
cb37565
add responsive option to config
antoinerg Sep 5, 2018
069b0e2
fix typo in comment
antoinerg Sep 5, 2018
00d7d22
clarify stacked area groupnorm description
alexcjohnson Sep 5, 2018
08d6736
several improvements to responsive charts
antoinerg Sep 5, 2018
712652b
update comments
antoinerg Sep 5, 2018
d82447a
improve tests for responsive charts
antoinerg Sep 6, 2018
62145e9
fix test to check responsive charts only have one resize handler
antoinerg Sep 6, 2018
ec9ffa1
properly purge plots after each test
antoinerg Sep 8000 6, 2018
11b237d
Merge branch 'master' into stacked-area
alexcjohnson Sep 7, 2018
9fdf522
remove "alwaysSupplyDefaults" so visible: false does not contribute t…
alexcjohnson Sep 7, 2018
1262172
clear responsive handlers in `Plotly.plot` if needed
antoinerg Sep 7, 2018
70fcaad
Merge pull request #2960 from plotly/stacked-area
alexcjohnson Sep 7, 2018
cfc720b
Merge pull request #2974 from plotly/2969-responsive-charts
antoinerg Sep 7, 2018
5d573ee
compare legend width with pushed margins
antoinerg Sep 7, 2018
9d8c158
add baseline for legend_large_margin
antoinerg Sep 7, 2018
dbea03d
simplifies the check to see if legend fits
antoinerg Sep 7, 2018
9070705
Merge pull request #2983 from plotly/2971-legend_large_margin
antoinerg Sep 7, 2018
a6e90cb
sankey fix translateX for subplots
antoinerg Sep 7, 2018
5dcdfb4
sankey add baseline for subplots positioning
antoinerg Sep 7, 2018
ff3c324
Merge pull request #2984 from plotly/2878-sankey-domain-x
antoinerg Sep 7, 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
Prev Previous commit
Next Next commit
remove "alwaysSupplyDefaults" so visible: false does not contribute t…
…o stack config
  • Loading branch information
alexcjohnson committed Sep 7, 2018
commit 9fdf5226430c756a8844847e1f2471e76e60a72c
8 changes: 0 additions & 8 deletions src/plots/plots.js
Original file line number Diff line number Diff line change
Expand Up @@ -1181,14 +1181,6 @@ plots.supplyTraceDefaults = function(traceIn, traceOut, colorIndex, layout, trac

plots.supplyTransformDefaults(traceIn, traceOut, layout);
}
else if(_module && Registry.traceIs(traceOut, 'alwaysSupplyDefaults')) {
// Some types need *something* from supplyDefaults always, even if
// visible: false. Looking at you scatter: stack options even from
// hidden traces can control other traces in the stack.
// These types should bail out ASAP if visible is false.
// But we don't need any other cross-module attrs ^^ in this case.
_module.supplyDefaults(traceIn, traceOut, defaultColor, layout);
}

return traceOut;
};
Expand Down
9 changes: 6 additions & 3 deletions src/traces/scatter/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ module.exports = {
editType: 'calc',
description: [
'Only relevant when `stackgroup` is used, and only the first',
'`orientation` found in the `stackgroup` will be used. Sets the',
'`orientation` found in the `stackgroup` will be used - including',
'if `visible` is *legendonly* but not if it is `false`. Sets the',
'stacking direction. With *v* (*h*), the y (x) values of subsequent',
'traces are added. Also affects the default value of `fill`.'
].join(' ')
Expand All @@ -108,7 +109,8 @@ module.exports = {
editType: 'calc',
description: [
'Only relevant when `stackgroup` is used, and only the first',
'`groupnorm` found in the `stackgroup` will be used.',
'`groupnorm` found in the `stackgroup` will be used - including',
'if `visible` is *legendonly* but not if it is `false`.',
'Sets the normalization for the sum of this `stackgroup`.',
'With *fraction*, the value of each trace at each location is',
'divided by the sum of all trace values at that location.',
Expand All @@ -125,7 +127,8 @@ module.exports = {
editType: 'calc',
description: [
'Only relevant when `stackgroup` is used, and only the first',
'`stackgaps` found in the `stackgroup` will be used.',
'`stackgaps` found in the `stackgroup` will be used - including',
'if `visible` is *legendonly* but not if it is `false`.',
'Determines how we handle locations at which other traces in this',
'group have data but this one does not.',
'With *infer zero* we insert a zero at these locations.',
Expand Down
4 changes: 2 additions & 2 deletions src/traces/scatter/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
}

var stackGroupOpts = handleStackDefaults(traceIn, traceOut, layout, coerce);

var len = handleXYDefaults(traceIn, traceOut, layout, coerce);
if(!len) traceOut.visible = false;

if(!traceOut.visible) return;

var stackGroupOpts = handleStackDefaults(traceIn, traceOut, layout, coerce);

var defaultMode = !stackGroupOpts && (len < constants.PTS_LINESONLY) ?
'lines+markers' : 'lines';
coerce('text');
Expand Down
2 changes: 1 addition & 1 deletion src/traces/scatter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Scatter.name = 'scatter';
Scatter.basePlotModule = require('../../plots/cartesian');
Scatter.categories = [
'cartesian', 'svg', 'symbols', 'errorBarsOK', 'showLegend', 'scatter-like',
'zoomScale', 'alwaysSupplyDefaults'
'zoomScale'
];
Scatter.meta = {
description: [
Expand Down
26 changes: 23 additions & 3 deletions test/jasmine/tests/scatter_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1049,11 +1049,16 @@ describe('stacked area', function() {
var xr = [2, 6];
checkRanges({
x: xr, x2: xr, x3: xr, x4: xr, x5: xr, x6: xr,
y: [0, 4.21], y2: [0, 5.26],
y3: [0, 1.08], y4: [0, 1.08], y5: [0, 105.26], y6: [0, 105.26]
// now we lose the explicit config from the bottom trace,
// which we kept when it was visible: 'legendonly'
y: [0, 4.21], y2: [0, 4.21],
y3: [0, 4.32], y4: [0, 1.08], y5: [0, 105.26], y6: [0, 5.26]
}, 'bottom trace visible: false');

return Plotly.restyle(gd, 'visible', false, [1, 4, 7, 10, 13, 16]);
// put the bottom traces back to legendonly so they still contribute
// config attributes, and hide the middles too
return Plotly.restyle(gd, 'visible', 'legendonly',
[0, 3, 6, 9, 12, 15, 1, 4, 7, 10, 13, 16]);
})
.then(function() {
var xr = [3, 5];
Expand All @@ -1072,6 +1077,21 @@ describe('stacked area', function() {
y: [0, 7.37], y2: [0, 7.37],
y3: [0, 1.08], y4: [0, 1.08], y5: [0, 105.26], y6: [0, 105.26]
}, 'top and bottom showing');

return Plotly.restyle(gd, {x: null, y: null}, [0, 3, 6, 9, 12, 15]);
})
.then(function() {
return Plotly.restyle(gd, 'visible', true, [1, 4, 7, 10, 13, 16]);
})
.then(function() {
var xr = [2, 6];
// an invalid trace (no data) implicitly has visible: false, and is
// equivalent to explicit visible: false in removing stack config.
checkRanges({
x: xr, x2: xr, x3: xr, x4: xr, x5: xr, x6: xr,
y: [0, 4.21], y2: [0, 4.21],
y3: [0, 4.32], y4: [0, 1.08], y5: [0, 105.26], y6: [0, 5.26]
}, 'bottom trace *implicit* visible: false');
})
.catch(failTest)
.then(done);
Expand Down
0