@@ -12646,7 +12646,7 @@ module.exports = function identity(d) { return d; };
12646
12646
/* 19 */
12647
12647
/***/ (function(module, exports) {
12648
12648
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"}}
12650
12650
12651
12651
/***/ }),
12652
12652
/* 20 */
@@ -31671,7 +31671,7 @@ module.exports = function(module) {
31671
31671
/***/ (function(module, exports, __webpack_require__) {
31672
31672
31673
31673
/* WEBPACK VAR INJECTION */(function(global) {var require;var require;/**
31674
- * plotly.js v1.43.0
31674
+ * plotly.js v1.43.1
31675
31675
* Copyright 2012-2018, Plotly, Inc.
31676
31676
* All rights reserved.
31677
31677
* Licensed under the MIT license
@@ -127770,7 +127770,7 @@ exports.svgAttrs = {
127770
127770
'use strict';
127771
127771
127772
127772
// package version injected by `npm run preprocess`
127773
- exports.version = '1.43.0 ';
127773
+ exports.version = '1.43.1 ';
127774
127774
127775
127775
// inject promise polyfill
127776
127776
_dereq_('es6-promise').polyfill();
@@ -145126,9 +145126,13 @@ axes.draw = function(gd, arg, opts) {
145126
145126
plotinfo.xaxislayer.selectAll('.' + xa._id + 'tick').remove();
145127
145127
plotinfo.yaxislayer.selectAll('.' + ya._id + 'tick').remove();
145128
145128
plotinfo.xaxislayer.selectAll('.' + xa._id + 'tick2').remove();
145129
+ plotinfo.yaxislayer.selectAll('.' + ya._id + 'tick2').remove();
145129
145130
plotinfo.xaxislayer.selectAll('.' + xa._id + 'divider').remove();
145131
+ plotinfo.yaxislayer.selectAll('.' + ya._id + 'divider').remove();
145132
+
145130
145133
if(plotinfo.gridlayer) plotinfo.gridlayer.selectAll('path').remove();
145131
145134
if(plotinfo.zerolinelayer) plotinfo.zerolinelayer.selectAll('path').remove();
145135
+
145132
145136
fullLayout._infolayer.select('.g-' + xa._id + 'title').remove();
145133
145137
fullLayout._infolayer.select('.g-' + ya._id + 'title').remove();
145134
145138
});
@@ -148154,13 +148158,14 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {
148154
148158
for(i = 0; i < axList.length; i++) {
148155
148159
ax = axList[i];
148156
148160
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
+ }
148164
148169
}
148165
148170
}
148166
148171
}
@@ -151339,6 +151344,7 @@ var cleanNumber = Lib.cleanNumber;
151339
151344
var ms2DateTime = Lib.ms2DateTime;
151340
151345
var dateTime2ms = Lib.dateTime2ms;
151341
151346
var ensureNumber = Lib.ensureNumber;
151347
+ var isArrayOrTypedArray = Lib.isArrayOrTypedArray;
151342
151348
151343
151349
var numConstants = _dereq_('../../constants/numerical');
151344
151350
var FP_SAFE = numConstants.FP_SAFE;
@@ -151470,40 +151476,11 @@ module.exports = function setConvert(ax, fullLayout) {
151470
151476
151471
151477
function setMultiCategoryIndex(arrayIn, len) {
151472
151478
var arrayOut = new Array(len);
151473
- var i;
151474
151479
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]);
151507
151484
}
151508
151485
151509
151486
return arrayOut;
@@ -151652,6 +151629,56 @@ module.exports = function setConvert(ax, fullLayout) {
151652
151629
if(Array.isArray(v) || (typeof v === 'string' && v !== '')) return v;
151653
151630
return ensureNumber(v);
151654
151631
};
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
+ };
151655
151682
}
151656
151683
151657
151684
// find the range value at the specified (linear) fraction of the axis
@@ -157892,7 +157919,9 @@ var Registry = _dereq_('../../../registry');
157892
157919
var handleSubplotDefaults = _dereq_('../../subplot_defaults');
157893
157920
var supplyGl3dAxisLayoutDefaults = _dereq_('./axis_defaults');
157894
157921
var layoutAttributes = _dereq_('./layout_attributes');
157922
+ var getSubplotData = _dereq_('../../get_data').getSubplotData;
157895
157923
157924
+ var GL3D = 'gl3d';
157896
157925
157897
157926
module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
157898
157927
var hasNon3D = layoutOut._basePlotModules.length > 1;
@@ -157907,7 +157936,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
157907
157936
}
157908
157937
157909
157938
handleSubplotDefaults(layoutIn, layoutOut, fullData, {
157910
- type: 'gl3d' ,
157939
+ type: GL3D ,
157911
157940
attributes: layoutAttributes,
157912
157941
handleDefaults: handleGl3dDefaults,
157913
157942
fullLayout: layoutOut,
@@ -157973,10 +158002,12 @@ function handleGl3dDefaults(sceneLayoutIn, sceneLayoutOut, coerce, opts) {
157973
158002
sceneLayoutIn.aspectmode = sceneLayoutOut.aspectmode;
157974
158003
}
157975
158004
158005
+ var fullGl3dData = getSubplotData(opts.fullData, GL3D, opts.id);
158006
+
157976
158007
supplyGl3dAxisLayoutDefaults(sceneLayoutIn, sceneLayoutOut, {
157977
158008
font: opts.font,
157978
158009
scene: opts.id,
157979
- data: opts.fullData ,
158010
+ data: fullGl3dData ,
157980
158011
bgColor: bgColorCombined,
157981
158012
calendar: opts.calendar,
157982
158013
fullLayout: opts.fullLayout
@@ -158015,7 +158046,7 @@ function handleGl3dDefaults(sceneLayoutIn, sceneLayoutOut, coerce, opts) {
158015
158046
coerce('hovermode', opts.getDfltFromLayout('hovermode'));
158016
158047
}
158017
158048
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){
158019
158050
/**
158020
158051
* Copyright 2012-2018, Plotly, Inc.
158021
158052
* All rights reserved.
@@ -163433,9 +163464,9 @@ plots.transition = function(gd, data, layout, traces, frameOpts, transitionOpts)
163433
163464
};
163434
163465
163435
163466
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;
163439
163470
163440
163471
var trace, _module, i, j;
163441
163472
@@ -163488,7 +163519,7 @@ plots.doCalcdata = function(gd, traces) {
163488
163519
);
163489
163520
}
163490
163521
163491
- clearAxesCalc (axList);
163522
+ setupAxisCategories (axList, fullData );
163492
163523
163493
163524
var hasCalcTransform = false;
163494
163525
@@ -163526,7 +163557,7 @@ plots.doCalcdata = function(gd, traces) {
163526
163557
}
163527
163558
163528
163559
// clear stuff that should recomputed in 'regular' loop
163529
- if(hasCalcTransform) clearAxesCalc (axList);
163560
+ if(hasCalcTransform) setupAxisCategories (axList, fullData );
163530
163561
163531
163562
function calci(i, isContainer) {
163532
163563
trace = fullData[i];
@@ -163584,9 +163615,13 @@ plots.doCalcdata = function(gd, traces) {
163584
163615
Registry.getComponentMethod('errorbars', 'calc')(gd);
163585
163616
};
163586
163617
163587
- function clearAxesCalc (axList) {
163618
+ function setupAxisCategories (axList, fullData ) {
163588
163619
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
+ }
163590
163625
}
163591
163626
}
163592
163627
@@ -180990,8 +181025,7 @@ function makeLinesAndLabels(plotgroup, pathinfo, gd, cd0, contours, perimeter) {
180990
181025
.classed('contourlabels', true);
180991
181026
180992
181027
if(showLabels) {
180993
- var labelClipPathData = [perimeter];
180994
-
181028
+ var labelClipPathData = [];
180995
181029
var labelData = [];
180996
181030
180997
181031
// invalidate the getTextLocation cache in case paths changed
@@ -181037,6 +181071,13 @@ function makeLinesAndLabels(plotgroup, pathinfo, gd, cd0, contours, perimeter) {
181037
181071
bounds.middle = (bounds.top + bounds.bottom) / 2;
181038
181072
bounds.center = (bounds.left + bounds.right) / 2;
181039
181073
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
+
181040
181081
var plotDiagonal = Math.sqrt(xLen * xLen + yLen * yLen);
181041
181082
181042
181083
// the path length to use to scale the number of labels to draw:
0 commit comments