plotly.js 2.8.2 → 2.10.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/.circleci/config.yml +39 -1
- package/.circleci/env_image.sh +1 -1
- package/.circleci/test.sh +14 -1
- package/CHANGELOG.md +30 -1
- 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 +253 -96
- package/dist/plotly-basic.min.js +5 -5
- package/dist/plotly-cartesian.js +263 -97
- package/dist/plotly-cartesian.min.js +5 -5
- package/dist/plotly-finance.js +254 -96
- 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 +248 -92
- package/dist/plotly-gl2d.min.js +7 -7
- package/dist/plotly-gl3d.js +249 -92
- package/dist/plotly-gl3d.min.js +3 -3
- 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 +267 -97
- package/dist/plotly-strict.min.js +7 -7
- package/dist/plotly-with-meta.js +280 -97
- package/dist/plotly.js +268 -97
- 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 +15 -12
- 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/bar/plot.js +5 -4
- 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/tasks/noci_test.sh +1 -1
- package/.vscode/launch.json +0 -0
package/dist/plotly-cartesian.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plotly.js (cartesian) v2.
|
|
3
|
-
* Copyright 2012-
|
|
2
|
+
* plotly.js (cartesian) v2.10.0
|
|
3
|
+
* Copyright 2012-2022, Plotly, Inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the MIT license
|
|
6
6
|
*/
|
|
@@ -15724,7 +15724,15 @@ exports.readUInt32BE = function (data, offset) {
|
|
|
15724
15724
|
|
|
15725
15725
|
function ProbeError(message, code, statusCode) {
|
|
15726
15726
|
Error.call(this);
|
|
15727
|
-
|
|
15727
|
+
|
|
15728
|
+
// Include stack trace in error object
|
|
15729
|
+
if (Error.captureStackTrace) {
|
|
15730
|
+
// Chrome and NodeJS
|
|
15731
|
+
Error.captureStackTrace(this, this.constructor);
|
|
15732
|
+
} else {
|
|
15733
|
+
// FF, IE 10+ and Safari 6+. Fallback for others
|
|
15734
|
+
this.stack = (new Error()).stack || '';
|
|
15735
|
+
}
|
|
15728
15736
|
|
|
15729
15737
|
this.name = this.constructor.name;
|
|
15730
15738
|
|
|
@@ -30822,6 +30830,7 @@ module.exports = overrideAll({
|
|
|
30822
30830
|
ticklen: axesAttrs.ticklen,
|
|
30823
30831
|
tickwidth: axesAttrs.tickwidth,
|
|
30824
30832
|
tickcolor: axesAttrs.tickcolor,
|
|
30833
|
+
ticklabelstep: axesAttrs.ticklabelstep,
|
|
30825
30834
|
showticklabels: axesAttrs.showticklabels,
|
|
30826
30835
|
tickfont: fontAttrs({
|
|
30827
30836
|
}),
|
|
@@ -31912,6 +31921,7 @@ function mockColorBarAxis(gd, opts, zrange) {
|
|
|
31912
31921
|
showticklabels: opts.showticklabels,
|
|
31913
31922
|
ticklabelposition: opts.ticklabelposition,
|
|
31914
31923
|
ticklabeloverflow: opts.ticklabeloverflow,
|
|
31924
|
+
ticklabelstep: opts.ticklabelstep,
|
|
31915
31925
|
tickfont: opts.tickfont,
|
|
31916
31926
|
tickangle: opts.tickangle,
|
|
31917
31927
|
tickformat: opts.tickformat,
|
|
@@ -33650,24 +33660,42 @@ drawing.dashStyle = function(dash, lineWidth) {
|
|
|
33650
33660
|
return dash;
|
|
33651
33661
|
};
|
|
33652
33662
|
|
|
33663
|
+
function setFillStyle(sel, trace, gd) {
|
|
33664
|
+
var markerPattern = trace.fillpattern;
|
|
33665
|
+
var patternShape = markerPattern && drawing.getPatternAttr(markerPattern.shape, 0, '');
|
|
33666
|
+
if(patternShape) {
|
|
33667
|
+
var patternBGColor = drawing.getPatternAttr(markerPattern.bgcolor, 0, null);
|
|
33668
|
+
var patternFGColor = drawing.getPatternAttr(markerPattern.fgcolor, 0, null);
|
|
33669
|
+
var patternFGOpacity = markerPattern.fgopacity;
|
|
33670
|
+
var patternSize = drawing.getPatternAttr(markerPattern.size, 0, 8);
|
|
33671
|
+
var patternSolidity = drawing.getPatternAttr(markerPattern.solidity, 0, 0.3);
|
|
33672
|
+
var patternID = trace.uid;
|
|
33673
|
+
drawing.pattern(sel, 'point', gd, patternID,
|
|
33674
|
+
patternShape, patternSize, patternSolidity,
|
|
33675
|
+
undefined, markerPattern.fillmode,
|
|
33676
|
+
patternBGColor, patternFGColor, patternFGOpacity
|
|
33677
|
+
);
|
|
33678
|
+
} else if(trace.fillcolor) {
|
|
33679
|
+
sel.call(Color.fill, trace.fillcolor);
|
|
33680
|
+
}
|
|
33681
|
+
}
|
|
33682
|
+
|
|
33653
33683
|
// Same as fillGroupStyle, except in this case the selection may be a transition
|
|
33654
|
-
drawing.singleFillStyle = function(sel) {
|
|
33684
|
+
drawing.singleFillStyle = function(sel, gd) {
|
|
33655
33685
|
var node = d3.select(sel.node());
|
|
33656
33686
|
var data = node.data();
|
|
33657
|
-
var
|
|
33658
|
-
|
|
33659
|
-
sel.call(Color.fill, fillcolor);
|
|
33660
|
-
}
|
|
33687
|
+
var trace = ((data[0] || [])[0] || {}).trace || {};
|
|
33688
|
+
setFillStyle(sel, trace, gd);
|
|
33661
33689
|
};
|
|
33662
33690
|
|
|
33663
|
-
drawing.fillGroupStyle = function(s) {
|
|
33691
|
+
drawing.fillGroupStyle = function(s, gd) {
|
|
33664
33692
|
s.style('stroke-width', 0)
|
|
33665
33693
|
.each(function(d) {
|
|
33666
33694
|
var shape = d3.select(this);
|
|
33667
33695
|
// N.B. 'd' won't be a calcdata item when
|
|
33668
33696
|
// fill !== 'none' on a segment-less and marker-less trace
|
|
33669
33697
|
if(d[0].trace) {
|
|
33670
|
-
shape
|
|
33698
|
+
setFillStyle(shape, d[0].trace, gd);
|
|
33671
33699
|
}
|
|
33672
33700
|
});
|
|
33673
33701
|
};
|
|
@@ -33820,12 +33848,7 @@ drawing.gradient = function(sel, gd, gradientID, type, colorscale, prop) {
|
|
|
33820
33848
|
sel.style(prop, getFullUrl(fullID, gd))
|
|
33821
33849
|
.style(prop + '-opacity', null);
|
|
33822
33850
|
|
|
33823
|
-
|
|
33824
|
-
return '.' + s.attr('class').replace(/\s/g, '.');
|
|
33825
|
-
};
|
|
33826
|
-
var k = className2query(d3.select(sel.node().parentNode)) +
|
|
33827
|
-
'>' + className2query(sel);
|
|
33828
|
-
fullLayout._gradientUrlQueryParts[k] = 1;
|
|
33851
|
+
sel.classed('gradient_filled', true);
|
|
33829
33852
|
};
|
|
33830
33853
|
|
|
33831
33854
|
/**
|
|
@@ -34032,11 +34055,6 @@ drawing.pattern = function(sel, calledBy, gd, patternID, shape, size, solidity,
|
|
|
34032
34055
|
.style('fill-opacity', null);
|
|
34033
34056
|
|
|
34034
34057
|
sel.classed('pattern_filled', true);
|
|
34035
|
-
var className2query = function(s) {
|
|
34036
|
-
return '.' + s.attr('class').replace(/\s/g, '.');
|
|
34037
|
-
};
|
|
34038
|
-
var k = className2query(d3.select(sel.node().parentNode)) + '>.pattern_filled';
|
|
34039
|
-
fullLayout._patternUrlQueryParts[k] = 1;
|
|
34040
34058
|
};
|
|
34041
34059
|
|
|
34042
34060
|
/*
|
|
@@ -34052,9 +34070,7 @@ drawing.initGradients = function(gd) {
|
|
|
34052
34070
|
var gradientsGroup = Lib.ensureSingle(fullLayout._defs, 'g', 'gradients');
|
|
34053
34071
|
gradientsGroup.selectAll('linearGradient,radialGradient').remove();
|
|
34054
34072
|
|
|
34055
|
-
|
|
34056
|
-
// used to fix URL strings during image exports
|
|
34057
|
-
fullLayout._gradientUrlQueryParts = {};
|
|
34073
|
+
d3.select(gd).selectAll('.gradient_filled').classed('gradient_filled', false);
|
|
34058
34074
|
};
|
|
34059
34075
|
|
|
34060
34076
|
drawing.initPatterns = function(gd) {
|
|
@@ -34063,9 +34079,7 @@ drawing.initPatterns = function(gd) {
|
|
|
34063
34079
|
var patternsGroup = Lib.ensureSingle(fullLayout._defs, 'g', 'patterns');
|
|
34064
34080
|
patternsGroup.selectAll('pattern').remove();
|
|
34065
34081
|
|
|
34066
|
-
|
|
34067
|
-
// used to fix URL strings during image exports
|
|
34068
|
-
fullLayout._patternUrlQueryParts = {};
|
|
34082
|
+
d3.select(gd).selectAll('.pattern_filled').classed('pattern_filled', false);
|
|
34069
34083
|
};
|
|
34070
34084
|
|
|
34071
34085
|
drawing.getPatternAttr = function(mp, i, dflt) {
|
|
@@ -40718,7 +40732,6 @@ function computeLegendDimensions(gd, groups, traces, legendObj) {
|
|
|
40718
40732
|
offsetY += h;
|
|
40719
40733
|
maxWidthInGroup = Math.max(maxWidthInGroup, textGap + w);
|
|
40720
40734
|
});
|
|
40721
|
-
maxGroupHeightInRow = Math.max(maxGroupHeightInRow, offsetY);
|
|
40722
40735
|
|
|
40723
40736
|
var next = maxWidthInGroup + itemGap;
|
|
40724
40737
|
|
|
@@ -40734,6 +40747,8 @@ function computeLegendDimensions(gd, groups, traces, legendObj) {
|
|
|
40734
40747
|
groupOffsetX = 0;
|
|
40735
40748
|
groupOffsetY += maxGroupHeightInRow + traceGroupGap;
|
|
40736
40749
|
maxGroupHeightInRow = offsetY;
|
|
40750
|
+
} else {
|
|
40751
|
+
maxGroupHeightInRow = Math.max(maxGroupHeightInRow, offsetY);
|
|
40737
40752
|
}
|
|
40738
40753
|
|
|
40739
40754
|
Drawing.setTranslate(this, groupOffsetX, groupOffsetY);
|
|
@@ -41401,12 +41416,16 @@ module.exports = function style(s, gd, legend) {
|
|
|
41401
41416
|
var colorscale = cOpts.colorscale;
|
|
41402
41417
|
var reversescale = cOpts.reversescale;
|
|
41403
41418
|
|
|
41404
|
-
var
|
|
41419
|
+
var fillStyle = function(s) {
|
|
41405
41420
|
if(s.size()) {
|
|
41406
|
-
|
|
41407
|
-
|
|
41408
|
-
|
|
41409
|
-
|
|
41421
|
+
if(showFill) {
|
|
41422
|
+
Drawing.fillGroupStyle(s, gd);
|
|
41423
|
+
} else {
|
|
41424
|
+
var gradientID = 'legendfill-' + trace.uid;
|
|
41425
|
+
Drawing.gradient(s, gd, gradientID,
|
|
41426
|
+
getGradientDirection(reversescale),
|
|
41427
|
+
colorscale, 'fill');
|
|
41428
|
+
}
|
|
41410
41429
|
}
|
|
41411
41430
|
};
|
|
41412
41431
|
|
|
@@ -41435,7 +41454,7 @@ module.exports = function style(s, gd, legend) {
|
|
|
41435
41454
|
fill.enter().append('path').classed('js-fill', true);
|
|
41436
41455
|
fill.exit().remove();
|
|
41437
41456
|
fill.attr('d', pathStart + 'h' + itemWidth + 'v6h-' + itemWidth + 'z')
|
|
41438
|
-
.call(
|
|
41457
|
+
.call(fillStyle);
|
|
41439
41458
|
|
|
41440
41459
|
if(showLine || showGradientLine) {
|
|
41441
41460
|
var lw = boundLineWidth(undefined, trace.line, MAX_LINE_WIDTH, CST_LINE_WIDTH);
|
|
@@ -43216,6 +43235,8 @@ var isNumeric = _dereq_('fast-isnumeric');
|
|
|
43216
43235
|
|
|
43217
43236
|
var Lib = _dereq_('../../lib');
|
|
43218
43237
|
var Icons = _dereq_('../../fonts/ploticon');
|
|
43238
|
+
var version = _dereq_('../../version').version;
|
|
43239
|
+
|
|
43219
43240
|
var Parser = new DOMParser();
|
|
43220
43241
|
|
|
43221
43242
|
/**
|
|
@@ -43494,6 +43515,10 @@ proto.hasButtons = function(buttons) {
|
|
|
43494
43515
|
return true;
|
|
43495
43516
|
};
|
|
43496
43517
|
|
|
43518
|
+
function jsVersion(str) {
|
|
43519
|
+
return str + ' (v' + version + ')';
|
|
43520
|
+
}
|
|
43521
|
+
|
|
43497
43522
|
/**
|
|
43498
43523
|
* @return {HTMLDivElement} The logo image wrapped in a group
|
|
43499
43524
|
*/
|
|
@@ -43503,7 +43528,7 @@ proto.getLogo = function() {
|
|
|
43503
43528
|
|
|
43504
43529
|
a.href = 'https://plotly.com/';
|
|
43505
43530
|
a.target = '_blank';
|
|
43506
|
-
a.setAttribute('data-title', Lib._(this.graphInfo, 'Produced with Plotly'));
|
|
43531
|
+
a.setAttribute('data-title', jsVersion(Lib._(this.graphInfo, 'Produced with Plotly.js')));
|
|
43507
43532
|
a.className = 'modebar-btn plotlyjsicon modebar-btn--logo';
|
|
43508
43533
|
|
|
43509
43534
|
a.appendChild(this.createIcon(Icons.newplotlylogo));
|
|
@@ -43545,7 +43570,7 @@ function createModeBar(gd, buttons) {
|
|
|
43545
43570
|
|
|
43546
43571
|
module.exports = createModeBar;
|
|
43547
43572
|
|
|
43548
|
-
},{"../../fonts/ploticon":270,"../../lib":287,"@plotly/d3":20,"fast-isnumeric":33}],223:[function(_dereq_,module,exports){
|
|
43573
|
+
},{"../../fonts/ploticon":270,"../../lib":287,"../../version":552,"@plotly/d3":20,"fast-isnumeric":33}],223:[function(_dereq_,module,exports){
|
|
43549
43574
|
'use strict';
|
|
43550
43575
|
|
|
43551
43576
|
var fontAttrs = _dereq_('../../plots/font_attributes');
|
|
@@ -56056,6 +56081,7 @@ exports.convertToTspans = function(_context, gd, _callback) {
|
|
|
56056
56081
|
// Until we get tex integrated more fully (so it can be used along with non-tex)
|
|
56057
56082
|
// allow some elements to prohibit it by attaching 'data-notex' to the original
|
|
56058
56083
|
var tex = (!_context.attr('data-notex')) &&
|
|
56084
|
+
gd && gd._context.typesetMath &&
|
|
56059
56085
|
(typeof MathJax !== 'undefined') &&
|
|
56060
56086
|
str.match(FIND_TEX);
|
|
56061
56087
|
|
|
@@ -56210,70 +56236,154 @@ function cleanEscapesForTex(s) {
|
|
|
56210
56236
|
.replace(GT_MATCH, '\\gt ');
|
|
56211
56237
|
}
|
|
56212
56238
|
|
|
56239
|
+
var inlineMath = [['$', '$'], ['\\(', '\\)']];
|
|
56240
|
+
|
|
56213
56241
|
function texToSVG(_texString, _config, _callback) {
|
|
56242
|
+
var MathJaxVersion = parseInt(
|
|
56243
|
+
(MathJax.version || '').split('.')[0]
|
|
56244
|
+
);
|
|
56245
|
+
|
|
56246
|
+
if(
|
|
56247
|
+
MathJaxVersion !== 2 &&
|
|
56248
|
+
MathJaxVersion !== 3
|
|
56249
|
+
) {
|
|
56250
|
+
Lib.warn('No MathJax version:', MathJax.version);
|
|
56251
|
+
return;
|
|
56252
|
+
}
|
|
56253
|
+
|
|
56214
56254
|
var originalRenderer,
|
|
56215
56255
|
originalConfig,
|
|
56216
56256
|
originalProcessSectionDelay,
|
|
56217
56257
|
tmpDiv;
|
|
56218
56258
|
|
|
56219
|
-
|
|
56220
|
-
function() {
|
|
56259
|
+
var setConfig2 = function() {
|
|
56221
56260
|
originalConfig = Lib.extendDeepAll({}, MathJax.Hub.config);
|
|
56222
56261
|
|
|
56223
56262
|
originalProcessSectionDelay = MathJax.Hub.processSectionDelay;
|
|
56224
56263
|
if(MathJax.Hub.processSectionDelay !== undefined) {
|
|
56225
|
-
// MathJax 2.5+
|
|
56264
|
+
// MathJax 2.5+ but not 3+
|
|
56226
56265
|
MathJax.Hub.processSectionDelay = 0;
|
|
56227
56266
|
}
|
|
56228
56267
|
|
|
56229
56268
|
return MathJax.Hub.Config({
|
|
56230
56269
|
messageStyle: 'none',
|
|
56231
56270
|
tex2jax: {
|
|
56232
|
-
inlineMath:
|
|
56271
|
+
inlineMath: inlineMath
|
|
56233
56272
|
},
|
|
56234
56273
|
displayAlign: 'left',
|
|
56235
56274
|
});
|
|
56236
|
-
}
|
|
56237
|
-
|
|
56238
|
-
|
|
56275
|
+
};
|
|
56276
|
+
|
|
56277
|
+
var setConfig3 = function() {
|
|
56278
|
+
originalConfig = Lib.extendDeepAll({}, MathJax.config);
|
|
56279
|
+
|
|
56280
|
+
if(!MathJax.config.tex) {
|
|
56281
|
+
MathJax.config.tex = {};
|
|
56282
|
+
}
|
|
56283
|
+
|
|
56284
|
+
MathJax.config.tex.inlineMath = inlineMath;
|
|
56285
|
+
};
|
|
56286
|
+
|
|
56287
|
+
var setRenderer2 = function() {
|
|
56239
56288
|
originalRenderer = MathJax.Hub.config.menuSettings.renderer;
|
|
56240
56289
|
if(originalRenderer !== 'SVG') {
|
|
56241
56290
|
return MathJax.Hub.setRenderer('SVG');
|
|
56242
56291
|
}
|
|
56243
|
-
}
|
|
56244
|
-
|
|
56292
|
+
};
|
|
56293
|
+
|
|
56294
|
+
var setRenderer3 = function() {
|
|
56295
|
+
originalRenderer = MathJax.config.startup.output;
|
|
56296
|
+
if(originalRenderer !== 'svg') {
|
|
56297
|
+
MathJax.config.startup.output = 'svg';
|
|
56298
|
+
}
|
|
56299
|
+
};
|
|
56300
|
+
|
|
56301
|
+
var initiateMathJax = function() {
|
|
56245
56302
|
var randomID = 'math-output-' + Lib.randstr({}, 64);
|
|
56246
56303
|
tmpDiv = d3.select('body').append('div')
|
|
56247
56304
|
.attr({id: randomID})
|
|
56248
|
-
.style({
|
|
56249
|
-
|
|
56305
|
+
.style({
|
|
56306
|
+
visibility: 'hidden',
|
|
56307
|
+
position: 'absolute',
|
|
56308
|
+
'font-size': _config.fontSize + 'px'
|
|
56309
|
+
})
|
|
56250
56310
|
.text(cleanEscapesForTex(_texString));
|
|
56251
56311
|
|
|
56252
|
-
|
|
56253
|
-
|
|
56254
|
-
|
|
56255
|
-
|
|
56312
|
+
var tmpNode = tmpDiv.node();
|
|
56313
|
+
|
|
56314
|
+
return MathJaxVersion === 2 ?
|
|
56315
|
+
MathJax.Hub.Typeset(tmpNode) :
|
|
56316
|
+
MathJax.typeset([tmpNode]);
|
|
56317
|
+
};
|
|
56256
56318
|
|
|
56257
|
-
|
|
56319
|
+
var finalizeMathJax = function() {
|
|
56320
|
+
var sel = tmpDiv.select(
|
|
56321
|
+
MathJaxVersion === 2 ? '.MathJax_SVG' : '.MathJax'
|
|
56322
|
+
);
|
|
56323
|
+
|
|
56324
|
+
var node = !sel.empty() && tmpDiv.select('svg').node();
|
|
56325
|
+
if(!node) {
|
|
56258
56326
|
Lib.log('There was an error in the tex syntax.', _texString);
|
|
56259
56327
|
_callback();
|
|
56260
56328
|
} else {
|
|
56261
|
-
var
|
|
56262
|
-
|
|
56329
|
+
var nodeBBox = node.getBoundingClientRect();
|
|
56330
|
+
var glyphDefs;
|
|
56331
|
+
if(MathJaxVersion === 2) {
|
|
56332
|
+
glyphDefs = d3.select('body').select('#MathJax_SVG_glyphs');
|
|
56333
|
+
} else {
|
|
56334
|
+
glyphDefs = sel.select('defs');
|
|
56335
|
+
}
|
|
56336
|
+
_callback(sel, glyphDefs, nodeBBox);
|
|
56263
56337
|
}
|
|
56264
56338
|
|
|
56265
56339
|
tmpDiv.remove();
|
|
56340
|
+
};
|
|
56266
56341
|
|
|
56342
|
+
var resetRenderer2 = function() {
|
|
56267
56343
|
if(originalRenderer !== 'SVG') {
|
|
56268
56344
|
return MathJax.Hub.setRenderer(originalRenderer);
|
|
56269
56345
|
}
|
|
56270
|
-
}
|
|
56271
|
-
|
|
56346
|
+
};
|
|
56347
|
+
|
|
56348
|
+
var resetRenderer3 = function() {
|
|
56349
|
+
if(originalRenderer !== 'svg') {
|
|
56350
|
+
MathJax.config.startup.output = originalRenderer;
|
|
56351
|
+
}
|
|
56352
|
+
};
|
|
56353
|
+
|
|
56354
|
+
var resetConfig2 = function() {
|
|
56272
56355
|
if(originalProcessSectionDelay !== undefined) {
|
|
56273
56356
|
MathJax.Hub.processSectionDelay = originalProcessSectionDelay;
|
|
56274
56357
|
}
|
|
56275
56358
|
return MathJax.Hub.Config(originalConfig);
|
|
56276
|
-
}
|
|
56359
|
+
};
|
|
56360
|
+
|
|
56361
|
+
var resetConfig3 = function() {
|
|
56362
|
+
MathJax.config = originalConfig;
|
|
56363
|
+
};
|
|
56364
|
+
|
|
56365
|
+
if(MathJaxVersion === 2) {
|
|
56366
|
+
MathJax.Hub.Queue(
|
|
56367
|
+
setConfig2,
|
|
56368
|
+
setRenderer2,
|
|
56369
|
+
initiateMathJax,
|
|
56370
|
+
finalizeMathJax,
|
|
56371
|
+
resetRenderer2,
|
|
56372
|
+
resetConfig2
|
|
56373
|
+
);
|
|
56374
|
+
} else if(MathJaxVersion === 3) {
|
|
56375
|
+
setConfig3();
|
|
56376
|
+
setRenderer3();
|
|
56377
|
+
MathJax.startup.defaultReady();
|
|
56378
|
+
|
|
56379
|
+
MathJax.startup.promise.then(function() {
|
|
56380
|
+
initiateMathJax();
|
|
56381
|
+
finalizeMathJax();
|
|
56382
|
+
|
|
56383
|
+
resetRenderer3();
|
|
56384
|
+
resetConfig3();
|
|
56385
|
+
});
|
|
56386
|
+
}
|
|
56277
56387
|
}
|
|
56278
56388
|
|
|
56279
56389
|
var TAG_STYLES = {
|
|
@@ -62093,6 +62203,11 @@ var configAttributes = {
|
|
|
62093
62203
|
dflt: false,
|
|
62094
62204
|
},
|
|
62095
62205
|
|
|
62206
|
+
typesetMath: {
|
|
62207
|
+
valType: 'boolean',
|
|
62208
|
+
dflt: true,
|
|
62209
|
+
},
|
|
62210
|
+
|
|
62096
62211
|
plotlyServerURL: {
|
|
62097
62212
|
valType: 'string',
|
|
62098
62213
|
dflt: '',
|
|
@@ -66938,7 +67053,8 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
66938
67053
|
var minRange = Math.min(rng[0], rng[1]);
|
|
66939
67054
|
var maxRange = Math.max(rng[0], rng[1]);
|
|
66940
67055
|
|
|
66941
|
-
var
|
|
67056
|
+
var numDtick = isNumeric(ax.dtick);
|
|
67057
|
+
var isDLog = (ax.type === 'log') && !(numDtick || ax.dtick.charAt(0) === 'L');
|
|
66942
67058
|
var isPeriod = ax.ticklabelmode === 'period';
|
|
66943
67059
|
|
|
66944
67060
|
// find the first tick
|
|
@@ -66969,13 +67085,36 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
66969
67085
|
x = axes.tickIncrement(x, ax.dtick, !axrev, ax.calendar);
|
|
66970
67086
|
}
|
|
66971
67087
|
|
|
67088
|
+
var ticklabelstep = ax.ticklabelstep;
|
|
67089
|
+
|
|
66972
67090
|
var maxTicks = Math.max(1000, ax._length || 0);
|
|
66973
67091
|
var tickVals = [];
|
|
66974
67092
|
var xPrevious = null;
|
|
67093
|
+
|
|
67094
|
+
var dTick;
|
|
67095
|
+
if(numDtick) {
|
|
67096
|
+
dTick = ax.dtick;
|
|
67097
|
+
} else {
|
|
67098
|
+
if(ax.type === 'date') {
|
|
67099
|
+
if(typeof ax.dtick === 'string' && ax.dtick.charAt(0) === 'M') {
|
|
67100
|
+
dTick = ONEAVGMONTH * ax.dtick.substring(1);
|
|
67101
|
+
}
|
|
67102
|
+
} else {
|
|
67103
|
+
dTick = ax._roughDTick;
|
|
67104
|
+
}
|
|
67105
|
+
}
|
|
67106
|
+
|
|
67107
|
+
var id = Math.round((
|
|
67108
|
+
ax.r2l(x) -
|
|
67109
|
+
ax.r2l(ax.tick0)
|
|
67110
|
+
) / dTick) - 1;
|
|
67111
|
+
|
|
66975
67112
|
for(;
|
|
66976
67113
|
(axrev) ? (x >= endTick) : (x <= endTick);
|
|
66977
67114
|
x = axes.tickIncrement(x, ax.dtick, axrev, ax.calendar)
|
|
66978
67115
|
) {
|
|
67116
|
+
id++;
|
|
67117
|
+
|
|
66979
67118
|
if(ax.rangebreaks) {
|
|
66980
67119
|
if(!axrev) {
|
|
66981
67120
|
if(x < startTick) continue;
|
|
@@ -66993,10 +67132,16 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
66993
67132
|
minor = true;
|
|
66994
67133
|
}
|
|
66995
67134
|
|
|
66996
|
-
|
|
67135
|
+
var obj = {
|
|
66997
67136
|
minor: minor,
|
|
66998
67137
|
value: x
|
|
66999
|
-
}
|
|
67138
|
+
};
|
|
67139
|
+
|
|
67140
|
+
if(ticklabelstep > 1 && id % ticklabelstep) {
|
|
67141
|
+
obj.skipLabel = true;
|
|
67142
|
+
}
|
|
67143
|
+
|
|
67144
|
+
tickVals.push(obj);
|
|
67000
67145
|
}
|
|
67001
67146
|
|
|
67002
67147
|
if(isPeriod) positionPeriodTicks(tickVals, ax, ax._definedDelta);
|
|
@@ -67049,12 +67194,20 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
67049
67194
|
ax._prevDateHead = '';
|
|
67050
67195
|
ax._inCalcTicks = true;
|
|
67051
67196
|
|
|
67197
|
+
var lastVisibleHead;
|
|
67198
|
+
var hideLabel = function(tick) {
|
|
67199
|
+
tick.text = ' '; // don't use an empty string here which can confuse automargin (issue 5132)
|
|
67200
|
+
ax._prevDateHead = lastVisibleHead;
|
|
67201
|
+
};
|
|
67202
|
+
|
|
67052
67203
|
var ticksOut = [];
|
|
67053
67204
|
var t, p;
|
|
67054
67205
|
for(i = 0; i < tickVals.length; i++) {
|
|
67055
67206
|
var _minor = tickVals[i].minor;
|
|
67056
67207
|
var _value = tickVals[i].value;
|
|
67057
67208
|
|
|
67209
|
+
lastVisibleHead = ax._prevDateHead;
|
|
67210
|
+
|
|
67058
67211
|
t = axes.tickText(
|
|
67059
67212
|
ax,
|
|
67060
67213
|
_value,
|
|
@@ -67069,11 +67222,14 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
67069
67222
|
if(p > maxRange) t.periodX = maxRange;
|
|
67070
67223
|
if(p < minRange) t.periodX = minRange;
|
|
67071
67224
|
|
|
67072
|
-
t
|
|
67073
|
-
ax._prevDateHead = '';
|
|
67225
|
+
hideLabel(t);
|
|
67074
67226
|
}
|
|
67075
67227
|
}
|
|
67076
67228
|
|
|
67229
|
+
if(tickVals[i].skipLabel) {
|
|
67230
|
+
hideLabel(t);
|
|
67231
|
+
}
|
|
67232
|
+
|
|
67077
67233
|
ticksOut.push(t);
|
|
67078
67234
|
}
|
|
67079
67235
|
|
|
@@ -69101,6 +69257,7 @@ axes.drawLabels = function(gd, ax, opts) {
|
|
|
69101
69257
|
var axId = ax._id;
|
|
69102
69258
|
var axLetter = axId.charAt(0);
|
|
69103
69259
|
var cls = opts.cls || axId + 'tick';
|
|
69260
|
+
|
|
69104
69261
|
var vals = opts.vals;
|
|
69105
69262
|
|
|
69106
69263
|
var labelFns = opts.labelFns;
|
|
@@ -73957,6 +74114,12 @@ module.exports = {
|
|
|
73957
74114
|
editType: 'ticks',
|
|
73958
74115
|
impliedEdits: {tickmode: 'linear'},
|
|
73959
74116
|
},
|
|
74117
|
+
ticklabelstep: {
|
|
74118
|
+
valType: 'integer',
|
|
74119
|
+
min: 1,
|
|
74120
|
+
dflt: 1,
|
|
74121
|
+
editType: 'ticks',
|
|
74122
|
+
},
|
|
73960
74123
|
tickvals: {
|
|
73961
74124
|
valType: 'data_array',
|
|
73962
74125
|
editType: 'ticks',
|
|
@@ -76821,6 +76984,14 @@ module.exports = function handleTickLabelDefaults(containerIn, containerOut, coe
|
|
|
76821
76984
|
color: dfltFontColor
|
|
76822
76985
|
});
|
|
76823
76986
|
|
|
76987
|
+
if(
|
|
76988
|
+
!options.noTicklabelstep &&
|
|
76989
|
+
axType !== 'multicategory' &&
|
|
76990
|
+
axType !== 'log'
|
|
76991
|
+
) {
|
|
76992
|
+
coerce('ticklabelstep');
|
|
76993
|
+
}
|
|
76994
|
+
|
|
76824
76995
|
if(!options.noAng) coerce('tickangle');
|
|
76825
76996
|
|
|
76826
76997
|
if(axType !== 'category') {
|
|
@@ -81939,6 +82110,7 @@ var ternaryAxesAttrs = {
|
|
|
81939
82110
|
ticklen: axesAttrs.ticklen,
|
|
81940
82111
|
tickwidth: axesAttrs.tickwidth,
|
|
81941
82112
|
tickcolor: axesAttrs.tickcolor,
|
|
82113
|
+
ticklabelstep: axesAttrs.ticklabelstep,
|
|
81942
82114
|
showticklabels: axesAttrs.showticklabels,
|
|
81943
82115
|
showtickprefix: axesAttrs.showtickprefix,
|
|
81944
82116
|
tickprefix: axesAttrs.tickprefix,
|
|
@@ -83959,7 +84131,7 @@ module.exports = function toSVG(gd, format, scale) {
|
|
|
83959
84131
|
var toppaper = fullLayout._toppaper;
|
|
83960
84132
|
var width = fullLayout.width;
|
|
83961
84133
|
var height = fullLayout.height;
|
|
83962
|
-
var i
|
|
84134
|
+
var i;
|
|
83963
84135
|
|
|
83964
84136
|
// make background color a rect in the svg, then revert after scraping
|
|
83965
84137
|
// all other alterations have been dealt with by properly preparing the svg
|
|
@@ -84032,32 +84204,21 @@ module.exports = function toSVG(gd, format, scale) {
|
|
|
84032
84204
|
}
|
|
84033
84205
|
});
|
|
84034
84206
|
|
|
84035
|
-
|
|
84036
|
-
|
|
84037
|
-
for(k in fullLayout._gradientUrlQueryParts) queryParts.push(k);
|
|
84038
|
-
}
|
|
84039
|
-
|
|
84040
|
-
if(fullLayout._patternUrlQueryParts) {
|
|
84041
|
-
for(k in fullLayout._patternUrlQueryParts) queryParts.push(k);
|
|
84042
|
-
}
|
|
84043
|
-
|
|
84044
|
-
if(queryParts.length) {
|
|
84045
|
-
svg.selectAll(queryParts.join(',')).each(function() {
|
|
84046
|
-
var pt = d3.select(this);
|
|
84207
|
+
svg.selectAll('.gradient_filled,.pattern_filled').each(function() {
|
|
84208
|
+
var pt = d3.select(this);
|
|
84047
84209
|
|
|
84048
|
-
|
|
84049
|
-
|
|
84050
|
-
|
|
84051
|
-
|
|
84052
|
-
|
|
84053
|
-
|
|
84210
|
+
// similar to font family styles above,
|
|
84211
|
+
// we must remove " after the SVG DOM has been serialized
|
|
84212
|
+
var fill = this.style.fill;
|
|
84213
|
+
if(fill && fill.indexOf('url(') !== -1) {
|
|
84214
|
+
pt.style('fill', fill.replace(DOUBLEQUOTE_REGEX, DUMMY_SUB));
|
|
84215
|
+
}
|
|
84054
84216
|
|
|
84055
|
-
|
|
84056
|
-
|
|
84057
|
-
|
|
84058
|
-
|
|
84059
|
-
|
|
84060
|
-
}
|
|
84217
|
+
var stroke = this.style.stroke;
|
|
84218
|
+
if(stroke && stroke.indexOf('url(') !== -1) {
|
|
84219
|
+
pt.style('stroke', stroke.replace(DOUBLEQUOTE_REGEX, DUMMY_SUB));
|
|
84220
|
+
}
|
|
84221
|
+
});
|
|
84061
84222
|
|
|
84062
84223
|
if(format === 'pdf' || format === 'eps') {
|
|
84063
84224
|
// these formats make the extra line MathJax adds around symbols look super thick in some cases
|
|
@@ -86417,6 +86578,7 @@ function calcTexttemplate(fullLayout, cd, index, xa, ya) {
|
|
|
86417
86578
|
var trace = cd[0].trace;
|
|
86418
86579
|
var texttemplate = Lib.castOption(trace, index, 'texttemplate');
|
|
86419
86580
|
if(!texttemplate) return '';
|
|
86581
|
+
var isHistogram = (trace.type === 'histogram');
|
|
86420
86582
|
var isWaterfall = (trace.type === 'waterfall');
|
|
86421
86583
|
var isFunnel = (trace.type === 'funnel');
|
|
86422
86584
|
var isHorizontal = trace.orientation === 'h';
|
|
@@ -86458,10 +86620,10 @@ function calcTexttemplate(fullLayout, cd, index, xa, ya) {
|
|
|
86458
86620
|
var pt = {};
|
|
86459
86621
|
appendArrayPointValue(pt, trace, cdi.i);
|
|
86460
86622
|
|
|
86461
|
-
if(pt.x === undefined) pt.x = isHorizontal ? obj.value : obj.label;
|
|
86462
|
-
if(pt.y === undefined) pt.y = isHorizontal ? obj.label : obj.value;
|
|
86463
|
-
if(pt.xLabel === undefined) pt.xLabel = isHorizontal ? obj.valueLabel : obj.labelLabel;
|
|
86464
|
-
if(pt.yLabel === undefined) pt.yLabel = isHorizontal ? obj.labelLabel : obj.valueLabel;
|
|
86623
|
+
if(isHistogram || pt.x === undefined) pt.x = isHorizontal ? obj.value : obj.label;
|
|
86624
|
+
if(isHistogram || pt.y === undefined) pt.y = isHorizontal ? obj.label : obj.value;
|
|
86625
|
+
if(isHistogram || pt.xLabel === undefined) pt.xLabel = isHorizontal ? obj.valueLabel : obj.labelLabel;
|
|
86626
|
+
if(isHistogram || pt.yLabel === undefined) pt.yLabel = isHorizontal ? obj.labelLabel : obj.valueLabel;
|
|
86465
86627
|
|
|
86466
86628
|
if(isWaterfall) {
|
|
86467
86629
|
obj.delta = +cdi.rawS || cdi.s;
|
|
@@ -97574,6 +97736,7 @@ var hovertemplateAttrs = _dereq_('../../plots/template_attributes').hovertemplat
|
|
|
97574
97736
|
var colorScaleAttrs = _dereq_('../../components/colorscale/attributes');
|
|
97575
97737
|
var fontAttrs = _dereq_('../../plots/font_attributes');
|
|
97576
97738
|
var dash = _dereq_('../../components/drawing/attributes').dash;
|
|
97739
|
+
var pattern = _dereq_('../../components/drawing/attributes').pattern;
|
|
97577
97740
|
|
|
97578
97741
|
var Drawing = _dereq_('../../components/drawing');
|
|
97579
97742
|
var constants = _dereq_('./constants');
|
|
@@ -97761,6 +97924,7 @@ module.exports = {
|
|
|
97761
97924
|
editType: 'style',
|
|
97762
97925
|
anim: true,
|
|
97763
97926
|
},
|
|
97927
|
+
fillpattern: pattern,
|
|
97764
97928
|
marker: extendFlat({
|
|
97765
97929
|
symbol: {
|
|
97766
97930
|
valType: 'enumerated',
|
|
@@ -98497,6 +98661,7 @@ var handleLineDefaults = _dereq_('./line_defaults');
|
|
|
98497
98661
|
var handleLineShapeDefaults = _dereq_('./line_shape_defaults');
|
|
98498
98662
|
var handleTextDefaults = _dereq_('./text_defaults');
|
|
98499
98663
|
var handleFillColorDefaults = _dereq_('./fillcolor_defaults');
|
|
98664
|
+
var coercePattern = _dereq_('../../lib').coercePattern;
|
|
98500
98665
|
|
|
98501
98666
|
module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
|
|
98502
98667
|
function coerce(attr, dflt) {
|
|
@@ -98550,6 +98715,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
|
|
|
98550
98715
|
if(traceOut.fill !== 'none') {
|
|
98551
98716
|
handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce);
|
|
98552
98717
|
if(!subTypes.hasLines(traceOut)) handleLineShapeDefaults(traceIn, traceOut, coerce);
|
|
98718
|
+
coercePattern(coerce, 'fillpattern', traceOut.fillcolor, false);
|
|
98553
98719
|
}
|
|
98554
98720
|
|
|
98555
98721
|
var lineColor = (traceOut.line || {}).color;
|
|
@@ -99932,11 +100098,11 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
|
|
|
99932
100098
|
// the points on the axes are the first two points. Otherwise
|
|
99933
100099
|
// animations get a little crazy if the number of points changes.
|
|
99934
100100
|
transition(ownFillEl3).attr('d', 'M' + pt1 + 'L' + pt0 + 'L' + fullpath.substr(1))
|
|
99935
|
-
.call(Drawing.singleFillStyle);
|
|
100101
|
+
.call(Drawing.singleFillStyle, gd);
|
|
99936
100102
|
} else {
|
|
99937
100103
|
// fill to self: just join the path to itself
|
|
99938
100104
|
transition(ownFillEl3).attr('d', fullpath + 'Z')
|
|
99939
|
-
.call(Drawing.singleFillStyle);
|
|
100105
|
+
.call(Drawing.singleFillStyle, gd);
|
|
99940
100106
|
}
|
|
99941
100107
|
}
|
|
99942
100108
|
} else if(tonext) {
|
|
@@ -99948,7 +100114,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
|
|
|
99948
100114
|
// This makes strange results if one path is *not* entirely
|
|
99949
100115
|
// inside the other, but then that is a strange usage.
|
|
99950
100116
|
transition(tonext).attr('d', fullpath + 'Z' + prevRevpath + 'Z')
|
|
99951
|
-
.call(Drawing.singleFillStyle);
|
|
100117
|
+
.call(Drawing.singleFillStyle, gd);
|
|
99952
100118
|
} else {
|
|
99953
100119
|
// tonextx/y: for now just connect endpoints with lines. This is
|
|
99954
100120
|
// the correct behavior if the endpoints are at the same value of
|
|
@@ -99956,7 +100122,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
|
|
|
99956
100122
|
// things depending on whether the new endpoint projects onto the
|
|
99957
100123
|
// existing curve or off the end of it
|
|
99958
100124
|
transition(tonext).attr('d', fullpath + 'L' + prevRevpath.substr(1) + 'Z')
|
|
99959
|
-
.call(Drawing.singleFillStyle);
|
|
100125
|
+
.call(Drawing.singleFillStyle, gd);
|
|
99960
100126
|
}
|
|
99961
100127
|
trace._polygons = trace._polygons.concat(prevPolygons);
|
|
99962
100128
|
} else {
|
|
@@ -100349,7 +100515,7 @@ function style(gd) {
|
|
|
100349
100515
|
.call(Drawing.lineGroupStyle);
|
|
100350
100516
|
|
|
100351
100517
|
s.selectAll('g.trace path.js-fill')
|
|
100352
|
-
.call(Drawing.fillGroupStyle);
|
|
100518
|
+
.call(Drawing.fillGroupStyle, gd);
|
|
100353
100519
|
|
|
100354
100520
|
Registry.getComponentMethod('errorbars', 'style')(s);
|
|
100355
100521
|
}
|
|
@@ -102816,7 +102982,7 @@ function getSortFunc(opts, d2c) {
|
|
|
102816
102982
|
'use strict';
|
|
102817
102983
|
|
|
102818
102984
|
// package version injected by `npm run preprocess`
|
|
102819
|
-
exports.version = '2.
|
|
102985
|
+
exports.version = '2.10.0';
|
|
102820
102986
|
|
|
102821
102987
|
},{}]},{},[15])(15)
|
|
102822
102988
|
});
|