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-gl3d.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plotly.js (gl3d) v2.
|
|
2
|
+
* plotly.js (gl3d) v2.7.0
|
|
3
3
|
* Copyright 2012-2021, Plotly, Inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the MIT license
|
|
@@ -52033,7 +52033,8 @@ function findUIPattern(key, patternSpecs) {
|
|
|
52033
52033
|
var spec = patternSpecs[i];
|
|
52034
52034
|
var match = key.match(spec.pattern);
|
|
52035
52035
|
if(match) {
|
|
52036
|
-
|
|
52036
|
+
var head = match[1] || '';
|
|
52037
|
+
return {head: head, tail: key.substr(head.length + 1), attr: spec.attr};
|
|
52037
52038
|
}
|
|
52038
52039
|
}
|
|
52039
52040
|
}
|
|
@@ -52085,26 +52086,54 @@ function valsMatch(v1, v2) {
|
|
|
52085
52086
|
|
|
52086
52087
|
function applyUIRevisions(data, layout, oldFullData, oldFullLayout) {
|
|
52087
52088
|
var layoutPreGUI = oldFullLayout._preGUI;
|
|
52088
|
-
var key, revAttr, oldRev, newRev, match, preGUIVal, newNP, newVal;
|
|
52089
|
+
var key, revAttr, oldRev, newRev, match, preGUIVal, newNP, newVal, head, tail;
|
|
52089
52090
|
var bothInheritAutorange = [];
|
|
52091
|
+
var newAutorangeIn = {};
|
|
52090
52092
|
var newRangeAccepted = {};
|
|
52091
52093
|
for(key in layoutPreGUI) {
|
|
52092
52094
|
match = findUIPattern(key, layoutUIControlPatterns);
|
|
52093
52095
|
if(match) {
|
|
52094
|
-
|
|
52096
|
+
head = match.head;
|
|
52097
|
+
tail = match.tail;
|
|
52098
|
+
revAttr = match.attr || (head + '.uirevision');
|
|
52095
52099
|
oldRev = nestedProperty(oldFullLayout, revAttr).get();
|
|
52096
52100
|
newRev = oldRev && getNewRev(revAttr, layout);
|
|
52101
|
+
|
|
52097
52102
|
if(newRev && (newRev === oldRev)) {
|
|
52098
52103
|
preGUIVal = layoutPreGUI[key];
|
|
52099
52104
|
if(preGUIVal === null) preGUIVal = undefined;
|
|
52100
52105
|
newNP = nestedProperty(layout, key);
|
|
52101
52106
|
newVal = newNP.get();
|
|
52107
|
+
|
|
52102
52108
|
if(valsMatch(newVal, preGUIVal)) {
|
|
52103
|
-
if(newVal === undefined &&
|
|
52104
|
-
bothInheritAutorange.push(
|
|
52109
|
+
if(newVal === undefined && tail === 'autorange') {
|
|
52110
|
+
bothInheritAutorange.push(head);
|
|
52105
52111
|
}
|
|
52106
52112
|
newNP.set(undefinedToNull(nestedProperty(oldFullLayout, key).get()));
|
|
52107
52113
|
continue;
|
|
52114
|
+
} else if(tail === 'autorange' || tail.substr(0, 6) === 'range[') {
|
|
52115
|
+
// Special case for (auto)range since we push it back into the layout
|
|
52116
|
+
// so all null should be treated equivalently to autorange: true with any range
|
|
52117
|
+
var pre0 = layoutPreGUI[head + '.range[0]'];
|
|
52118
|
+
var pre1 = layoutPreGUI[head + '.range[1]'];
|
|
52119
|
+
var preAuto = layoutPreGUI[head + '.autorange'];
|
|
52120
|
+
if(preAuto || (preAuto === null && pre0 === null && pre1 === null)) {
|
|
52121
|
+
// Only read the input layout once and stash the result,
|
|
52122
|
+
// so we get it before we start modifying it
|
|
52123
|
+
if(!(head in newAutorangeIn)) {
|
|
52124
|
+
var newContainer = nestedProperty(layout, head).get();
|
|
52125
|
+
newAutorangeIn[head] = newContainer && (
|
|
52126
|
+
newContainer.autorange ||
|
|
52127
|
+
(newContainer.autorange !== false && (
|
|
52128
|
+
!newContainer.range || newContainer.range.length !== 2)
|
|
52129
|
+
)
|
|
52130
|
+
);
|
|
52131
|
+
}
|
|
52132
|
+
if(newAutorangeIn[head]) {
|
|
52133
|
+
newNP.set(undefinedToNull(nestedProperty(oldFullLayout, key).get()));
|
|
52134
|
+
continue;
|
|
52135
|
+
}
|
|
52136
|
+
}
|
|
52108
52137
|
}
|
|
52109
52138
|
}
|
|
52110
52139
|
} else {
|
|
@@ -52115,12 +52144,12 @@ function applyUIRevisions(data, layout, oldFullData, oldFullLayout) {
|
|
|
52115
52144
|
// so remove it from _preGUI for next time.
|
|
52116
52145
|
delete layoutPreGUI[key];
|
|
52117
52146
|
|
|
52118
|
-
if(
|
|
52119
|
-
newRangeAccepted[
|
|
52147
|
+
if(match && match.tail.substr(0, 6) === 'range[') {
|
|
52148
|
+
newRangeAccepted[match.head] = 1;
|
|
52120
52149
|
}
|
|
52121
52150
|
}
|
|
52122
52151
|
|
|
52123
|
-
//
|
|
52152
|
+
// More special logic for `autorange`, since it interacts with `range`:
|
|
52124
52153
|
// If the new figure's matching `range` was kept, and `autorange`
|
|
52125
52154
|
// wasn't supplied explicitly in either the original or the new figure,
|
|
52126
52155
|
// we shouldn't alter that - but we may just have done that, so fix it.
|
|
@@ -85954,7 +85983,7 @@ function getSortFunc(opts, d2c) {
|
|
|
85954
85983
|
'use strict';
|
|
85955
85984
|
|
|
85956
85985
|
// package version injected by `npm run preprocess`
|
|
85957
|
-
exports.version = '2.
|
|
85986
|
+
exports.version = '2.7.0';
|
|
85958
85987
|
|
|
85959
85988
|
},{}],435:[function(_dereq_,module,exports){
|
|
85960
85989
|
(function (global){(function (){
|