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
package/dist/plotly-gl2d.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plotly.js (gl2d) v2.
|
|
2
|
+
* plotly.js (gl2d) v2.7.0
|
|
3
3
|
* Copyright 2012-2021, Plotly, Inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the MIT license
|
|
@@ -64873,7 +64873,8 @@ function findUIPattern(key, patternSpecs) {
|
|
|
64873
64873
|
var spec = patternSpecs[i];
|
|
64874
64874
|
var match = key.match(spec.pattern);
|
|
64875
64875
|
if(match) {
|
|
64876
|
-
|
|
64876
|
+
var head = match[1] || '';
|
|
64877
|
+
return {head: head, tail: key.substr(head.length + 1), attr: spec.attr};
|
|
64877
64878
|
}
|
|
64878
64879
|
}
|
|
64879
64880
|
}
|
|
@@ -64925,26 +64926,54 @@ function valsMatch(v1, v2) {
|
|
|
64925
64926
|
|
|
64926
64927
|
function applyUIRevisions(data, layout, oldFullData, oldFullLayout) {
|
|
64927
64928
|
var layoutPreGUI = oldFullLayout._preGUI;
|
|
64928
|
-
var key, revAttr, oldRev, newRev, match, preGUIVal, newNP, newVal;
|
|
64929
|
+
var key, revAttr, oldRev, newRev, match, preGUIVal, newNP, newVal, head, tail;
|
|
64929
64930
|
var bothInheritAutorange = [];
|
|
64931
|
+
var newAutorangeIn = {};
|
|
64930
64932
|
var newRangeAccepted = {};
|
|
64931
64933
|
for(key in layoutPreGUI) {
|
|
64932
64934
|
match = findUIPattern(key, layoutUIControlPatterns);
|
|
64933
64935
|
if(match) {
|
|
64934
|
-
|
|
64936
|
+
head = match.head;
|
|
64937
|
+
tail = match.tail;
|
|
64938
|
+
revAttr = match.attr || (head + '.uirevision');
|
|
64935
64939
|
oldRev = nestedProperty(oldFullLayout, revAttr).get();
|
|
64936
64940
|
newRev = oldRev && getNewRev(revAttr, layout);
|
|
64941
|
+
|
|
64937
64942
|
if(newRev && (newRev === oldRev)) {
|
|
64938
64943
|
preGUIVal = layoutPreGUI[key];
|
|
64939
64944
|
if(preGUIVal === null) preGUIVal = undefined;
|
|
64940
64945
|
newNP = nestedProperty(layout, key);
|
|
64941
64946
|
newVal = newNP.get();
|
|
64947
|
+
|
|
64942
64948
|
if(valsMatch(newVal, preGUIVal)) {
|
|
64943
|
-
if(newVal === undefined &&
|
|
64944
|
-
bothInheritAutorange.push(
|
|
64949
|
+
if(newVal === undefined && tail === 'autorange') {
|
|
64950
|
+
bothInheritAutorange.push(head);
|
|
64945
64951
|
}
|
|
64946
64952
|
newNP.set(undefinedToNull(nestedProperty(oldFullLayout, key).get()));
|
|
64947
64953
|
continue;
|
|
64954
|
+
} else if(tail === 'autorange' || tail.substr(0, 6) === 'range[') {
|
|
64955
|
+
// Special case for (auto)range since we push it back into the layout
|
|
64956
|
+
// so all null should be treated equivalently to autorange: true with any range
|
|
64957
|
+
var pre0 = layoutPreGUI[head + '.range[0]'];
|
|
64958
|
+
var pre1 = layoutPreGUI[head + '.range[1]'];
|
|
64959
|
+
var preAuto = layoutPreGUI[head + '.autorange'];
|
|
64960
|
+
if(preAuto || (preAuto === null && pre0 === null && pre1 === null)) {
|
|
64961
|
+
// Only read the input layout once and stash the result,
|
|
64962
|
+
// so we get it before we start modifying it
|
|
64963
|
+
if(!(head in newAutorangeIn)) {
|
|
64964
|
+
var newContainer = nestedProperty(layout, head).get();
|
|
64965
|
+
newAutorangeIn[head] = newContainer && (
|
|
64966
|
+
newContainer.autorange ||
|
|
64967
|
+
(newContainer.autorange !== false && (
|
|
64968
|
+
!newContainer.range || newContainer.range.length !== 2)
|
|
64969
|
+
)
|
|
64970
|
+
);
|
|
64971
|
+
}
|
|
64972
|
+
if(newAutorangeIn[head]) {
|
|
64973
|
+
newNP.set(undefinedToNull(nestedProperty(oldFullLayout, key).get()));
|
|
64974
|
+
continue;
|
|
64975
|
+
}
|
|
64976
|
+
}
|
|
64948
64977
|
}
|
|
64949
64978
|
}
|
|
64950
64979
|
} else {
|
|
@@ -64955,12 +64984,12 @@ function applyUIRevisions(data, layout, oldFullData, oldFullLayout) {
|
|
|
64955
64984
|
// so remove it from _preGUI for next time.
|
|
64956
64985
|
delete layoutPreGUI[key];
|
|
64957
64986
|
|
|
64958
|
-
if(
|
|
64959
|
-
newRangeAccepted[
|
|
64987
|
+
if(match && match.tail.substr(0, 6) === 'range[') {
|
|
64988
|
+
newRangeAccepted[match.head] = 1;
|
|
64960
64989
|
}
|
|
64961
64990
|
}
|
|
64962
64991
|
|
|
64963
|
-
//
|
|
64992
|
+
// More special logic for `autorange`, since it interacts with `range`:
|
|
64964
64993
|
// If the new figure's matching `range` was kept, and `autorange`
|
|
64965
64994
|
// wasn't supplied explicitly in either the original or the new figure,
|
|
64966
64995
|
// we shouldn't alter that - but we may just have done that, so fix it.
|
|
@@ -100563,7 +100592,7 @@ function getSortFunc(opts, d2c) {
|
|
|
100563
100592
|
'use strict';
|
|
100564
100593
|
|
|
100565
100594
|
// package version injected by `npm run preprocess`
|
|
100566
|
-
exports.version = '2.
|
|
100595
|
+
exports.version = '2.7.0';
|
|
100567
100596
|
|
|
100568
100597
|
},{}],588:[function(_dereq_,module,exports){
|
|
100569
100598
|
(function (global){(function (){
|