plotly.js 2.6.4 → 2.7.0
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/CHANGELOG.md +17 -0
- package/README.md +3 -3
- package/dist/README.md +26 -26
- package/dist/plot-schema.json +117 -0
- package/dist/plotly-basic.js +40 -11
- package/dist/plotly-basic.min.js +2 -2
- package/dist/plotly-cartesian.js +98 -18
- package/dist/plotly-cartesian.min.js +2 -2
- package/dist/plotly-finance.js +90 -13
- package/dist/plotly-finance.min.js +2 -2
- package/dist/plotly-geo-assets.js +2 -2
- package/dist/plotly-geo.js +39 -10
- package/dist/plotly-geo.min.js +2 -2
- package/dist/plotly-gl2d.js +39 -10
- package/dist/plotly-gl2d.min.js +2 -2
- package/dist/plotly-gl3d.js +39 -10
- package/dist/plotly-gl3d.min.js +8 -8
- package/dist/plotly-mapbox.js +45 -13
- package/dist/plotly-mapbox.min.js +2 -2
- package/dist/plotly-strict.js +104 -21
- package/dist/plotly-strict.min.js +2 -2
- package/dist/plotly-with-meta.js +107 -21
- package/dist/plotly.js +104 -21
- package/dist/plotly.min.js +2 -2
- package/package.json +2 -2
- package/src/plot_api/plot_api.js +37 -8
- package/src/plots/mapbox/mapbox.js +6 -3
- package/src/traces/bar/plot.js +1 -1
- package/src/traces/histogram/attributes.js +40 -0
- package/src/traces/histogram/defaults.js +11 -0
- package/src/version.js +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plotly.js v2.
|
|
2
|
+
* plotly.js v2.7.0
|
|
3
3
|
* Copyright 2012-2021, Plotly, Inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the MIT license
|
|
@@ -68,7 +68,7 @@ exports.topojson = saneTopojson;
|
|
|
68
68
|
'use strict';
|
|
69
69
|
|
|
70
70
|
// package version injected by `npm run preprocess`
|
|
71
|
-
exports.version = '2.
|
|
71
|
+
exports.version = '2.7.0';
|
|
72
72
|
|
|
73
73
|
},{}]},{},[16])(16)
|
|
74
74
|
});
|
package/dist/plotly-geo.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plotly.js (geo) v2.
|
|
2
|
+
* plotly.js (geo) v2.7.0
|
|
3
3
|
* Copyright 2012-2021, Plotly, Inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the MIT license
|
|
@@ -65421,7 +65421,8 @@ function findUIPattern(key, patternSpecs) {
|
|
|
65421
65421
|
var spec = patternSpecs[i];
|
|
65422
65422
|
var match = key.match(spec.pattern);
|
|
65423
65423
|
if(match) {
|
|
65424
|
-
|
|
65424
|
+
var head = match[1] || '';
|
|
65425
|
+
return {head: head, tail: key.substr(head.length + 1), attr: spec.attr};
|
|
65425
65426
|
}
|
|
65426
65427
|
}
|
|
65427
65428
|
}
|
|
@@ -65473,26 +65474,54 @@ function valsMatch(v1, v2) {
|
|
|
65473
65474
|
|
|
65474
65475
|
function applyUIRevisions(data, layout, oldFullData, oldFullLayout) {
|
|
65475
65476
|
var layoutPreGUI = oldFullLayout._preGUI;
|
|
65476
|
-
var key, revAttr, oldRev, newRev, match, preGUIVal, newNP, newVal;
|
|
65477
|
+
var key, revAttr, oldRev, newRev, match, preGUIVal, newNP, newVal, head, tail;
|
|
65477
65478
|
var bothInheritAutorange = [];
|
|
65479
|
+
var newAutorangeIn = {};
|
|
65478
65480
|
var newRangeAccepted = {};
|
|
65479
65481
|
for(key in layoutPreGUI) {
|
|
65480
65482
|
match = findUIPattern(key, layoutUIControlPatterns);
|
|
65481
65483
|
if(match) {
|
|
65482
|
-
|
|
65484
|
+
head = match.head;
|
|
65485
|
+
tail = match.tail;
|
|
65486
|
+
revAttr = match.attr || (head + '.uirevision');
|
|
65483
65487
|
oldRev = nestedProperty(oldFullLayout, revAttr).get();
|
|
65484
65488
|
newRev = oldRev && getNewRev(revAttr, layout);
|
|
65489
|
+
|
|
65485
65490
|
if(newRev && (newRev === oldRev)) {
|
|
65486
65491
|
preGUIVal = layoutPreGUI[key];
|
|
65487
65492
|
if(preGUIVal === null) preGUIVal = undefined;
|
|
65488
65493
|
newNP = nestedProperty(layout, key);
|
|
65489
65494
|
newVal = newNP.get();
|
|
65495
|
+
|
|
65490
65496
|
if(valsMatch(newVal, preGUIVal)) {
|
|
65491
|
-
if(newVal === undefined &&
|
|
65492
|
-
bothInheritAutorange.push(
|
|
65497
|
+
if(newVal === undefined && tail === 'autorange') {
|
|
65498
|
+
bothInheritAutorange.push(head);
|
|
65493
65499
|
}
|
|
65494
65500
|
newNP.set(undefinedToNull(nestedProperty(oldFullLayout, key).get()));
|
|
65495
65501
|
continue;
|
|
65502
|
+
} else if(tail === 'autorange' || tail.substr(0, 6) === 'range[') {
|
|
65503
|
+
// Special case for (auto)range since we push it back into the layout
|
|
65504
|
+
// so all null should be treated equivalently to autorange: true with any range
|
|
65505
|
+
var pre0 = layoutPreGUI[head + '.range[0]'];
|
|
65506
|
+
var pre1 = layoutPreGUI[head + '.range[1]'];
|
|
65507
|
+
var preAuto = layoutPreGUI[head + '.autorange'];
|
|
65508
|
+
if(preAuto || (preAuto === null && pre0 === null && pre1 === null)) {
|
|
65509
|
+
// Only read the input layout once and stash the result,
|
|
65510
|
+
// so we get it before we start modifying it
|
|
65511
|
+
if(!(head in newAutorangeIn)) {
|
|
65512
|
+
var newContainer = nestedProperty(layout, head).get();
|
|
65513
|
+
newAutorangeIn[head] = newContainer && (
|
|
65514
|
+
newContainer.autorange ||
|
|
65515
|
+
(newContainer.autorange !== false && (
|
|
65516
|
+
!newContainer.range || newContainer.range.length !== 2)
|
|
65517
|
+
)
|
|
65518
|
+
);
|
|
65519
|
+
}
|
|
65520
|
+
if(newAutorangeIn[head]) {
|
|
65521
|
+
newNP.set(undefinedToNull(nestedProperty(oldFullLayout, key).get()));
|
|
65522
|
+
continue;
|
|
65523
|
+
}
|
|
65524
|
+
}
|
|
65496
65525
|
}
|
|
65497
65526
|
}
|
|
65498
65527
|
} else {
|
|
@@ -65503,12 +65532,12 @@ function applyUIRevisions(data, layout, oldFullData, oldFullLayout) {
|
|
|
65503
65532
|
// so remove it from _preGUI for next time.
|
|
65504
65533
|
delete layoutPreGUI[key];
|
|
65505
65534
|
|
|
65506
|
-
if(
|
|
65507
|
-
newRangeAccepted[
|
|
65535
|
+
if(match && match.tail.substr(0, 6) === 'range[') {
|
|
65536
|
+
newRangeAccepted[match.head] = 1;
|
|
65508
65537
|
}
|
|
65509
65538
|
}
|
|
65510
65539
|
|
|
65511
|
-
//
|
|
65540
|
+
// More special logic for `autorange`, since it interacts with `range`:
|
|
65512
65541
|
// If the new figure's matching `range` was kept, and `autorange`
|
|
65513
65542
|
// wasn't supplied explicitly in either the original or the new figure,
|
|
65514
65543
|
// we shouldn't alter that - but we may just have done that, so fix it.
|
|
@@ -95047,7 +95076,7 @@ function getSortFunc(opts, d2c) {
|
|
|
95047
95076
|
'use strict';
|
|
95048
95077
|
|
|
95049
95078
|
// package version injected by `npm run preprocess`
|
|
95050
|
-
exports.version = '2.
|
|
95079
|
+
exports.version = '2.7.0';
|
|
95051
95080
|
|
|
95052
95081
|
},{}]},{},[8])(8)
|
|
95053
95082
|
});
|