plotly.js 2.8.3 → 2.10.1
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/.circleci/config.yml +39 -1
- package/.circleci/env_image.sh +1 -1
- package/.circleci/test.sh +14 -1
- package/CHANGELOG.md +29 -0
- package/CONTRIBUTING.md +1 -1
- package/README.md +12 -4
- package/dist/README.md +26 -26
- package/dist/plot-schema.json +413 -0
- package/dist/plotly-basic.js +248 -92
- package/dist/plotly-basic.min.js +5 -5
- package/dist/plotly-cartesian.js +258 -93
- package/dist/plotly-cartesian.min.js +5 -5
- package/dist/plotly-finance.js +249 -92
- package/dist/plotly-finance.min.js +4 -4
- package/dist/plotly-geo-assets.js +3 -3
- package/dist/plotly-geo.js +248 -92
- package/dist/plotly-geo.min.js +4 -4
- package/dist/plotly-gl2d.js +297 -100
- package/dist/plotly-gl2d.min.js +8 -8
- package/dist/plotly-gl3d.js +298 -100
- package/dist/plotly-gl3d.min.js +4 -4
- package/dist/plotly-locale-cs.js +1 -1
- package/dist/plotly-locale-cy.js +1 -1
- package/dist/plotly-locale-de.js +1 -1
- package/dist/plotly-locale-es.js +1 -1
- package/dist/plotly-locale-fi.js +1 -1
- package/dist/plotly-locale-fr.js +1 -1
- package/dist/plotly-locale-it.js +1 -1
- package/dist/plotly-locale-ja.js +1 -1
- package/dist/plotly-locale-ko.js +1 -1
- package/dist/plotly-locale-pt-br.js +1 -1
- package/dist/plotly-locale-pt-pt.js +1 -1
- package/dist/plotly-locale-ru.js +1 -1
- package/dist/plotly-locale-sv.js +1 -1
- package/dist/plotly-locale-sw.js +1 -1
- package/dist/plotly-locale-uk.js +1 -1
- package/dist/plotly-locale-zh-cn.js +1 -1
- package/dist/plotly-mapbox.js +248 -92
- package/dist/plotly-mapbox.min.js +3 -3
- package/dist/plotly-strict.js +311 -101
- package/dist/plotly-strict.min.js +8 -8
- package/dist/plotly-with-meta.js +324 -101
- package/dist/plotly.js +312 -101
- package/dist/plotly.min.js +11 -11
- package/dist/translation-keys.txt +1 -1
- package/lib/locales/cs.js +1 -1
- package/lib/locales/cy.js +1 -1
- package/lib/locales/de.js +1 -1
- package/lib/locales/es.js +1 -1
- package/lib/locales/fi.js +1 -1
- package/lib/locales/fr.js +1 -1
- package/lib/locales/it.js +1 -1
- package/lib/locales/ja.js +1 -1
- package/lib/locales/ko.js +1 -1
- package/lib/locales/pt-br.js +1 -1
- package/lib/locales/pt-pt.js +1 -1
- package/lib/locales/ru.js +1 -1
- package/lib/locales/sv.js +1 -1
- package/lib/locales/sw.js +1 -1
- package/lib/locales/uk.js +1 -1
- package/lib/locales/zh-cn.js +1 -1
- package/package.json +16 -13
- package/src/components/colorbar/attributes.js +1 -0
- package/src/components/colorbar/draw.js +1 -0
- package/src/components/drawing/index.js +28 -24
- package/src/components/legend/draw.js +2 -1
- package/src/components/legend/style.js +10 -6
- package/src/components/modebar/modebar.js +7 -1
- package/src/lib/svg_text_utils.js +106 -21
- package/src/plot_api/plot_config.js +9 -0
- package/src/plots/cartesian/axes.js +47 -5
- package/src/plots/cartesian/layout_attributes.js +14 -0
- package/src/plots/cartesian/tick_label_defaults.js +8 -0
- package/src/plots/gl3d/layout/axis_defaults.js +1 -0
- package/src/plots/polar/layout_attributes.js +1 -0
- package/src/plots/smith/layout_defaults.js +1 -0
- package/src/plots/ternary/layout_attributes.js +1 -0
- package/src/snapshot/tosvg.js +14 -25
- package/src/traces/carpet/ab_defaults.js +1 -0
- package/src/traces/indicator/attributes.js +1 -0
- package/src/traces/scatter/attributes.js +2 -0
- package/src/traces/scatter/defaults.js +2 -0
- package/src/traces/scatter/plot.js +4 -4
- package/src/traces/scatter/style.js +1 -1
- package/src/version.js +1 -1
- package/stackgl_modules/index.js +49 -8
- package/stackgl_modules/package-lock.json +10 -10
- package/stackgl_modules/package.json +2 -2
- package/tasks/noci_test.sh +1 -1
- package/.vscode/launch.json +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plotly.js v2.
|
|
3
|
-
* Copyright 2012-
|
|
2
|
+
* plotly.js v2.10.1
|
|
3
|
+
* Copyright 2012-2022, Plotly, Inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the MIT license
|
|
6
6
|
*/
|
|
@@ -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.10.1';
|
|
72
72
|
|
|
73
73
|
},{}]},{},[16])(16)
|
|
74
74
|
});
|
package/dist/plotly-geo.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plotly.js (geo) v2.
|
|
3
|
-
* Copyright 2012-
|
|
2
|
+
* plotly.js (geo) v2.10.1
|
|
3
|
+
* Copyright 2012-2022, Plotly, Inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the MIT license
|
|
6
6
|
*/
|
|
@@ -35413,6 +35413,7 @@ module.exports = overrideAll({
|
|
|
35413
35413
|
ticklen: axesAttrs.ticklen,
|
|
35414
35414
|
tickwidth: axesAttrs.tickwidth,
|
|
35415
35415
|
tickcolor: axesAttrs.tickcolor,
|
|
35416
|
+
ticklabelstep: axesAttrs.ticklabelstep,
|
|
35416
35417
|
showticklabels: axesAttrs.showticklabels,
|
|
35417
35418
|
tickfont: fontAttrs({
|
|
35418
35419
|
}),
|
|
@@ -36503,6 +36504,7 @@ function mockColorBarAxis(gd, opts, zrange) {
|
|
|
36503
36504
|
showticklabels: opts.showticklabels,
|
|
36504
36505
|
ticklabelposition: opts.ticklabelposition,
|
|
36505
36506
|
ticklabeloverflow: opts.ticklabeloverflow,
|
|
36507
|
+
ticklabelstep: opts.ticklabelstep,
|
|
36506
36508
|
tickfont: opts.tickfont,
|
|
36507
36509
|
tickangle: opts.tickangle,
|
|
36508
36510
|
tickformat: opts.tickformat,
|
|
@@ -38241,24 +38243,42 @@ drawing.dashStyle = function(dash, lineWidth) {
|
|
|
38241
38243
|
return dash;
|
|
38242
38244
|
};
|
|
38243
38245
|
|
|
38246
|
+
function setFillStyle(sel, trace, gd) {
|
|
38247
|
+
var markerPattern = trace.fillpattern;
|
|
38248
|
+
var patternShape = markerPattern && drawing.getPatternAttr(markerPattern.shape, 0, '');
|
|
38249
|
+
if(patternShape) {
|
|
38250
|
+
var patternBGColor = drawing.getPatternAttr(markerPattern.bgcolor, 0, null);
|
|
38251
|
+
var patternFGColor = drawing.getPatternAttr(markerPattern.fgcolor, 0, null);
|
|
38252
|
+
var patternFGOpacity = markerPattern.fgopacity;
|
|
38253
|
+
var patternSize = drawing.getPatternAttr(markerPattern.size, 0, 8);
|
|
38254
|
+
var patternSolidity = drawing.getPatternAttr(markerPattern.solidity, 0, 0.3);
|
|
38255
|
+
var patternID = trace.uid;
|
|
38256
|
+
drawing.pattern(sel, 'point', gd, patternID,
|
|
38257
|
+
patternShape, patternSize, patternSolidity,
|
|
38258
|
+
undefined, markerPattern.fillmode,
|
|
38259
|
+
patternBGColor, patternFGColor, patternFGOpacity
|
|
38260
|
+
);
|
|
38261
|
+
} else if(trace.fillcolor) {
|
|
38262
|
+
sel.call(Color.fill, trace.fillcolor);
|
|
38263
|
+
}
|
|
38264
|
+
}
|
|
38265
|
+
|
|
38244
38266
|
// Same as fillGroupStyle, except in this case the selection may be a transition
|
|
38245
|
-
drawing.singleFillStyle = function(sel) {
|
|
38267
|
+
drawing.singleFillStyle = function(sel, gd) {
|
|
38246
38268
|
var node = d3.select(sel.node());
|
|
38247
38269
|
var data = node.data();
|
|
38248
|
-
var
|
|
38249
|
-
|
|
38250
|
-
sel.call(Color.fill, fillcolor);
|
|
38251
|
-
}
|
|
38270
|
+
var trace = ((data[0] || [])[0] || {}).trace || {};
|
|
38271
|
+
setFillStyle(sel, trace, gd);
|
|
38252
38272
|
};
|
|
38253
38273
|
|
|
38254
|
-
drawing.fillGroupStyle = function(s) {
|
|
38274
|
+
drawing.fillGroupStyle = function(s, gd) {
|
|
38255
38275
|
s.style('stroke-width', 0)
|
|
38256
38276
|
.each(function(d) {
|
|
38257
38277
|
var shape = d3.select(this);
|
|
38258
38278
|
// N.B. 'd' won't be a calcdata item when
|
|
38259
38279
|
// fill !== 'none' on a segment-less and marker-less trace
|
|
38260
38280
|
if(d[0].trace) {
|
|
38261
|
-
shape
|
|
38281
|
+
setFillStyle(shape, d[0].trace, gd);
|
|
38262
38282
|
}
|
|
38263
38283
|
});
|
|
38264
38284
|
};
|
|
@@ -38411,12 +38431,7 @@ drawing.gradient = function(sel, gd, gradientID, type, colorscale, prop) {
|
|
|
38411
38431
|
sel.style(prop, getFullUrl(fullID, gd))
|
|
38412
38432
|
.style(prop + '-opacity', null);
|
|
38413
38433
|
|
|
38414
|
-
|
|
38415
|
-
return '.' + s.attr('class').replace(/\s/g, '.');
|
|
38416
|
-
};
|
|
38417
|
-
var k = className2query(d3.select(sel.node().parentNode)) +
|
|
38418
|
-
'>' + className2query(sel);
|
|
38419
|
-
fullLayout._gradientUrlQueryParts[k] = 1;
|
|
38434
|
+
sel.classed('gradient_filled', true);
|
|
38420
38435
|
};
|
|
38421
38436
|
|
|
38422
38437
|
/**
|
|
@@ -38623,11 +38638,6 @@ drawing.pattern = function(sel, calledBy, gd, patternID, shape, size, solidity,
|
|
|
38623
38638
|
.style('fill-opacity', null);
|
|
38624
38639
|
|
|
38625
38640
|
sel.classed('pattern_filled', true);
|
|
38626
|
-
var className2query = function(s) {
|
|
38627
|
-
return '.' + s.attr('class').replace(/\s/g, '.');
|
|
38628
|
-
};
|
|
38629
|
-
var k = className2query(d3.select(sel.node().parentNode)) + '>.pattern_filled';
|
|
38630
|
-
fullLayout._patternUrlQueryParts[k] = 1;
|
|
38631
38641
|
};
|
|
38632
38642
|
|
|
38633
38643
|
/*
|
|
@@ -38643,9 +38653,7 @@ drawing.initGradients = function(gd) {
|
|
|
38643
38653
|
var gradientsGroup = Lib.ensureSingle(fullLayout._defs, 'g', 'gradients');
|
|
38644
38654
|
gradientsGroup.selectAll('linearGradient,radialGradient').remove();
|
|
38645
38655
|
|
|
38646
|
-
|
|
38647
|
-
// used to fix URL strings during image exports
|
|
38648
|
-
fullLayout._gradientUrlQueryParts = {};
|
|
38656
|
+
d3.select(gd).selectAll('.gradient_filled').classed('gradient_filled', false);
|
|
38649
38657
|
};
|
|
38650
38658
|
|
|
38651
38659
|
drawing.initPatterns = function(gd) {
|
|
@@ -38654,9 +38662,7 @@ drawing.initPatterns = function(gd) {
|
|
|
38654
38662
|
var patternsGroup = Lib.ensureSingle(fullLayout._defs, 'g', 'patterns');
|
|
38655
38663
|
patternsGroup.selectAll('pattern').remove();
|
|
38656
38664
|
|
|
38657
|
-
|
|
38658
|
-
// used to fix URL strings during image exports
|
|
38659
|
-
fullLayout._patternUrlQueryParts = {};
|
|
38665
|
+
d3.select(gd).selectAll('.pattern_filled').classed('pattern_filled', false);
|
|
38660
38666
|
};
|
|
38661
38667
|
|
|
38662
38668
|
drawing.getPatternAttr = function(mp, i, dflt) {
|
|
@@ -45309,7 +45315,6 @@ function computeLegendDimensions(gd, groups, traces, legendObj) {
|
|
|
45309
45315
|
offsetY += h;
|
|
45310
45316
|
maxWidthInGroup = Math.max(maxWidthInGroup, textGap + w);
|
|
45311
45317
|
});
|
|
45312
|
-
maxGroupHeightInRow = Math.max(maxGroupHeightInRow, offsetY);
|
|
45313
45318
|
|
|
45314
45319
|
var next = maxWidthInGroup + itemGap;
|
|
45315
45320
|
|
|
@@ -45325,6 +45330,8 @@ function computeLegendDimensions(gd, groups, traces, legendObj) {
|
|
|
45325
45330
|
groupOffsetX = 0;
|
|
45326
45331
|
groupOffsetY += maxGroupHeightInRow + traceGroupGap;
|
|
45327
45332
|
maxGroupHeightInRow = offsetY;
|
|
45333
|
+
} else {
|
|
45334
|
+
maxGroupHeightInRow = Math.max(maxGroupHeightInRow, offsetY);
|
|
45328
45335
|
}
|
|
45329
45336
|
|
|
45330
45337
|
Drawing.setTranslate(this, groupOffsetX, groupOffsetY);
|
|
@@ -45992,12 +45999,16 @@ module.exports = function style(s, gd, legend) {
|
|
|
45992
45999
|
var colorscale = cOpts.colorscale;
|
|
45993
46000
|
var reversescale = cOpts.reversescale;
|
|
45994
46001
|
|
|
45995
|
-
var
|
|
46002
|
+
var fillStyle = function(s) {
|
|
45996
46003
|
if(s.size()) {
|
|
45997
|
-
|
|
45998
|
-
|
|
45999
|
-
|
|
46000
|
-
|
|
46004
|
+
if(showFill) {
|
|
46005
|
+
Drawing.fillGroupStyle(s, gd);
|
|
46006
|
+
} else {
|
|
46007
|
+
var gradientID = 'legendfill-' + trace.uid;
|
|
46008
|
+
Drawing.gradient(s, gd, gradientID,
|
|
46009
|
+
getGradientDirection(reversescale),
|
|
46010
|
+
colorscale, 'fill');
|
|
46011
|
+
}
|
|
46001
46012
|
}
|
|
46002
46013
|
};
|
|
46003
46014
|
|
|
@@ -46026,7 +46037,7 @@ module.exports = function style(s, gd, legend) {
|
|
|
46026
46037
|
fill.enter().append('path').classed('js-fill', true);
|
|
46027
46038
|
fill.exit().remove();
|
|
46028
46039
|
fill.attr('d', pathStart + 'h' + itemWidth + 'v6h-' + itemWidth + 'z')
|
|
46029
|
-
.call(
|
|
46040
|
+
.call(fillStyle);
|
|
46030
46041
|
|
|
46031
46042
|
if(showLine || showGradientLine) {
|
|
46032
46043
|
var lw = boundLineWidth(undefined, trace.line, MAX_LINE_WIDTH, CST_LINE_WIDTH);
|
|
@@ -47807,6 +47818,8 @@ var isNumeric = _dereq_('fast-isnumeric');
|
|
|
47807
47818
|
|
|
47808
47819
|
var Lib = _dereq_('../../lib');
|
|
47809
47820
|
var Icons = _dereq_('../../fonts/ploticon');
|
|
47821
|
+
var version = _dereq_('../../version').version;
|
|
47822
|
+
|
|
47810
47823
|
var Parser = new DOMParser();
|
|
47811
47824
|
|
|
47812
47825
|
/**
|
|
@@ -48085,6 +48098,10 @@ proto.hasButtons = function(buttons) {
|
|
|
48085
48098
|
return true;
|
|
48086
48099
|
};
|
|
48087
48100
|
|
|
48101
|
+
function jsVersion(str) {
|
|
48102
|
+
return str + ' (v' + version + ')';
|
|
48103
|
+
}
|
|
48104
|
+
|
|
48088
48105
|
/**
|
|
48089
48106
|
* @return {HTMLDivElement} The logo image wrapped in a group
|
|
48090
48107
|
*/
|
|
@@ -48094,7 +48111,7 @@ proto.getLogo = function() {
|
|
|
48094
48111
|
|
|
48095
48112
|
a.href = 'https://plotly.com/';
|
|
48096
48113
|
a.target = '_blank';
|
|
48097
|
-
a.setAttribute('data-title', Lib._(this.graphInfo, 'Produced with Plotly'));
|
|
48114
|
+
a.setAttribute('data-title', jsVersion(Lib._(this.graphInfo, 'Produced with Plotly.js')));
|
|
48098
48115
|
a.className = 'modebar-btn plotlyjsicon modebar-btn--logo';
|
|
48099
48116
|
|
|
48100
48117
|
a.appendChild(this.createIcon(Icons.newplotlylogo));
|
|
@@ -48136,7 +48153,7 @@ function createModeBar(gd, buttons) {
|
|
|
48136
48153
|
|
|
48137
48154
|
module.exports = createModeBar;
|
|
48138
48155
|
|
|
48139
|
-
},{"../../fonts/ploticon":229,"../../lib":248,"@plotly/d3":11,"fast-isnumeric":30}],182:[function(_dereq_,module,exports){
|
|
48156
|
+
},{"../../fonts/ploticon":229,"../../lib":248,"../../version":407,"@plotly/d3":11,"fast-isnumeric":30}],182:[function(_dereq_,module,exports){
|
|
48140
48157
|
'use strict';
|
|
48141
48158
|
|
|
48142
48159
|
var fontAttrs = _dereq_('../../plots/font_attributes');
|
|
@@ -61132,6 +61149,7 @@ exports.convertToTspans = function(_context, gd, _callback) {
|
|
|
61132
61149
|
// Until we get tex integrated more fully (so it can be used along with non-tex)
|
|
61133
61150
|
// allow some elements to prohibit it by attaching 'data-notex' to the original
|
|
61134
61151
|
var tex = (!_context.attr('data-notex')) &&
|
|
61152
|
+
gd && gd._context.typesetMath &&
|
|
61135
61153
|
(typeof MathJax !== 'undefined') &&
|
|
61136
61154
|
str.match(FIND_TEX);
|
|
61137
61155
|
|
|
@@ -61286,70 +61304,154 @@ function cleanEscapesForTex(s) {
|
|
|
61286
61304
|
.replace(GT_MATCH, '\\gt ');
|
|
61287
61305
|
}
|
|
61288
61306
|
|
|
61307
|
+
var inlineMath = [['$', '$'], ['\\(', '\\)']];
|
|
61308
|
+
|
|
61289
61309
|
function texToSVG(_texString, _config, _callback) {
|
|
61310
|
+
var MathJaxVersion = parseInt(
|
|
61311
|
+
(MathJax.version || '').split('.')[0]
|
|
61312
|
+
);
|
|
61313
|
+
|
|
61314
|
+
if(
|
|
61315
|
+
MathJaxVersion !== 2 &&
|
|
61316
|
+
MathJaxVersion !== 3
|
|
61317
|
+
) {
|
|
61318
|
+
Lib.warn('No MathJax version:', MathJax.version);
|
|
61319
|
+
return;
|
|
61320
|
+
}
|
|
61321
|
+
|
|
61290
61322
|
var originalRenderer,
|
|
61291
61323
|
originalConfig,
|
|
61292
61324
|
originalProcessSectionDelay,
|
|
61293
61325
|
tmpDiv;
|
|
61294
61326
|
|
|
61295
|
-
|
|
61296
|
-
function() {
|
|
61327
|
+
var setConfig2 = function() {
|
|
61297
61328
|
originalConfig = Lib.extendDeepAll({}, MathJax.Hub.config);
|
|
61298
61329
|
|
|
61299
61330
|
originalProcessSectionDelay = MathJax.Hub.processSectionDelay;
|
|
61300
61331
|
if(MathJax.Hub.processSectionDelay !== undefined) {
|
|
61301
|
-
// MathJax 2.5+
|
|
61332
|
+
// MathJax 2.5+ but not 3+
|
|
61302
61333
|
MathJax.Hub.processSectionDelay = 0;
|
|
61303
61334
|
}
|
|
61304
61335
|
|
|
61305
61336
|
return MathJax.Hub.Config({
|
|
61306
61337
|
messageStyle: 'none',
|
|
61307
61338
|
tex2jax: {
|
|
61308
|
-
inlineMath:
|
|
61339
|
+
inlineMath: inlineMath
|
|
61309
61340
|
},
|
|
61310
61341
|
displayAlign: 'left',
|
|
61311
61342
|
});
|
|
61312
|
-
}
|
|
61313
|
-
|
|
61314
|
-
|
|
61343
|
+
};
|
|
61344
|
+
|
|
61345
|
+
var setConfig3 = function() {
|
|
61346
|
+
originalConfig = Lib.extendDeepAll({}, MathJax.config);
|
|
61347
|
+
|
|
61348
|
+
if(!MathJax.config.tex) {
|
|
61349
|
+
MathJax.config.tex = {};
|
|
61350
|
+
}
|
|
61351
|
+
|
|
61352
|
+
MathJax.config.tex.inlineMath = inlineMath;
|
|
61353
|
+
};
|
|
61354
|
+
|
|
61355
|
+
var setRenderer2 = function() {
|
|
61315
61356
|
originalRenderer = MathJax.Hub.config.menuSettings.renderer;
|
|
61316
61357
|
if(originalRenderer !== 'SVG') {
|
|
61317
61358
|
return MathJax.Hub.setRenderer('SVG');
|
|
61318
61359
|
}
|
|
61319
|
-
}
|
|
61320
|
-
|
|
61360
|
+
};
|
|
61361
|
+
|
|
61362
|
+
var setRenderer3 = function() {
|
|
61363
|
+
originalRenderer = MathJax.config.startup.output;
|
|
61364
|
+
if(originalRenderer !== 'svg') {
|
|
61365
|
+
MathJax.config.startup.output = 'svg';
|
|
61366
|
+
}
|
|
61367
|
+
};
|
|
61368
|
+
|
|
61369
|
+
var initiateMathJax = function() {
|
|
61321
61370
|
var randomID = 'math-output-' + Lib.randstr({}, 64);
|
|
61322
61371
|
tmpDiv = d3.select('body').append('div')
|
|
61323
61372
|
.attr({id: randomID})
|
|
61324
|
-
.style({
|
|
61325
|
-
|
|
61373
|
+
.style({
|
|
61374
|
+
visibility: 'hidden',
|
|
61375
|
+
position: 'absolute',
|
|
61376
|
+
'font-size': _config.fontSize + 'px'
|
|
61377
|
+
})
|
|
61326
61378
|
.text(cleanEscapesForTex(_texString));
|
|
61327
61379
|
|
|
61328
|
-
|
|
61329
|
-
},
|
|
61330
|
-
function() {
|
|
61331
|
-
var glyphDefs = d3.select('body').select('#MathJax_SVG_glyphs');
|
|
61380
|
+
var tmpNode = tmpDiv.node();
|
|
61332
61381
|
|
|
61333
|
-
|
|
61382
|
+
return MathJaxVersion === 2 ?
|
|
61383
|
+
MathJax.Hub.Typeset(tmpNode) :
|
|
61384
|
+
MathJax.typeset([tmpNode]);
|
|
61385
|
+
};
|
|
61386
|
+
|
|
61387
|
+
var finalizeMathJax = function() {
|
|
61388
|
+
var sel = tmpDiv.select(
|
|
61389
|
+
MathJaxVersion === 2 ? '.MathJax_SVG' : '.MathJax'
|
|
61390
|
+
);
|
|
61391
|
+
|
|
61392
|
+
var node = !sel.empty() && tmpDiv.select('svg').node();
|
|
61393
|
+
if(!node) {
|
|
61334
61394
|
Lib.log('There was an error in the tex syntax.', _texString);
|
|
61335
61395
|
_callback();
|
|
61336
61396
|
} else {
|
|
61337
|
-
var
|
|
61338
|
-
|
|
61397
|
+
var nodeBBox = node.getBoundingClientRect();
|
|
61398
|
+
var glyphDefs;
|
|
61399
|
+
if(MathJaxVersion === 2) {
|
|
61400
|
+
glyphDefs = d3.select('body').select('#MathJax_SVG_glyphs');
|
|
61401
|
+
} else {
|
|
61402
|
+
glyphDefs = sel.select('defs');
|
|
61403
|
+
}
|
|
61404
|
+
_callback(sel, glyphDefs, nodeBBox);
|
|
61339
61405
|
}
|
|
61340
61406
|
|
|
61341
61407
|
tmpDiv.remove();
|
|
61408
|
+
};
|
|
61342
61409
|
|
|
61410
|
+
var resetRenderer2 = function() {
|
|
61343
61411
|
if(originalRenderer !== 'SVG') {
|
|
61344
61412
|
return MathJax.Hub.setRenderer(originalRenderer);
|
|
61345
61413
|
}
|
|
61346
|
-
}
|
|
61347
|
-
|
|
61414
|
+
};
|
|
61415
|
+
|
|
61416
|
+
var resetRenderer3 = function() {
|
|
61417
|
+
if(originalRenderer !== 'svg') {
|
|
61418
|
+
MathJax.config.startup.output = originalRenderer;
|
|
61419
|
+
}
|
|
61420
|
+
};
|
|
61421
|
+
|
|
61422
|
+
var resetConfig2 = function() {
|
|
61348
61423
|
if(originalProcessSectionDelay !== undefined) {
|
|
61349
61424
|
MathJax.Hub.processSectionDelay = originalProcessSectionDelay;
|
|
61350
61425
|
}
|
|
61351
61426
|
return MathJax.Hub.Config(originalConfig);
|
|
61352
|
-
}
|
|
61427
|
+
};
|
|
61428
|
+
|
|
61429
|
+
var resetConfig3 = function() {
|
|
61430
|
+
MathJax.config = originalConfig;
|
|
61431
|
+
};
|
|
61432
|
+
|
|
61433
|
+
if(MathJaxVersion === 2) {
|
|
61434
|
+
MathJax.Hub.Queue(
|
|
61435
|
+
setConfig2,
|
|
61436
|
+
setRenderer2,
|
|
61437
|
+
initiateMathJax,
|
|
61438
|
+
finalizeMathJax,
|
|
61439
|
+
resetRenderer2,
|
|
61440
|
+
resetConfig2
|
|
61441
|
+
);
|
|
61442
|
+
} else if(MathJaxVersion === 3) {
|
|
61443
|
+
setConfig3();
|
|
61444
|
+
setRenderer3();
|
|
61445
|
+
MathJax.startup.defaultReady();
|
|
61446
|
+
|
|
61447
|
+
MathJax.startup.promise.then(function() {
|
|
61448
|
+
initiateMathJax();
|
|
61449
|
+
finalizeMathJax();
|
|
61450
|
+
|
|
61451
|
+
resetRenderer3();
|
|
61452
|
+
resetConfig3();
|
|
61453
|
+
});
|
|
61454
|
+
}
|
|
61353
61455
|
}
|
|
61354
61456
|
|
|
61355
61457
|
var TAG_STYLES = {
|
|
@@ -67195,6 +67297,11 @@ var configAttributes = {
|
|
|
67195
67297
|
dflt: false,
|
|
67196
67298
|
},
|
|
67197
67299
|
|
|
67300
|
+
typesetMath: {
|
|
67301
|
+
valType: 'boolean',
|
|
67302
|
+
dflt: true,
|
|
67303
|
+
},
|
|
67304
|
+
|
|
67198
67305
|
plotlyServerURL: {
|
|
67199
67306
|
valType: 'string',
|
|
67200
67307
|
dflt: '',
|
|
@@ -72040,7 +72147,8 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
72040
72147
|
var minRange = Math.min(rng[0], rng[1]);
|
|
72041
72148
|
var maxRange = Math.max(rng[0], rng[1]);
|
|
72042
72149
|
|
|
72043
|
-
var
|
|
72150
|
+
var numDtick = isNumeric(ax.dtick);
|
|
72151
|
+
var isDLog = (ax.type === 'log') && !(numDtick || ax.dtick.charAt(0) === 'L');
|
|
72044
72152
|
var isPeriod = ax.ticklabelmode === 'period';
|
|
72045
72153
|
|
|
72046
72154
|
// find the first tick
|
|
@@ -72071,13 +72179,36 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
72071
72179
|
x = axes.tickIncrement(x, ax.dtick, !axrev, ax.calendar);
|
|
72072
72180
|
}
|
|
72073
72181
|
|
|
72182
|
+
var ticklabelstep = ax.ticklabelstep;
|
|
72183
|
+
|
|
72074
72184
|
var maxTicks = Math.max(1000, ax._length || 0);
|
|
72075
72185
|
var tickVals = [];
|
|
72076
72186
|
var xPrevious = null;
|
|
72187
|
+
|
|
72188
|
+
var dTick;
|
|
72189
|
+
if(numDtick) {
|
|
72190
|
+
dTick = ax.dtick;
|
|
72191
|
+
} else {
|
|
72192
|
+
if(ax.type === 'date') {
|
|
72193
|
+
if(typeof ax.dtick === 'string' && ax.dtick.charAt(0) === 'M') {
|
|
72194
|
+
dTick = ONEAVGMONTH * ax.dtick.substring(1);
|
|
72195
|
+
}
|
|
72196
|
+
} else {
|
|
72197
|
+
dTick = ax._roughDTick;
|
|
72198
|
+
}
|
|
72199
|
+
}
|
|
72200
|
+
|
|
72201
|
+
var id = Math.round((
|
|
72202
|
+
ax.r2l(x) -
|
|
72203
|
+
ax.r2l(ax.tick0)
|
|
72204
|
+
) / dTick) - 1;
|
|
72205
|
+
|
|
72077
72206
|
for(;
|
|
72078
72207
|
(axrev) ? (x >= endTick) : (x <= endTick);
|
|
72079
72208
|
x = axes.tickIncrement(x, ax.dtick, axrev, ax.calendar)
|
|
72080
72209
|
) {
|
|
72210
|
+
id++;
|
|
72211
|
+
|
|
72081
72212
|
if(ax.rangebreaks) {
|
|
72082
72213
|
if(!axrev) {
|
|
72083
72214
|
if(x < startTick) continue;
|
|
@@ -72095,10 +72226,16 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
72095
72226
|
minor = true;
|
|
72096
72227
|
}
|
|
72097
72228
|
|
|
72098
|
-
|
|
72229
|
+
var obj = {
|
|
72099
72230
|
minor: minor,
|
|
72100
72231
|
value: x
|
|
72101
|
-
}
|
|
72232
|
+
};
|
|
72233
|
+
|
|
72234
|
+
if(ticklabelstep > 1 && id % ticklabelstep) {
|
|
72235
|
+
obj.skipLabel = true;
|
|
72236
|
+
}
|
|
72237
|
+
|
|
72238
|
+
tickVals.push(obj);
|
|
72102
72239
|
}
|
|
72103
72240
|
|
|
72104
72241
|
if(isPeriod) positionPeriodTicks(tickVals, ax, ax._definedDelta);
|
|
@@ -72151,12 +72288,20 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
72151
72288
|
ax._prevDateHead = '';
|
|
72152
72289
|
ax._inCalcTicks = true;
|
|
72153
72290
|
|
|
72291
|
+
var lastVisibleHead;
|
|
72292
|
+
var hideLabel = function(tick) {
|
|
72293
|
+
tick.text = ' '; // don't use an empty string here which can confuse automargin (issue 5132)
|
|
72294
|
+
ax._prevDateHead = lastVisibleHead;
|
|
72295
|
+
};
|
|
72296
|
+
|
|
72154
72297
|
var ticksOut = [];
|
|
72155
72298
|
var t, p;
|
|
72156
72299
|
for(i = 0; i < tickVals.length; i++) {
|
|
72157
72300
|
var _minor = tickVals[i].minor;
|
|
72158
72301
|
var _value = tickVals[i].value;
|
|
72159
72302
|
|
|
72303
|
+
lastVisibleHead = ax._prevDateHead;
|
|
72304
|
+
|
|
72160
72305
|
t = axes.tickText(
|
|
72161
72306
|
ax,
|
|
72162
72307
|
_value,
|
|
@@ -72171,11 +72316,14 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
72171
72316
|
if(p > maxRange) t.periodX = maxRange;
|
|
72172
72317
|
if(p < minRange) t.periodX = minRange;
|
|
72173
72318
|
|
|
72174
|
-
t
|
|
72175
|
-
ax._prevDateHead = '';
|
|
72319
|
+
hideLabel(t);
|
|
72176
72320
|
}
|
|
72177
72321
|
}
|
|
72178
72322
|
|
|
72323
|
+
if(tickVals[i].skipLabel) {
|
|
72324
|
+
hideLabel(t);
|
|
72325
|
+
}
|
|
72326
|
+
|
|
72179
72327
|
ticksOut.push(t);
|
|
72180
72328
|
}
|
|
72181
72329
|
|
|
@@ -74203,6 +74351,7 @@ axes.drawLabels = function(gd, ax, opts) {
|
|
|
74203
74351
|
var axId = ax._id;
|
|
74204
74352
|
var axLetter = axId.charAt(0);
|
|
74205
74353
|
var cls = opts.cls || axId + 'tick';
|
|
74354
|
+
|
|
74206
74355
|
var vals = opts.vals;
|
|
74207
74356
|
|
|
74208
74357
|
var labelFns = opts.labelFns;
|
|
@@ -79059,6 +79208,12 @@ module.exports = {
|
|
|
79059
79208
|
editType: 'ticks',
|
|
79060
79209
|
impliedEdits: {tickmode: 'linear'},
|
|
79061
79210
|
},
|
|
79211
|
+
ticklabelstep: {
|
|
79212
|
+
valType: 'integer',
|
|
79213
|
+
min: 1,
|
|
79214
|
+
dflt: 1,
|
|
79215
|
+
editType: 'ticks',
|
|
79216
|
+
},
|
|
79062
79217
|
tickvals: {
|
|
79063
79218
|
valType: 'data_array',
|
|
79064
79219
|
editType: 'ticks',
|
|
@@ -81923,6 +82078,14 @@ module.exports = function handleTickLabelDefaults(containerIn, containerOut, coe
|
|
|
81923
82078
|
color: dfltFontColor
|
|
81924
82079
|
});
|
|
81925
82080
|
|
|
82081
|
+
if(
|
|
82082
|
+
!options.noTicklabelstep &&
|
|
82083
|
+
axType !== 'multicategory' &&
|
|
82084
|
+
axType !== 'log'
|
|
82085
|
+
) {
|
|
82086
|
+
coerce('ticklabelstep');
|
|
82087
|
+
}
|
|
82088
|
+
|
|
81926
82089
|
if(!options.noAng) coerce('tickangle');
|
|
81927
82090
|
|
|
81928
82091
|
if(axType !== 'category') {
|
|
@@ -90069,7 +90232,7 @@ module.exports = function toSVG(gd, format, scale) {
|
|
|
90069
90232
|
var toppaper = fullLayout._toppaper;
|
|
90070
90233
|
var width = fullLayout.width;
|
|
90071
90234
|
var height = fullLayout.height;
|
|
90072
|
-
var i
|
|
90235
|
+
var i;
|
|
90073
90236
|
|
|
90074
90237
|
// make background color a rect in the svg, then revert after scraping
|
|
90075
90238
|
// all other alterations have been dealt with by properly preparing the svg
|
|
@@ -90142,32 +90305,21 @@ module.exports = function toSVG(gd, format, scale) {
|
|
|
90142
90305
|
}
|
|
90143
90306
|
});
|
|
90144
90307
|
|
|
90145
|
-
|
|
90146
|
-
|
|
90147
|
-
for(k in fullLayout._gradientUrlQueryParts) queryParts.push(k);
|
|
90148
|
-
}
|
|
90149
|
-
|
|
90150
|
-
if(fullLayout._patternUrlQueryParts) {
|
|
90151
|
-
for(k in fullLayout._patternUrlQueryParts) queryParts.push(k);
|
|
90152
|
-
}
|
|
90153
|
-
|
|
90154
|
-
if(queryParts.length) {
|
|
90155
|
-
svg.selectAll(queryParts.join(',')).each(function() {
|
|
90156
|
-
var pt = d3.select(this);
|
|
90308
|
+
svg.selectAll('.gradient_filled,.pattern_filled').each(function() {
|
|
90309
|
+
var pt = d3.select(this);
|
|
90157
90310
|
|
|
90158
|
-
|
|
90159
|
-
|
|
90160
|
-
|
|
90161
|
-
|
|
90162
|
-
|
|
90163
|
-
|
|
90311
|
+
// similar to font family styles above,
|
|
90312
|
+
// we must remove " after the SVG DOM has been serialized
|
|
90313
|
+
var fill = this.style.fill;
|
|
90314
|
+
if(fill && fill.indexOf('url(') !== -1) {
|
|
90315
|
+
pt.style('fill', fill.replace(DOUBLEQUOTE_REGEX, DUMMY_SUB));
|
|
90316
|
+
}
|
|
90164
90317
|
|
|
90165
|
-
|
|
90166
|
-
|
|
90167
|
-
|
|
90168
|
-
|
|
90169
|
-
|
|
90170
|
-
}
|
|
90318
|
+
var stroke = this.style.stroke;
|
|
90319
|
+
if(stroke && stroke.indexOf('url(') !== -1) {
|
|
90320
|
+
pt.style('stroke', stroke.replace(DOUBLEQUOTE_REGEX, DUMMY_SUB));
|
|
90321
|
+
}
|
|
90322
|
+
});
|
|
90171
90323
|
|
|
90172
90324
|
if(format === 'pdf' || format === 'eps') {
|
|
90173
90325
|
// these formats make the extra line MathJax adds around symbols look super thick in some cases
|
|
@@ -90809,6 +90961,7 @@ var hovertemplateAttrs = _dereq_('../../plots/template_attributes').hovertemplat
|
|
|
90809
90961
|
var colorScaleAttrs = _dereq_('../../components/colorscale/attributes');
|
|
90810
90962
|
var fontAttrs = _dereq_('../../plots/font_attributes');
|
|
90811
90963
|
var dash = _dereq_('../../components/drawing/attributes').dash;
|
|
90964
|
+
var pattern = _dereq_('../../components/drawing/attributes').pattern;
|
|
90812
90965
|
|
|
90813
90966
|
var Drawing = _dereq_('../../components/drawing');
|
|
90814
90967
|
var constants = _dereq_('./constants');
|
|
@@ -90996,6 +91149,7 @@ module.exports = {
|
|
|
90996
91149
|
editType: 'style',
|
|
90997
91150
|
anim: true,
|
|
90998
91151
|
},
|
|
91152
|
+
fillpattern: pattern,
|
|
90999
91153
|
marker: extendFlat({
|
|
91000
91154
|
symbol: {
|
|
91001
91155
|
valType: 'enumerated',
|
|
@@ -91732,6 +91886,7 @@ var handleLineDefaults = _dereq_('./line_defaults');
|
|
|
91732
91886
|
var handleLineShapeDefaults = _dereq_('./line_shape_defaults');
|
|
91733
91887
|
var handleTextDefaults = _dereq_('./text_defaults');
|
|
91734
91888
|
var handleFillColorDefaults = _dereq_('./fillcolor_defaults');
|
|
91889
|
+
var coercePattern = _dereq_('../../lib').coercePattern;
|
|
91735
91890
|
|
|
91736
91891
|
module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
|
|
91737
91892
|
function coerce(attr, dflt) {
|
|
@@ -91785,6 +91940,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
|
|
|
91785
91940
|
if(traceOut.fill !== 'none') {
|
|
91786
91941
|
handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce);
|
|
91787
91942
|
if(!subTypes.hasLines(traceOut)) handleLineShapeDefaults(traceIn, traceOut, coerce);
|
|
91943
|
+
coercePattern(coerce, 'fillpattern', traceOut.fillcolor, false);
|
|
91788
91944
|
}
|
|
91789
91945
|
|
|
91790
91946
|
var lineColor = (traceOut.line || {}).color;
|
|
@@ -93167,11 +93323,11 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
|
|
|
93167
93323
|
// the points on the axes are the first two points. Otherwise
|
|
93168
93324
|
// animations get a little crazy if the number of points changes.
|
|
93169
93325
|
transition(ownFillEl3).attr('d', 'M' + pt1 + 'L' + pt0 + 'L' + fullpath.substr(1))
|
|
93170
|
-
.call(Drawing.singleFillStyle);
|
|
93326
|
+
.call(Drawing.singleFillStyle, gd);
|
|
93171
93327
|
} else {
|
|
93172
93328
|
// fill to self: just join the path to itself
|
|
93173
93329
|
transition(ownFillEl3).attr('d', fullpath + 'Z')
|
|
93174
|
-
.call(Drawing.singleFillStyle);
|
|
93330
|
+
.call(Drawing.singleFillStyle, gd);
|
|
93175
93331
|
}
|
|
93176
93332
|
}
|
|
93177
93333
|
} else if(tonext) {
|
|
@@ -93183,7 +93339,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
|
|
|
93183
93339
|
// This makes strange results if one path is *not* entirely
|
|
93184
93340
|
// inside the other, but then that is a strange usage.
|
|
93185
93341
|
transition(tonext).attr('d', fullpath + 'Z' + prevRevpath + 'Z')
|
|
93186
|
-
.call(Drawing.singleFillStyle);
|
|
93342
|
+
.call(Drawing.singleFillStyle, gd);
|
|
93187
93343
|
} else {
|
|
93188
93344
|
// tonextx/y: for now just connect endpoints with lines. This is
|
|
93189
93345
|
// the correct behavior if the endpoints are at the same value of
|
|
@@ -93191,7 +93347,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
|
|
|
93191
93347
|
// things depending on whether the new endpoint projects onto the
|
|
93192
93348
|
// existing curve or off the end of it
|
|
93193
93349
|
transition(tonext).attr('d', fullpath + 'L' + prevRevpath.substr(1) + 'Z')
|
|
93194
|
-
.call(Drawing.singleFillStyle);
|
|
93350
|
+
.call(Drawing.singleFillStyle, gd);
|
|
93195
93351
|
}
|
|
93196
93352
|
trace._polygons = trace._polygons.concat(prevPolygons);
|
|
93197
93353
|
} else {
|
|
@@ -93584,7 +93740,7 @@ function style(gd) {
|
|
|
93584
93740
|
.call(Drawing.lineGroupStyle);
|
|
93585
93741
|
|
|
93586
93742
|
s.selectAll('g.trace path.js-fill')
|
|
93587
|
-
.call(Drawing.fillGroupStyle);
|
|
93743
|
+
.call(Drawing.fillGroupStyle, gd);
|
|
93588
93744
|
|
|
93589
93745
|
Registry.getComponentMethod('errorbars', 'style')(s);
|
|
93590
93746
|
}
|
|
@@ -95378,7 +95534,7 @@ function getSortFunc(opts, d2c) {
|
|
|
95378
95534
|
'use strict';
|
|
95379
95535
|
|
|
95380
95536
|
// package version injected by `npm run preprocess`
|
|
95381
|
-
exports.version = '2.
|
|
95537
|
+
exports.version = '2.10.1';
|
|
95382
95538
|
|
|
95383
95539
|
},{}]},{},[8])(8)
|
|
95384
95540
|
});
|