Skip to content

Commit 6240d61

Browse files
committed
Update to plotly.js 1.43.1
1 parent f1ae15a commit 6240d61

File tree

6 files changed

+105
-64
lines changed

6 files changed

+105
-64
lines changed

js/package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"ify-loader": "^1.1.0"
3232
},
3333
"dependencies": {
34-
"plotly.js": "1.43.0",
34+
"plotly.js": "1.43.1",
3535
"@jupyter-widgets/base": "^1.0.0",
3636
"lodash": "^4.17.4"
3737
},

plotly/offline/_plotlyjs_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# DO NOT EDIT
22
# This file is generated by the updatebundle setup.py command
3-
__plotlyjs_version__ = '1.43.0'
3+
__plotlyjs_version__ = '1.43.1'

plotly/package_data/plotly.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plotlywidget/static/index.js

+96-55
Original file line numberDiff line numberDiff line change
@@ -12646,7 +12646,7 @@ module.exports = function identity(d) { return d; };
1264612646
/* 19 */
1264712647
/***/ (function(module, exports) {
1264812648

12649-
module.exports = {"name":"plotlywidget","version":"0.5.2","description":"The plotly.py ipywidgets library","author":"The plotly.py team","license":"MIT","main":"src/index.js","repository":{"type":"git","url":"https://github.com/plotly/plotly.py"},"keywords":["jupyter","widgets","ipython","ipywidgets","plotly"],"files":["src/**/*.js","dist/*.js"],"scripts":{"clean":"rimraf dist/ && rimraf ../plotlywidget/static","prepublish":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"devDependencies":{"webpack":"^3.10.0","rimraf":"^2.6.1","ify-loader":"^1.1.0"},"dependencies":{"plotly.js":"1.43.0","@jupyter-widgets/base":"^1.0.0","lodash":"^4.17.4"},"jupyterlab":{"extension":"src/jupyterlab-plugin"}}
12649+
module.exports = {"name":"plotlywidget","version":"0.5.2","description":"The plotly.py ipywidgets library","author":"The plotly.py team","license":"MIT","main":"src/index.js","repository":{"type":"git","url":"https://github.com/plotly/plotly.py"},"keywords":["jupyter","widgets","ipython","ipywidgets","plotly"],"files":["src/**/*.js","dist/*.js"],"scripts":{"clean":"rimraf dist/ && rimraf ../plotlywidget/static","prepublish":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"devDependencies":{"webpack":"^3.10.0","rimraf":"^2.6.1","ify-loader":"^1.1.0"},"dependencies":{"plotly.js":"1.43.1","@jupyter-widgets/base":"^1.0.0","lodash":"^4.17.4"},"jupyterlab":{"extension":"src/jupyterlab-plugin"}}
1265012650

1265112651
/***/ }),
1265212652
/* 20 */
@@ -31671,7 +31671,7 @@ module.exports = function(module) {
3167131671
/***/ (function(module, exports, __webpack_require__) {
3167231672

3167331673
/* WEBPACK VAR INJECTION */(function(global) {var require;var require;/**
31674-
* plotly.js v1.43.0
31674+
* plotly.js v1.43.1
3167531675
* Copyright 2012-2018, Plotly, Inc.
3167631676
* All rights reserved.
3167731677
* Licensed under the MIT license
@@ -127770,7 +127770,7 @@ exports.svgAttrs = {
127770127770
'use strict';
127771127771

127772127772
// package version injected by `npm run preprocess`
127773-
exports.version = '1.43.0';
127773+
exports.version = '1.43.1';
127774127774

127775127775
// inject promise polyfill
127776127776
_dereq_('es6-promise').polyfill();
@@ -145126,9 +145126,13 @@ axes.draw = function(gd, arg, opts) {
145126145126
plotinfo.xaxislayer.selectAll('.' + xa._id + 'tick').remove();
145127145127
plotinfo.yaxislayer.selectAll('.' + ya._id + 'tick').remove();
145128145128
plotinfo.xaxislayer.selectAll('.' + xa._id + 'tick2').remove();
145129+
plotinfo.yaxislayer.selectAll('.' + ya._id + 'tick2').remove();
145129145130
plotinfo.xaxislayer.selectAll('.' + xa._id + 'divider').remove();
145131+
plotinfo.yaxislayer.selectAll('.' + ya._id + 'divider').remove();
145132+
145130145133
if(plotinfo.gridlayer) plotinfo.gridlayer.selectAll('path').remove();
145131145134
if(plotinfo.zerolinelayer) plotinfo.zerolinelayer.selectAll('path').remove();
145135+
145132145136
fullLayout._infolayer.select('.g-' + xa._id + 'title').remove();
145133145137
fullLayout._infolayer.select('.g-' + ya._id + 'title').remove();
145134145138
});
@@ -148154,13 +148158,14 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {
148154148158
for(i = 0; i < axList.length; i++) {
148155148159
ax = axList[i];
148156148160

148157-
if(!ax._rangeInitial) {
148158-
attrs[ax._name + '.autorange'] = true;
148159-
}
148160-
else {
148161-
rangeInitial = ax._rangeInitial;
148162-
attrs[ax._name + '.range[0]'] = rangeInitial[0];
148163-
attrs[ax._name + '.range[1]'] = rangeInitial[1];
148161+
if(!ax.fixedrange) {
148162+
if(!ax._rangeInitial) {
148163+
attrs[ax._name + '.autorange'] = true;
148164+
} else {
148165+
rangeInitial = ax._rangeInitial;
148166+
attrs[ax._name + '.range[0]'] = rangeInitial[0];
148167+
attrs[ax._name + '.range[1]'] = rangeInitial[1];
148168+
}
148164148169
}
148165148170
}
148166148171
}
@@ -151339,6 +151344,7 @@ var cleanNumber = Lib.cleanNumber;
151339151344
var ms2DateTime = Lib.ms2DateTime;
151340151345
var dateTime2ms = Lib.dateTime2ms;
151341151346
var ensureNumber = Lib.ensureNumber;
151347+
var isArrayOrTypedArray = Lib.isArrayOrTypedArray;
151342151348

151343151349
var numConstants = _dereq_('../../constants/numerical');
151344151350
var FP_SAFE = numConstants.FP_SAFE;
@@ -151470,40 +151476,11 @@ module.exports = function setConvert(ax, fullLayout) {
151470151476

151471151477
function setMultiCategoryIndex(arrayIn, len) {
151472151478
var arrayOut = new Array(len);
151473-
var i;
151474151479

151475-
// [ [arrayIn[0][i], arrayIn[1][i]], for i .. len ]
151476-
var tmp = new Array(len);
151477-
// [ [cnt, {$cat: index}], for j .. arrayIn.length ]
151478-
var seen = [[0, {}], [0, {}]];
151479-
151480-
if(Lib.isArrayOrTypedArray(arrayIn[0]) && Lib.isArrayOrTypedArray(arrayIn[1])) {
151481-
for(i = 0; i < len; i++) {
151482-
var v0 = arrayIn[0][i];
151483-
var v1 = arrayIn[1][i];
151484-
if(isValidCategory(v0) && isValidCategory(v1)) {
151485-
tmp[i] = [v0, v1];
151486-
if(!(v0 in seen[0][1])) {
151487-
seen[0][1][v0] = seen[0][0]++;
151488-
}
151489-
if(!(v1 in seen[1][1])) {
151490-
seen[1][1][v1] = seen[1][0]++;
151491-
}
151492-
}
151493-
}
151494-
151495-
tmp.sort(function(a, b) {
151496-
var ind0 = seen[0][1];
151497-
var d = ind0[a[0]] - ind0[b[0]];
151498-
if(d) return d;
151499-
151500-
var ind1 = seen[1][1];
151501-
return ind1[a[1]] - ind1[b[1]];
151502-
});
151503-
}
151504-
151505-
for(i = 0; i < len; i++) {
151506-
arrayOut[i] = setCategoryIndex(tmp[i]);
151480+
for(var i = 0; i < len; i++) {
151481+
var v0 = (arrayIn[0] || [])[i];
151482+
var v1 = (arrayIn[1] || [])[i];
151483+
arrayOut[i] = getCategoryIndex([v0, v1]);
151507151484
}
151508151485

151509151486
return arrayOut;
@@ -151652,6 +151629,56 @@ module.exports = function setConvert(ax, fullLayout) {
151652151629
if(Array.isArray(v) || (typeof v === 'string' && v !== '')) return v;
151653151630
return ensureNumber(v);
151654151631
};
151632+
151633+
ax.setupMultiCategory = function(fullData) {
151634+
var traceIndices = ax._traceIndices;
151635+
var i, j;
151636+
151637+
// [ [cnt, {$cat: index}], for 1,2 ]
151638+
var seen = ax._multicatSeen = [[0, {}], [0, {}]];
151639+
// [ [arrayIn[0][i], arrayIn[1][i]], for i .. N ]
151640+
var list = ax._multicatList = [];
151641+
151642+
for(i = 0; i < traceIndices.length; i++) {
151643+
var trace = fullData[traceIndices[i]];
151644+
151645+
if(axLetter in trace) {
151646+
var arrayIn = trace[axLetter];
151647+
var len = trace._length || Lib.minRowLength(arrayIn);
151648+
151649+
if(isArrayOrTypedArray(arrayIn[0]) && isArrayOrTypedArray(arrayIn[1])) {
151650+
for(j = 0; j < len; j++) {
151651+
var v0 = arrayIn[0][j];
151652+
var v1 = arrayIn[1][j];
151653+
151654+
if(isValidCategory(v0) && isValidCategory(v1)) {
151655+
list.push([v0, v1]);
151656+
151657+
if(!(v0 in seen[0][1])) {
151658+
seen[0][1][v0] = seen[0][0]++;
151659+
}
151660+
if(!(v1 in seen[1][1])) {
151661+
seen[1][1][v1] = seen[1][0]++;
151662+
}
151663+
}
151664+
}
151665+
}
151666+
}
151667+
}
151668+
151669+
list.sort(function(a, b) {
151670+
var ind0 = seen[0][1];
151671+
var d = ind0[a[0]] - ind0[b[0]];
151672+
if(d) return d;
151673+
151674+
var ind1 = seen[1][1];
151675+
return ind1[a[1]] - ind1[b[1]];
151676+
});
151677+
151678+
for(i = 0; i < list.length; i++) {
151679+
setCategoryIndex(list[i]);
151680+
}
151681+
};
151655151682
}
151656151683

151657151684
// find the range value at the specified (linear) fraction of the axis
@@ -157892,7 +157919,9 @@ var Registry = _dereq_('../../../registry');
157892157919
var handleSubplotDefaults = _dereq_('../../subplot_defaults');
157893157920
var supplyGl3dAxisLayoutDefaults = _dereq_('./axis_defaults');
157894157921
var layoutAttributes = _dereq_('./layout_attributes');
157922+
var getSubplotData = _dereq_('../../get_data').getSubplotData;
157895157923

157924+
var GL3D = 'gl3d';
157896157925

157897157926
module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
157898157927
var hasNon3D = layoutOut._basePlotModules.length > 1;
@@ -157907,7 +157936,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
157907157936
}
157908157937

157909157938
handleSubplotDefaults(layoutIn, layoutOut, fullData, {
157910-
type: 'gl3d',
157939+
type: GL3D,
157911157940
attributes: layoutAttributes,
157912157941
handleDefaults: handleGl3dDefaults,
157913157942
fullLayout: layoutOut,
@@ -157973,10 +158002,12 @@ function handleGl3dDefaults(sceneLayoutIn, sceneLayoutOut, coerce, opts) {
157973158002
sceneLayoutIn.aspectmode = sceneLayoutOut.aspectmode;
157974158003
}
157975158004

158005+
var fullGl3dData = getSubplotData(opts.fullData, GL3D, opts.id);
158006+
157976158007
supplyGl3dAxisLayoutDefaults(sceneLayoutIn, sceneLayoutOut, {
157977158008
font: opts.font,
157978158009
scene: opts.id,
157979-
data: opts.fullData,
158010+
data: fullGl3dData,
157980158011
bgColor: bgColorCombined,
157981158012
calendar: opts.calendar,
157982158013
fullLayout: opts.fullLayout
@@ -158015,7 +158046,7 @@ function handleGl3dDefaults(sceneLayoutIn, sceneLayoutOut, coerce, opts) {
158015158046
coerce('hovermode', opts.getDfltFromLayout('hovermode'));
158016158047
}
158017158048

158018-
},{"../../../components/color":569,"../../../lib":692,"../../../registry":823,"../../subplot_defaults":818,"./axis_defaults":786,"./layout_attributes":789}],789:[function(_dereq_,module,exports){
158049+
},{"../../../components/color":569,"../../../lib":692,"../../../registry":823,"../../get_data":777,"../../subplot_defaults":818,"./axis_defaults":786,"./layout_attributes":789}],789:[function(_dereq_,module,exports){
158019158050
/**
158020158051
* Copyright 2012-2018, Plotly, Inc.
158021158052
* All rights reserved.
@@ -163433,9 +163464,9 @@ plots.transition = function(gd, data, layout, traces, frameOpts, transitionOpts)
163433163464
};
163434163465

163435163466
plots.doCalcdata = function(gd, traces) {
163436-
var axList = axisIDs.list(gd),
163437-
fullData = gd._fullData,
163438-
fullLayout = gd._fullLayout;
163467+
var axList = axisIDs.list(gd);
163468+
var fullData = gd._fullData;
163469+
var fullLayout = gd._fullLayout;
163439163470

163440163471
var trace, _module, i, j;
163441163472

@@ -163488,7 +163519,7 @@ plots.doCalcdata = function(gd, traces) {
163488163519
);
163489163520
}
163490163521

163491-
clearAxesCalc(axList);
163522+
setupAxisCategories(axList, fullData);
163492163523

163493163524
var hasCalcTransform = false;
163494163525

@@ -163526,7 +163557,7 @@ plots.doCalcdata = function(gd, traces) {
163526163557
}
163527163558

163528163559
// clear stuff that should recomputed in 'regular' loop
163529-
if(hasCalcTransform) clearAxesCalc(axList);
163560+
if(hasCalcTransform) setupAxisCategories(axList, fullData);
163530163561

163531163562
function calci(i, isContainer) {
163532163563
trace = fullData[i];
@@ -163584,9 +163615,13 @@ plots.doCalcdata = function(gd, traces) {
163584163615
Registry.getComponentMethod('errorbars', 'calc')(gd);
163585163616
};
163586163617

163587-
function clearAxesCalc(axList) {
163618+
function setupAxisCategories(axList, fullData) {
163588163619
for(var i = 0; i < axList.length; i++) {
163589-
axList[i].clearCalc();
163620+
var ax = axList[i];
163621+
ax.clearCalc();
163622+
if(ax.type === 'multicategory') {
163623+
ax.setupMultiCategory(fullData);
163624+
}
163590163625
}
163591163626
}
163592163627

@@ -180990,8 +181025,7 @@ function makeLinesAndLabels(plotgroup, pathinfo, gd, cd0, contours, perimeter) {
180990181025
.classed('contourlabels', true);
180991181026

180992181027
if(showLabels) {
180993-
var labelClipPathData = [perimeter];
180994-
181028+
var labelClipPathData = [];
180995181029
var labelData = [];
180996181030

180997181031
// invalidate the getTextLocation cache in case paths changed
@@ -181037,6 +181071,13 @@ function makeLinesAndLabels(plotgroup, pathinfo, gd, cd0, contours, perimeter) {
181037181071
bounds.middle = (bounds.top + bounds.bottom) / 2;
181038181072
bounds.center = (bounds.left + bounds.right) / 2;
181039181073

181074+
labelClipPathData.push([
181075+
[bounds.left, bounds.top],
181076+
[bounds.right, bounds.top],
181077+
[bounds.right, bounds.bottom],
181078+
[bounds.left, bounds.bottom]
181079+
]);
181080+
181040181081
var plotDiagonal = Math.sqrt(xLen * xLen + yLen * yLen);
181041181082

181042181083
// the path length to use to scale the number of labels to draw:

plotlywidget/static/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)