plotly.js 1.52.1 → 1.52.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.fossa.yml +58 -0
- package/.ignore +3 -0
- package/CHANGELOG.md +21 -0
- package/dist/README.md +25 -25
- package/dist/plot-schema.json +8 -8
- package/dist/plotly-basic.js +187 -54
- package/dist/plotly-basic.min.js +2 -2
- package/dist/plotly-cartesian.js +187 -54
- package/dist/plotly-cartesian.min.js +2 -2
- package/dist/plotly-finance.js +187 -54
- package/dist/plotly-finance.min.js +2 -2
- package/dist/plotly-geo-assets.js +2 -2
- package/dist/plotly-geo.js +168 -49
- package/dist/plotly-geo.min.js +2 -2
- package/dist/plotly-gl2d.js +173 -51
- package/dist/plotly-gl2d.min.js +2 -2
- package/dist/plotly-gl3d.js +668 -449
- package/dist/plotly-gl3d.min.js +2 -2
- package/dist/plotly-mapbox.js +170 -50
- package/dist/plotly-mapbox.min.js +2 -2
- package/dist/plotly-with-meta.js +823 -533
- package/dist/plotly.js +814 -525
- package/dist/plotly.min.js +2 -2
- package/package.json +24 -23
- package/src/assets/geo_assets.js +1 -1
- package/src/components/annotations/attributes.js +1 -1
- package/src/core.js +1 -1
- package/src/lib/index.js +6 -3
- package/src/plot_api/subroutines.js +6 -0
- package/src/plot_api/validate.js +4 -3
- package/src/plots/cartesian/axes.js +6 -2
- package/src/plots/cartesian/constants.js +1 -2
- package/src/plots/cartesian/layout_defaults.js +112 -27
- package/src/plots/gl3d/scene.js +361 -323
- package/src/plots/layout_attributes.js +2 -2
- package/src/plots/mapbox/layers.js +2 -1
- package/src/plots/plots.js +30 -9
- package/src/traces/bar/hover.js +6 -1
- package/src/traces/bar/plot.js +13 -4
- package/src/traces/mesh3d/convert.js +9 -5
- package/src/traces/pie/attributes.js +7 -6
- package/src/traces/treemap/plot.js +2 -0
- package/tasks/test_syntax.js +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plotly.js v1.52.
|
|
2
|
+
* plotly.js v1.52.2
|
|
3
3
|
* Copyright 2012-2020, Plotly, Inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the MIT license
|
|
@@ -69,7 +69,7 @@ var saneTopojson = _dereq_('sane-topojson');
|
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
// package version injected by `npm run preprocess`
|
|
72
|
-
exports.version = '1.52.
|
|
72
|
+
exports.version = '1.52.2';
|
|
73
73
|
|
|
74
74
|
exports.topojson = saneTopojson;
|
|
75
75
|
|
package/dist/plotly-geo.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plotly.js (geo) v1.52.
|
|
2
|
+
* plotly.js (geo) v1.52.2
|
|
3
3
|
* Copyright 2012-2020, Plotly, Inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the MIT license
|
|
@@ -37155,7 +37155,7 @@ exports.svgAttrs = {
|
|
|
37155
37155
|
'use strict';
|
|
37156
37156
|
|
|
37157
37157
|
// package version injected by `npm run preprocess`
|
|
37158
|
-
exports.version = '1.52.
|
|
37158
|
+
exports.version = '1.52.2';
|
|
37159
37159
|
|
|
37160
37160
|
// inject promise polyfill
|
|
37161
37161
|
_dereq_('es6-promise').polyfill();
|
|
@@ -41244,11 +41244,14 @@ lib.templateString = function(string, obj) {
|
|
|
41244
41244
|
var getterCache = {};
|
|
41245
41245
|
|
|
41246
41246
|
return string.replace(lib.TEMPLATE_STRING_REGEX, function(dummy, key) {
|
|
41247
|
+
var v;
|
|
41247
41248
|
if(SIMPLE_PROPERTY_REGEX.test(key)) {
|
|
41248
|
-
|
|
41249
|
+
v = obj[key];
|
|
41250
|
+
} else {
|
|
41251
|
+
getterCache[key] = getterCache[key] || lib.nestedProperty(obj, key).get;
|
|
41252
|
+
v = getterCache[key]();
|
|
41249
41253
|
}
|
|
41250
|
-
|
|
41251
|
-
return getterCache[key]() || '';
|
|
41254
|
+
return lib.isValidTextValue(v) ? v : '';
|
|
41252
41255
|
});
|
|
41253
41256
|
};
|
|
41254
41257
|
|
|
@@ -51468,6 +51471,7 @@ exports.doAutoRangeAndConstraints = function(gd) {
|
|
|
51468
51471
|
var fullLayout = gd._fullLayout;
|
|
51469
51472
|
var axList = Axes.list(gd, '', true);
|
|
51470
51473
|
var matchGroups = fullLayout._axisMatchGroups || [];
|
|
51474
|
+
var axLookup = {};
|
|
51471
51475
|
var ax;
|
|
51472
51476
|
var axRng;
|
|
51473
51477
|
|
|
@@ -51475,6 +51479,7 @@ exports.doAutoRangeAndConstraints = function(gd) {
|
|
|
51475
51479
|
ax = axList[i];
|
|
51476
51480
|
cleanAxisConstraints(gd, ax);
|
|
51477
51481
|
doAutoRange(gd, ax);
|
|
51482
|
+
axLookup[ax._id] = 1;
|
|
51478
51483
|
}
|
|
51479
51484
|
|
|
51480
51485
|
enforceAxisConstraints(gd);
|
|
@@ -51487,6 +51492,10 @@ exports.doAutoRangeAndConstraints = function(gd) {
|
|
|
51487
51492
|
|
|
51488
51493
|
for(id in group) {
|
|
51489
51494
|
ax = Axes.getFromId(gd, id);
|
|
51495
|
+
|
|
51496
|
+
// skip over 'missing' axes which do not pass through doAutoRange
|
|
51497
|
+
if(!axLookup[ax._id]) continue;
|
|
51498
|
+
// if one axis has autorange false, we're done
|
|
51490
51499
|
if(ax.autorange === false) continue groupLoop;
|
|
51491
51500
|
|
|
51492
51501
|
axRng = Lib.simpleMap(ax.range, ax.r2l);
|
|
@@ -52364,13 +52373,14 @@ function crawl(objIn, objOut, schema, list, base, path) {
|
|
|
52364
52373
|
var valOut = objOut[k];
|
|
52365
52374
|
|
|
52366
52375
|
var nestedSchema = getNestedSchema(schema, k);
|
|
52367
|
-
var
|
|
52368
|
-
var
|
|
52376
|
+
var nestedValType = (nestedSchema || {}).valType;
|
|
52377
|
+
var isInfoArray = nestedValType === 'info_array';
|
|
52378
|
+
var isColorscale = nestedValType === 'colorscale';
|
|
52369
52379
|
var items = (nestedSchema || {}).items;
|
|
52370
52380
|
|
|
52371
52381
|
if(!isInSchema(schema, k)) {
|
|
52372
52382
|
list.push(format('schema', base, p));
|
|
52373
|
-
} else if(isPlainObject(valIn) && isPlainObject(valOut)) {
|
|
52383
|
+
} else if(isPlainObject(valIn) && isPlainObject(valOut) && nestedValType !== 'any') {
|
|
52374
52384
|
crawl(valIn, valOut, nestedSchema, list, base, p);
|
|
52375
52385
|
} else if(isInfoArray && isArray(valIn)) {
|
|
52376
52386
|
if(valIn.length > valOut.length) {
|
|
@@ -55175,10 +55185,14 @@ axes.drawOne = function(gd, ax, opts) {
|
|
|
55175
55185
|
var axId = ax._id;
|
|
55176
55186
|
var axLetter = axId.charAt(0);
|
|
55177
55187
|
var counterLetter = axes.counterLetter(axId);
|
|
55178
|
-
var mainLinePosition = ax._mainLinePosition;
|
|
55179
|
-
var mainMirrorPosition = ax._mainMirrorPosition;
|
|
55180
55188
|
var mainPlotinfo = fullLayout._plots[ax._mainSubplot];
|
|
55189
|
+
|
|
55190
|
+
// this happens when updating matched group with 'missing' axes
|
|
55191
|
+
if(!mainPlotinfo) return;
|
|
55192
|
+
|
|
55181
55193
|
var mainAxLayer = mainPlotinfo[axLetter + 'axislayer'];
|
|
55194
|
+
var mainLinePosition = ax._mainLinePosition;
|
|
55195
|
+
var mainMirrorPosition = ax._mainMirrorPosition;
|
|
55182
55196
|
|
|
55183
55197
|
var vals = ax._vals = axes.calcTicks(ax);
|
|
55184
55198
|
|
|
@@ -57137,11 +57151,10 @@ exports.tick0 = function(tick0, axType, calendar, dtick) {
|
|
|
57137
57151
|
*/
|
|
57138
57152
|
|
|
57139
57153
|
'use strict';
|
|
57140
|
-
var counterRegex = _dereq_('../../lib/regex').counter;
|
|
57141
57154
|
|
|
57155
|
+
var counterRegex = _dereq_('../../lib/regex').counter;
|
|
57142
57156
|
|
|
57143
57157
|
module.exports = {
|
|
57144
|
-
|
|
57145
57158
|
idRegex: {
|
|
57146
57159
|
x: counterRegex('x'),
|
|
57147
57160
|
y: counterRegex('y')
|
|
@@ -60331,6 +60344,8 @@ var axisIds = _dereq_('./axis_ids');
|
|
|
60331
60344
|
var id2name = axisIds.id2name;
|
|
60332
60345
|
var name2id = axisIds.name2id;
|
|
60333
60346
|
|
|
60347
|
+
var AX_ID_PATTERN = _dereq_('./constants').AX_ID_PATTERN;
|
|
60348
|
+
|
|
60334
60349
|
var Registry = _dereq_('../../registry');
|
|
60335
60350
|
var traceIs = Registry.traceIs;
|
|
60336
60351
|
var getComponentMethod = Registry.getComponentMethod;
|
|
@@ -60440,7 +60455,28 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
|
|
|
60440
60455
|
|
|
60441
60456
|
var bgColor = Color.combine(plotBgColor, layoutOut.paper_bgcolor);
|
|
60442
60457
|
|
|
60443
|
-
|
|
60458
|
+
// name of single axis (e.g. 'xaxis', 'yaxis2')
|
|
60459
|
+
var axName;
|
|
60460
|
+
// id of single axis (e.g. 'y', 'x5')
|
|
60461
|
+
var axId;
|
|
60462
|
+
// 'x' or 'y'
|
|
60463
|
+
var axLetter;
|
|
60464
|
+
// input layout axis container
|
|
60465
|
+
var axLayoutIn;
|
|
60466
|
+
// full layout axis container
|
|
60467
|
+
var axLayoutOut;
|
|
60468
|
+
|
|
60469
|
+
function newAxLayoutOut() {
|
|
60470
|
+
var traces = ax2traces[axName] || [];
|
|
60471
|
+
axLayoutOut._traceIndices = traces.map(function(t) { return t._expandedIndex; });
|
|
60472
|
+
axLayoutOut._annIndices = [];
|
|
60473
|
+
axLayoutOut._shapeIndices = [];
|
|
60474
|
+
axLayoutOut._imgIndices = [];
|
|
60475
|
+
axLayoutOut._subplotsWith = [];
|
|
60476
|
+
axLayoutOut._counterAxes = [];
|
|
60477
|
+
axLayoutOut._name = axLayoutOut._attr = axName;
|
|
60478
|
+
axLayoutOut._id = axId;
|
|
60479
|
+
}
|
|
60444
60480
|
|
|
60445
60481
|
function coerce(attr, dflt) {
|
|
60446
60482
|
return Lib.coerce(axLayoutIn, axLayoutOut, layoutAttributes, attr, dflt);
|
|
@@ -60454,9 +60490,6 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
|
|
|
60454
60490
|
return (axLetter === 'x') ? yIds : xIds;
|
|
60455
60491
|
}
|
|
60456
60492
|
|
|
60457
|
-
var counterAxes = {x: getCounterAxes('x'), y: getCounterAxes('y')};
|
|
60458
|
-
var allAxisIds = counterAxes.x.concat(counterAxes.y);
|
|
60459
|
-
|
|
60460
60493
|
function getOverlayableAxes(axLetter, axName) {
|
|
60461
60494
|
var list = (axLetter === 'x') ? xNames : yNames;
|
|
60462
60495
|
var out = [];
|
|
@@ -60472,9 +60505,30 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
|
|
|
60472
60505
|
return out;
|
|
60473
60506
|
}
|
|
60474
60507
|
|
|
60508
|
+
// list of available counter axis names
|
|
60509
|
+
var counterAxes = {x: getCounterAxes('x'), y: getCounterAxes('y')};
|
|
60510
|
+
// list of all x AND y axis ids
|
|
60511
|
+
var allAxisIds = counterAxes.x.concat(counterAxes.y);
|
|
60512
|
+
// lookup and list of axis ids that axes in axNames have a reference to,
|
|
60513
|
+
// even though they are missing from allAxisIds
|
|
60514
|
+
var missingMatchedAxisIdsLookup = {};
|
|
60515
|
+
var missingMatchedAxisIds = [];
|
|
60516
|
+
|
|
60517
|
+
// fill in 'missing' axis lookup when an axis is set to match an axis
|
|
60518
|
+
// not part of the allAxisIds list, save axis type so that we can propagate
|
|
60519
|
+
// it to the missing axes
|
|
60520
|
+
function addMissingMatchedAxis() {
|
|
60521
|
+
var matchesIn = axLayoutIn.matches;
|
|
60522
|
+
if(AX_ID_PATTERN.test(matchesIn) && allAxisIds.indexOf(matchesIn) === -1) {
|
|
60523
|
+
missingMatchedAxisIdsLookup[matchesIn] = axLayoutIn.type;
|
|
60524
|
+
missingMatchedAxisIds = Object.keys(missingMatchedAxisIdsLookup);
|
|
60525
|
+
}
|
|
60526
|
+
}
|
|
60527
|
+
|
|
60475
60528
|
// first pass creates the containers, determines types, and handles most of the settings
|
|
60476
60529
|
for(i = 0; i < axNames.length; i++) {
|
|
60477
60530
|
axName = axNames[i];
|
|
60531
|
+
axId = name2id(axName);
|
|
60478
60532
|
axLetter = axName.charAt(0);
|
|
60479
60533
|
|
|
60480
60534
|
if(!Lib.isPlainObject(layoutIn[axName])) {
|
|
@@ -60483,20 +60537,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
|
|
|
60483
60537
|
|
|
60484
60538
|
axLayoutIn = layoutIn[axName];
|
|
60485
60539
|
axLayoutOut = Template.newContainer(layoutOut, axName, axLetter + 'axis');
|
|
60486
|
-
|
|
60487
|
-
var traces = ax2traces[axName] || [];
|
|
60488
|
-
axLayoutOut._traceIndices = traces.map(function(t) { return t._expandedIndex; });
|
|
60489
|
-
axLayoutOut._annIndices = [];
|
|
60490
|
-
axLayoutOut._shapeIndices = [];
|
|
60491
|
-
axLayoutOut._imgIndices = [];
|
|
60492
|
-
axLayoutOut._subplotsWith = [];
|
|
60493
|
-
axLayoutOut._counterAxes = [];
|
|
60494
|
-
|
|
60495
|
-
// set up some private properties
|
|
60496
|
-
axLayoutOut._name = axLayoutOut._attr = axName;
|
|
60497
|
-
var id = axLayoutOut._id = name2id(axName);
|
|
60498
|
-
|
|
60499
|
-
var overlayableAxes = getOverlayableAxes(axLetter, axName);
|
|
60540
|
+
newAxLayoutOut();
|
|
60500
60541
|
|
|
60501
60542
|
var visibleDflt =
|
|
60502
60543
|
(axLetter === 'x' && !xaMustDisplay[axName] && xaMayHide[axName]) ||
|
|
@@ -60514,13 +60555,13 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
|
|
|
60514
60555
|
font: layoutOut.font,
|
|
60515
60556
|
outerTicks: outerTicks[axName],
|
|
60516
60557
|
showGrid: !noGrids[axName],
|
|
60517
|
-
data:
|
|
60558
|
+
data: ax2traces[axName] || [],
|
|
60518
60559
|
bgColor: bgColor,
|
|
60519
60560
|
calendar: layoutOut.calendar,
|
|
60520
60561
|
automargin: true,
|
|
60521
60562
|
visibleDflt: visibleDflt,
|
|
60522
60563
|
reverseDflt: reverseDflt,
|
|
60523
|
-
splomStash: ((layoutOut._splomAxes || {})[axLetter] || {})[
|
|
60564
|
+
splomStash: ((layoutOut._splomAxes || {})[axLetter] || {})[axId]
|
|
60524
60565
|
};
|
|
60525
60566
|
|
|
60526
60567
|
coerce('uirevision', layoutOut.uirevision);
|
|
@@ -60546,12 +60587,63 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
|
|
|
60546
60587
|
handlePositionDefaults(axLayoutIn, axLayoutOut, coerce, {
|
|
60547
60588
|
letter: axLetter,
|
|
60548
60589
|
counterAxes: counterAxes[axLetter],
|
|
60549
|
-
overlayableAxes:
|
|
60590
|
+
overlayableAxes: getOverlayableAxes(axLetter, axName),
|
|
60550
60591
|
grid: layoutOut.grid
|
|
60551
60592
|
});
|
|
60552
60593
|
|
|
60553
60594
|
coerce('title.standoff');
|
|
60554
60595
|
|
|
60596
|
+
addMissingMatchedAxis();
|
|
60597
|
+
|
|
60598
|
+
axLayoutOut._input = axLayoutIn;
|
|
60599
|
+
}
|
|
60600
|
+
|
|
60601
|
+
// coerce the 'missing' axes
|
|
60602
|
+
i = 0;
|
|
60603
|
+
while(i < missingMatchedAxisIds.length) {
|
|
60604
|
+
axId = missingMatchedAxisIds[i++];
|
|
60605
|
+
axName = id2name(axId);
|
|
60606
|
+
axLetter = axName.charAt(0);
|
|
60607
|
+
|
|
60608
|
+
if(!Lib.isPlainObject(layoutIn[axName])) {
|
|
60609
|
+
layoutIn[axName] = {};
|
|
60610
|
+
}
|
|
60611
|
+
|
|
60612
|
+
axLayoutIn = layoutIn[axName];
|
|
60613
|
+
axLayoutOut = Template.newContainer(layoutOut, axName, axLetter + 'axis');
|
|
60614
|
+
newAxLayoutOut();
|
|
60615
|
+
|
|
60616
|
+
var defaultOptions2 = {
|
|
60617
|
+
letter: axLetter,
|
|
60618
|
+
font: layoutOut.font,
|
|
60619
|
+
outerTicks: outerTicks[axName],
|
|
60620
|
+
showGrid: !noGrids[axName],
|
|
60621
|
+
data: [],
|
|
60622
|
+
bgColor: bgColor,
|
|
60623
|
+
calendar: layoutOut.calendar,
|
|
60624
|
+
automargin: true,
|
|
60625
|
+
visibleDflt: false,
|
|
60626
|
+
reverseDflt: false,
|
|
60627
|
+
splomStash: ((layoutOut._splomAxes || {})[axLetter] || {})[axId]
|
|
60628
|
+
};
|
|
60629
|
+
|
|
60630
|
+
coerce('uirevision', layoutOut.uirevision);
|
|
60631
|
+
|
|
60632
|
+
axLayoutOut.type = missingMatchedAxisIdsLookup[axId] || 'linear';
|
|
60633
|
+
|
|
60634
|
+
handleAxisDefaults(axLayoutIn, axLayoutOut, coerce, defaultOptions2, layoutOut);
|
|
60635
|
+
|
|
60636
|
+
handlePositionDefaults(axLayoutIn, axLayoutOut, coerce, {
|
|
60637
|
+
letter: axLetter,
|
|
60638
|
+
counterAxes: counterAxes[axLetter],
|
|
60639
|
+
overlayableAxes: getOverlayableAxes(axLetter, axName),
|
|
60640
|
+
grid: layoutOut.grid
|
|
60641
|
+
});
|
|
60642
|
+
|
|
60643
|
+
coerce('fixedrange');
|
|
60644
|
+
|
|
60645
|
+
addMissingMatchedAxis();
|
|
60646
|
+
|
|
60555
60647
|
axLayoutOut._input = axLayoutIn;
|
|
60556
60648
|
}
|
|
60557
60649
|
|
|
@@ -60602,9 +60694,12 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
|
|
|
60602
60694
|
var constraintGroups = layoutOut._axisConstraintGroups = [];
|
|
60603
60695
|
// similar to _axisConstraintGroups, but for matching axes
|
|
60604
60696
|
var matchGroups = layoutOut._axisMatchGroups = [];
|
|
60697
|
+
// make sure to include 'missing' axes here
|
|
60698
|
+
var allAxisIdsIncludingMissing = allAxisIds.concat(missingMatchedAxisIds);
|
|
60699
|
+
var axNamesIncludingMissing = axNames.concat(Lib.simpleMap(missingMatchedAxisIds, id2name));
|
|
60605
60700
|
|
|
60606
|
-
for(i = 0; i <
|
|
60607
|
-
axName =
|
|
60701
|
+
for(i = 0; i < axNamesIncludingMissing.length; i++) {
|
|
60702
|
+
axName = axNamesIncludingMissing[i];
|
|
60608
60703
|
axLetter = axName.charAt(0);
|
|
60609
60704
|
axLayoutIn = layoutIn[axName];
|
|
60610
60705
|
axLayoutOut = layoutOut[axName];
|
|
@@ -60612,15 +60707,19 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
|
|
|
60612
60707
|
var scaleanchorDflt;
|
|
60613
60708
|
if(axLetter === 'y' && !axLayoutIn.hasOwnProperty('scaleanchor') && axHasImage[axName]) {
|
|
60614
60709
|
scaleanchorDflt = axLayoutOut.anchor;
|
|
60615
|
-
} else {
|
|
60710
|
+
} else {
|
|
60711
|
+
scaleanchorDflt = undefined;
|
|
60712
|
+
}
|
|
60616
60713
|
|
|
60617
60714
|
var constrainDflt;
|
|
60618
60715
|
if(!axLayoutIn.hasOwnProperty('constrain') && axHasImage[axName]) {
|
|
60619
60716
|
constrainDflt = 'domain';
|
|
60620
|
-
} else {
|
|
60717
|
+
} else {
|
|
60718
|
+
constrainDflt = undefined;
|
|
60719
|
+
}
|
|
60621
60720
|
|
|
60622
60721
|
handleConstraintDefaults(axLayoutIn, axLayoutOut, coerce, {
|
|
60623
|
-
allAxisIds:
|
|
60722
|
+
allAxisIds: allAxisIdsIncludingMissing,
|
|
60624
60723
|
layoutOut: layoutOut,
|
|
60625
60724
|
scaleanchorDflt: scaleanchorDflt,
|
|
60626
60725
|
constrainDflt: constrainDflt
|
|
@@ -60631,7 +60730,6 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
|
|
|
60631
60730
|
var group = matchGroups[i];
|
|
60632
60731
|
var rng = null;
|
|
60633
60732
|
var autorange = null;
|
|
60634
|
-
var axId;
|
|
60635
60733
|
|
|
60636
60734
|
// find 'matching' range attrs
|
|
60637
60735
|
for(axId in group) {
|
|
@@ -60684,7 +60782,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
|
|
|
60684
60782
|
}
|
|
60685
60783
|
};
|
|
60686
60784
|
|
|
60687
|
-
},{"../../components/color":49,"../../lib":168,"../../plot_api/plot_template":203,"../../registry":261,"../layout_attributes":250,"./axis_defaults":215,"./axis_ids":216,"./constraints":220,"./layout_attributes":225,"./position_defaults":228,"./type_defaults":236}],227:[function(_dereq_,module,exports){
|
|
60785
|
+
},{"../../components/color":49,"../../lib":168,"../../plot_api/plot_template":203,"../../registry":261,"../layout_attributes":250,"./axis_defaults":215,"./axis_ids":216,"./constants":219,"./constraints":220,"./layout_attributes":225,"./position_defaults":228,"./type_defaults":236}],227:[function(_dereq_,module,exports){
|
|
60688
60786
|
/**
|
|
60689
60787
|
* Copyright 2012-2020, Plotly, Inc.
|
|
60690
60788
|
* All rights reserved.
|
|
@@ -67929,10 +68027,13 @@ plots.supplyTraceDefaults = function(traceIn, traceOut, colorIndex, layout, trac
|
|
|
67929
68027
|
var subplots = layout._subplots;
|
|
67930
68028
|
var subplotId = '';
|
|
67931
68029
|
|
|
67932
|
-
|
|
67933
|
-
|
|
67934
|
-
|
|
67935
|
-
|
|
68030
|
+
if(
|
|
68031
|
+
visible ||
|
|
68032
|
+
basePlotModule.name !== 'gl2d' // for now just drop empty gl2d subplots
|
|
68033
|
+
// TODO - currently if we draw an empty gl2d subplot, it draws
|
|
68034
|
+
// nothing then gets stuck and you can't get it back without newPlot
|
|
68035
|
+
// sort this out in the regl refactor?
|
|
68036
|
+
) {
|
|
67936
68037
|
if(Array.isArray(subplotAttr)) {
|
|
67937
68038
|
for(i = 0; i < subplotAttr.length; i++) {
|
|
67938
68039
|
var attri = subplotAttr[i];
|
|
@@ -69591,7 +69692,7 @@ plots.doCalcdata = function(gd, traces) {
|
|
|
69591
69692
|
calcdata[i] = cd;
|
|
69592
69693
|
}
|
|
69593
69694
|
|
|
69594
|
-
setupAxisCategories(axList, fullData);
|
|
69695
|
+
setupAxisCategories(axList, fullData, fullLayout);
|
|
69595
69696
|
|
|
69596
69697
|
// 'transform' loop - must calc container traces first
|
|
69597
69698
|
// so that if their dependent traces can get transform properly
|
|
@@ -69599,7 +69700,7 @@ plots.doCalcdata = function(gd, traces) {
|
|
|
69599
69700
|
for(i = 0; i < fullData.length; i++) transformCalci(i);
|
|
69600
69701
|
|
|
69601
69702
|
// clear stuff that should recomputed in 'regular' loop
|
|
69602
|
-
if(hasCalcTransform) setupAxisCategories(axList, fullData);
|
|
69703
|
+
if(hasCalcTransform) setupAxisCategories(axList, fullData, fullLayout);
|
|
69603
69704
|
|
|
69604
69705
|
// 'regular' loop - make sure container traces (eg carpet) calc before
|
|
69605
69706
|
// contained traces (eg contourcarpet)
|
|
@@ -69804,13 +69905,31 @@ function sortAxisCategoriesByValue(axList, gd) {
|
|
|
69804
69905
|
return affectedTraces;
|
|
69805
69906
|
}
|
|
69806
69907
|
|
|
69807
|
-
function setupAxisCategories(axList, fullData) {
|
|
69808
|
-
|
|
69809
|
-
|
|
69908
|
+
function setupAxisCategories(axList, fullData, fullLayout) {
|
|
69909
|
+
var axLookup = {};
|
|
69910
|
+
var i, ax, axId;
|
|
69911
|
+
|
|
69912
|
+
for(i = 0; i < axList.length; i++) {
|
|
69913
|
+
ax = axList[i];
|
|
69914
|
+
axId = ax._id;
|
|
69915
|
+
|
|
69810
69916
|
ax.clearCalc();
|
|
69811
69917
|
if(ax.type === 'multicategory') {
|
|
69812
69918
|
ax.setupMultiCategory(fullData);
|
|
69813
69919
|
}
|
|
69920
|
+
|
|
69921
|
+
axLookup[ax._id] = 1;
|
|
69922
|
+
}
|
|
69923
|
+
|
|
69924
|
+
// look into match groups for 'missing' axes
|
|
69925
|
+
var matchGroups = fullLayout._axisMatchGroups || [];
|
|
69926
|
+
for(i = 0; i < matchGroups.length; i++) {
|
|
69927
|
+
for(axId in matchGroups[i]) {
|
|
69928
|
+
if(!axLookup[axId]) {
|
|
69929
|
+
ax = fullLayout[axisIDs.id2name(axId)];
|
|
69930
|
+
ax.clearCalc();
|
|
69931
|
+
}
|
|
69932
|
+
}
|
|
69814
69933
|
}
|
|
69815
69934
|
}
|
|
69816
69935
|
|