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-gl2d.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plotly.js (gl2d) v2.
|
|
3
|
-
* Copyright 2012-
|
|
2
|
+
* plotly.js (gl2d) v2.10.0
|
|
3
|
+
* Copyright 2012-2022, Plotly, Inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the MIT license
|
|
6
6
|
*/
|
|
@@ -35122,6 +35122,7 @@ module.exports = overrideAll({
|
|
|
35122
35122
|
ticklen: axesAttrs.ticklen,
|
|
35123
35123
|
tickwidth: axesAttrs.tickwidth,
|
|
35124
35124
|
tickcolor: axesAttrs.tickcolor,
|
|
35125
|
+
ticklabelstep: axesAttrs.ticklabelstep,
|
|
35125
35126
|
showticklabels: axesAttrs.showticklabels,
|
|
35126
35127
|
tickfont: fontAttrs({
|
|
35127
35128
|
}),
|
|
@@ -36212,6 +36213,7 @@ function mockColorBarAxis(gd, opts, zrange) {
|
|
|
36212
36213
|
showticklabels: opts.showticklabels,
|
|
36213
36214
|
ticklabelposition: opts.ticklabelposition,
|
|
36214
36215
|
ticklabeloverflow: opts.ticklabeloverflow,
|
|
36216
|
+
ticklabelstep: opts.ticklabelstep,
|
|
36215
36217
|
tickfont: opts.tickfont,
|
|
36216
36218
|
tickangle: opts.tickangle,
|
|
36217
36219
|
tickformat: opts.tickformat,
|
|
@@ -37950,24 +37952,42 @@ drawing.dashStyle = function(dash, lineWidth) {
|
|
|
37950
37952
|
return dash;
|
|
37951
37953
|
};
|
|
37952
37954
|
|
|
37955
|
+
function setFillStyle(sel, trace, gd) {
|
|
37956
|
+
var markerPattern = trace.fillpattern;
|
|
37957
|
+
var patternShape = markerPattern && drawing.getPatternAttr(markerPattern.shape, 0, '');
|
|
37958
|
+
if(patternShape) {
|
|
37959
|
+
var patternBGColor = drawing.getPatternAttr(markerPattern.bgcolor, 0, null);
|
|
37960
|
+
var patternFGColor = drawing.getPatternAttr(markerPattern.fgcolor, 0, null);
|
|
37961
|
+
var patternFGOpacity = markerPattern.fgopacity;
|
|
37962
|
+
var patternSize = drawing.getPatternAttr(markerPattern.size, 0, 8);
|
|
37963
|
+
var patternSolidity = drawing.getPatternAttr(markerPattern.solidity, 0, 0.3);
|
|
37964
|
+
var patternID = trace.uid;
|
|
37965
|
+
drawing.pattern(sel, 'point', gd, patternID,
|
|
37966
|
+
patternShape, patternSize, patternSolidity,
|
|
37967
|
+
undefined, markerPattern.fillmode,
|
|
37968
|
+
patternBGColor, patternFGColor, patternFGOpacity
|
|
37969
|
+
);
|
|
37970
|
+
} else if(trace.fillcolor) {
|
|
37971
|
+
sel.call(Color.fill, trace.fillcolor);
|
|
37972
|
+
}
|
|
37973
|
+
}
|
|
37974
|
+
|
|
37953
37975
|
// Same as fillGroupStyle, except in this case the selection may be a transition
|
|
37954
|
-
drawing.singleFillStyle = function(sel) {
|
|
37976
|
+
drawing.singleFillStyle = function(sel, gd) {
|
|
37955
37977
|
var node = d3.select(sel.node());
|
|
37956
37978
|
var data = node.data();
|
|
37957
|
-
var
|
|
37958
|
-
|
|
37959
|
-
sel.call(Color.fill, fillcolor);
|
|
37960
|
-
}
|
|
37979
|
+
var trace = ((data[0] || [])[0] || {}).trace || {};
|
|
37980
|
+
setFillStyle(sel, trace, gd);
|
|
37961
37981
|
};
|
|
37962
37982
|
|
|
37963
|
-
drawing.fillGroupStyle = function(s) {
|
|
37983
|
+
drawing.fillGroupStyle = function(s, gd) {
|
|
37964
37984
|
s.style('stroke-width', 0)
|
|
37965
37985
|
.each(function(d) {
|
|
37966
37986
|
var shape = d3.select(this);
|
|
37967
37987
|
// N.B. 'd' won't be a calcdata item when
|
|
37968
37988
|
// fill !== 'none' on a segment-less and marker-less trace
|
|
37969
37989
|
if(d[0].trace) {
|
|
37970
|
-
shape
|
|
37990
|
+
setFillStyle(shape, d[0].trace, gd);
|
|
37971
37991
|
}
|
|
37972
37992
|
});
|
|
37973
37993
|
};
|
|
@@ -38120,12 +38140,7 @@ drawing.gradient = function(sel, gd, gradientID, type, colorscale, prop) {
|
|
|
38120
38140
|
sel.style(prop, getFullUrl(fullID, gd))
|
|
38121
38141
|
.style(prop + '-opacity', null);
|
|
38122
38142
|
|
|
38123
|
-
|
|
38124
|
-
return '.' + s.attr('class').replace(/\s/g, '.');
|
|
38125
|
-
};
|
|
38126
|
-
var k = className2query(d3.select(sel.node().parentNode)) +
|
|
38127
|
-
'>' + className2query(sel);
|
|
38128
|
-
fullLayout._gradientUrlQueryParts[k] = 1;
|
|
38143
|
+
sel.classed('gradient_filled', true);
|
|
38129
38144
|
};
|
|
38130
38145
|
|
|
38131
38146
|
/**
|
|
@@ -38332,11 +38347,6 @@ drawing.pattern = function(sel, calledBy, gd, patternID, shape, size, solidity,
|
|
|
38332
38347
|
.style('fill-opacity', null);
|
|
38333
38348
|
|
|
38334
38349
|
sel.classed('pattern_filled', true);
|
|
38335
|
-
var className2query = function(s) {
|
|
38336
|
-
return '.' + s.attr('class').replace(/\s/g, '.');
|
|
38337
|
-
};
|
|
38338
|
-
var k = className2query(d3.select(sel.node().parentNode)) + '>.pattern_filled';
|
|
38339
|
-
fullLayout._patternUrlQueryParts[k] = 1;
|
|
38340
38350
|
};
|
|
38341
38351
|
|
|
38342
38352
|
/*
|
|
@@ -38352,9 +38362,7 @@ drawing.initGradients = function(gd) {
|
|
|
38352
38362
|
var gradientsGroup = Lib.ensureSingle(fullLayout._defs, 'g', 'gradients');
|
|
38353
38363
|
gradientsGroup.selectAll('linearGradient,radialGradient').remove();
|
|
38354
38364
|
|
|
38355
|
-
|
|
38356
|
-
// used to fix URL strings during image exports
|
|
38357
|
-
fullLayout._gradientUrlQueryParts = {};
|
|
38365
|
+
d3.select(gd).selectAll('.gradient_filled').classed('gradient_filled', false);
|
|
38358
38366
|
};
|
|
38359
38367
|
|
|
38360
38368
|
drawing.initPatterns = function(gd) {
|
|
@@ -38363,9 +38371,7 @@ drawing.initPatterns = function(gd) {
|
|
|
38363
38371
|
var patternsGroup = Lib.ensureSingle(fullLayout._defs, 'g', 'patterns');
|
|
38364
38372
|
patternsGroup.selectAll('pattern').remove();
|
|
38365
38373
|
|
|
38366
|
-
|
|
38367
|
-
// used to fix URL strings during image exports
|
|
38368
|
-
fullLayout._patternUrlQueryParts = {};
|
|
38374
|
+
d3.select(gd).selectAll('.pattern_filled').classed('pattern_filled', false);
|
|
38369
38375
|
};
|
|
38370
38376
|
|
|
38371
38377
|
drawing.getPatternAttr = function(mp, i, dflt) {
|
|
@@ -45018,7 +45024,6 @@ function computeLegendDimensions(gd, groups, traces, legendObj) {
|
|
|
45018
45024
|
offsetY += h;
|
|
45019
45025
|
maxWidthInGroup = Math.max(maxWidthInGroup, textGap + w);
|
|
45020
45026
|
});
|
|
45021
|
-
maxGroupHeightInRow = Math.max(maxGroupHeightInRow, offsetY);
|
|
45022
45027
|
|
|
45023
45028
|
var next = maxWidthInGroup + itemGap;
|
|
45024
45029
|
|
|
@@ -45034,6 +45039,8 @@ function computeLegendDimensions(gd, groups, traces, legendObj) {
|
|
|
45034
45039
|
groupOffsetX = 0;
|
|
45035
45040
|
groupOffsetY += maxGroupHeightInRow + traceGroupGap;
|
|
45036
45041
|
maxGroupHeightInRow = offsetY;
|
|
45042
|
+
} else {
|
|
45043
|
+
maxGroupHeightInRow = Math.max(maxGroupHeightInRow, offsetY);
|
|
45037
45044
|
}
|
|
45038
45045
|
|
|
45039
45046
|
Drawing.setTranslate(this, groupOffsetX, groupOffsetY);
|
|
@@ -45701,12 +45708,16 @@ module.exports = function style(s, gd, legend) {
|
|
|
45701
45708
|
var colorscale = cOpts.colorscale;
|
|
45702
45709
|
var reversescale = cOpts.reversescale;
|
|
45703
45710
|
|
|
45704
|
-
var
|
|
45711
|
+
var fillStyle = function(s) {
|
|
45705
45712
|
if(s.size()) {
|
|
45706
|
-
|
|
45707
|
-
|
|
45708
|
-
|
|
45709
|
-
|
|
45713
|
+
if(showFill) {
|
|
45714
|
+
Drawing.fillGroupStyle(s, gd);
|
|
45715
|
+
} else {
|
|
45716
|
+
var gradientID = 'legendfill-' + trace.uid;
|
|
45717
|
+
Drawing.gradient(s, gd, gradientID,
|
|
45718
|
+
getGradientDirection(reversescale),
|
|
45719
|
+
colorscale, 'fill');
|
|
45720
|
+
}
|
|
45710
45721
|
}
|
|
45711
45722
|
};
|
|
45712
45723
|
|
|
@@ -45735,7 +45746,7 @@ module.exports = function style(s, gd, legend) {
|
|
|
45735
45746
|
fill.enter().append('path').classed('js-fill', true);
|
|
45736
45747
|
fill.exit().remove();
|
|
45737
45748
|
fill.attr('d', pathStart + 'h' + itemWidth + 'v6h-' + itemWidth + 'z')
|
|
45738
|
-
.call(
|
|
45749
|
+
.call(fillStyle);
|
|
45739
45750
|
|
|
45740
45751
|
if(showLine || showGradientLine) {
|
|
45741
45752
|
var lw = boundLineWidth(undefined, trace.line, MAX_LINE_WIDTH, CST_LINE_WIDTH);
|
|
@@ -47516,6 +47527,8 @@ var isNumeric = _dereq_('fast-isnumeric');
|
|
|
47516
47527
|
|
|
47517
47528
|
var Lib = _dereq_('../../lib');
|
|
47518
47529
|
var Icons = _dereq_('../../fonts/ploticon');
|
|
47530
|
+
var version = _dereq_('../../version').version;
|
|
47531
|
+
|
|
47519
47532
|
var Parser = new DOMParser();
|
|
47520
47533
|
|
|
47521
47534
|
/**
|
|
@@ -47794,6 +47807,10 @@ proto.hasButtons = function(buttons) {
|
|
|
47794
47807
|
return true;
|
|
47795
47808
|
};
|
|
47796
47809
|
|
|
47810
|
+
function jsVersion(str) {
|
|
47811
|
+
return str + ' (v' + version + ')';
|
|
47812
|
+
}
|
|
47813
|
+
|
|
47797
47814
|
/**
|
|
47798
47815
|
* @return {HTMLDivElement} The logo image wrapped in a group
|
|
47799
47816
|
*/
|
|
@@ -47803,7 +47820,7 @@ proto.getLogo = function() {
|
|
|
47803
47820
|
|
|
47804
47821
|
a.href = 'https://plotly.com/';
|
|
47805
47822
|
a.target = '_blank';
|
|
47806
|
-
a.setAttribute('data-title', Lib._(this.graphInfo, 'Produced with Plotly'));
|
|
47823
|
+
a.setAttribute('data-title', jsVersion(Lib._(this.graphInfo, 'Produced with Plotly.js')));
|
|
47807
47824
|
a.className = 'modebar-btn plotlyjsicon modebar-btn--logo';
|
|
47808
47825
|
|
|
47809
47826
|
a.appendChild(this.createIcon(Icons.newplotlylogo));
|
|
@@ -47845,7 +47862,7 @@ function createModeBar(gd, buttons) {
|
|
|
47845
47862
|
|
|
47846
47863
|
module.exports = createModeBar;
|
|
47847
47864
|
|
|
47848
|
-
},{"../../fonts/ploticon":369,"../../lib":388,"@plotly/d3":14,"fast-isnumeric":121}],322:[function(_dereq_,module,exports){
|
|
47865
|
+
},{"../../fonts/ploticon":369,"../../lib":388,"../../version":587,"@plotly/d3":14,"fast-isnumeric":121}],322:[function(_dereq_,module,exports){
|
|
47849
47866
|
'use strict';
|
|
47850
47867
|
|
|
47851
47868
|
var fontAttrs = _dereq_('../../plots/font_attributes');
|
|
@@ -60610,6 +60627,7 @@ exports.convertToTspans = function(_context, gd, _callback) {
|
|
|
60610
60627
|
// Until we get tex integrated more fully (so it can be used along with non-tex)
|
|
60611
60628
|
// allow some elements to prohibit it by attaching 'data-notex' to the original
|
|
60612
60629
|
var tex = (!_context.attr('data-notex')) &&
|
|
60630
|
+
gd && gd._context.typesetMath &&
|
|
60613
60631
|
(typeof MathJax !== 'undefined') &&
|
|
60614
60632
|
str.match(FIND_TEX);
|
|
60615
60633
|
|
|
@@ -60764,70 +60782,154 @@ function cleanEscapesForTex(s) {
|
|
|
60764
60782
|
.replace(GT_MATCH, '\\gt ');
|
|
60765
60783
|
}
|
|
60766
60784
|
|
|
60785
|
+
var inlineMath = [['$', '$'], ['\\(', '\\)']];
|
|
60786
|
+
|
|
60767
60787
|
function texToSVG(_texString, _config, _callback) {
|
|
60788
|
+
var MathJaxVersion = parseInt(
|
|
60789
|
+
(MathJax.version || '').split('.')[0]
|
|
60790
|
+
);
|
|
60791
|
+
|
|
60792
|
+
if(
|
|
60793
|
+
MathJaxVersion !== 2 &&
|
|
60794
|
+
MathJaxVersion !== 3
|
|
60795
|
+
) {
|
|
60796
|
+
Lib.warn('No MathJax version:', MathJax.version);
|
|
60797
|
+
return;
|
|
60798
|
+
}
|
|
60799
|
+
|
|
60768
60800
|
var originalRenderer,
|
|
60769
60801
|
originalConfig,
|
|
60770
60802
|
originalProcessSectionDelay,
|
|
60771
60803
|
tmpDiv;
|
|
60772
60804
|
|
|
60773
|
-
|
|
60774
|
-
function() {
|
|
60805
|
+
var setConfig2 = function() {
|
|
60775
60806
|
originalConfig = Lib.extendDeepAll({}, MathJax.Hub.config);
|
|
60776
60807
|
|
|
60777
60808
|
originalProcessSectionDelay = MathJax.Hub.processSectionDelay;
|
|
60778
60809
|
if(MathJax.Hub.processSectionDelay !== undefined) {
|
|
60779
|
-
// MathJax 2.5+
|
|
60810
|
+
// MathJax 2.5+ but not 3+
|
|
60780
60811
|
MathJax.Hub.processSectionDelay = 0;
|
|
60781
60812
|
}
|
|
60782
60813
|
|
|
60783
60814
|
return MathJax.Hub.Config({
|
|
60784
60815
|
messageStyle: 'none',
|
|
60785
60816
|
tex2jax: {
|
|
60786
|
-
inlineMath:
|
|
60817
|
+
inlineMath: inlineMath
|
|
60787
60818
|
},
|
|
60788
60819
|
displayAlign: 'left',
|
|
60789
60820
|
});
|
|
60790
|
-
}
|
|
60791
|
-
|
|
60792
|
-
|
|
60821
|
+
};
|
|
60822
|
+
|
|
60823
|
+
var setConfig3 = function() {
|
|
60824
|
+
originalConfig = Lib.extendDeepAll({}, MathJax.config);
|
|
60825
|
+
|
|
60826
|
+
if(!MathJax.config.tex) {
|
|
60827
|
+
MathJax.config.tex = {};
|
|
60828
|
+
}
|
|
60829
|
+
|
|
60830
|
+
MathJax.config.tex.inlineMath = inlineMath;
|
|
60831
|
+
};
|
|
60832
|
+
|
|
60833
|
+
var setRenderer2 = function() {
|
|
60793
60834
|
originalRenderer = MathJax.Hub.config.menuSettings.renderer;
|
|
60794
60835
|
if(originalRenderer !== 'SVG') {
|
|
60795
60836
|
return MathJax.Hub.setRenderer('SVG');
|
|
60796
60837
|
}
|
|
60797
|
-
}
|
|
60798
|
-
|
|
60838
|
+
};
|
|
60839
|
+
|
|
60840
|
+
var setRenderer3 = function() {
|
|
60841
|
+
originalRenderer = MathJax.config.startup.output;
|
|
60842
|
+
if(originalRenderer !== 'svg') {
|
|
60843
|
+
MathJax.config.startup.output = 'svg';
|
|
60844
|
+
}
|
|
60845
|
+
};
|
|
60846
|
+
|
|
60847
|
+
var initiateMathJax = function() {
|
|
60799
60848
|
var randomID = 'math-output-' + Lib.randstr({}, 64);
|
|
60800
60849
|
tmpDiv = d3.select('body').append('div')
|
|
60801
60850
|
.attr({id: randomID})
|
|
60802
|
-
.style({
|
|
60803
|
-
|
|
60851
|
+
.style({
|
|
60852
|
+
visibility: 'hidden',
|
|
60853
|
+
position: 'absolute',
|
|
60854
|
+
'font-size': _config.fontSize + 'px'
|
|
60855
|
+
})
|
|
60804
60856
|
.text(cleanEscapesForTex(_texString));
|
|
60805
60857
|
|
|
60806
|
-
|
|
60807
|
-
},
|
|
60808
|
-
function() {
|
|
60809
|
-
var glyphDefs = d3.select('body').select('#MathJax_SVG_glyphs');
|
|
60858
|
+
var tmpNode = tmpDiv.node();
|
|
60810
60859
|
|
|
60811
|
-
|
|
60860
|
+
return MathJaxVersion === 2 ?
|
|
60861
|
+
MathJax.Hub.Typeset(tmpNode) :
|
|
60862
|
+
MathJax.typeset([tmpNode]);
|
|
60863
|
+
};
|
|
60864
|
+
|
|
60865
|
+
var finalizeMathJax = function() {
|
|
60866
|
+
var sel = tmpDiv.select(
|
|
60867
|
+
MathJaxVersion === 2 ? '.MathJax_SVG' : '.MathJax'
|
|
60868
|
+
);
|
|
60869
|
+
|
|
60870
|
+
var node = !sel.empty() && tmpDiv.select('svg').node();
|
|
60871
|
+
if(!node) {
|
|
60812
60872
|
Lib.log('There was an error in the tex syntax.', _texString);
|
|
60813
60873
|
_callback();
|
|
60814
60874
|
} else {
|
|
60815
|
-
var
|
|
60816
|
-
|
|
60875
|
+
var nodeBBox = node.getBoundingClientRect();
|
|
60876
|
+
var glyphDefs;
|
|
60877
|
+
if(MathJaxVersion === 2) {
|
|
60878
|
+
glyphDefs = d3.select('body').select('#MathJax_SVG_glyphs');
|
|
60879
|
+
} else {
|
|
60880
|
+
glyphDefs = sel.select('defs');
|
|
60881
|
+
}
|
|
60882
|
+
_callback(sel, glyphDefs, nodeBBox);
|
|
60817
60883
|
}
|
|
60818
60884
|
|
|
60819
60885
|
tmpDiv.remove();
|
|
60886
|
+
};
|
|
60820
60887
|
|
|
60888
|
+
var resetRenderer2 = function() {
|
|
60821
60889
|
if(originalRenderer !== 'SVG') {
|
|
60822
60890
|
return MathJax.Hub.setRenderer(originalRenderer);
|
|
60823
60891
|
}
|
|
60824
|
-
}
|
|
60825
|
-
|
|
60892
|
+
};
|
|
60893
|
+
|
|
60894
|
+
var resetRenderer3 = function() {
|
|
60895
|
+
if(originalRenderer !== 'svg') {
|
|
60896
|
+
MathJax.config.startup.output = originalRenderer;
|
|
60897
|
+
}
|
|
60898
|
+
};
|
|
60899
|
+
|
|
60900
|
+
var resetConfig2 = function() {
|
|
60826
60901
|
if(originalProcessSectionDelay !== undefined) {
|
|
60827
60902
|
MathJax.Hub.processSectionDelay = originalProcessSectionDelay;
|
|
60828
60903
|
}
|
|
60829
60904
|
return MathJax.Hub.Config(originalConfig);
|
|
60830
|
-
}
|
|
60905
|
+
};
|
|
60906
|
+
|
|
60907
|
+
var resetConfig3 = function() {
|
|
60908
|
+
MathJax.config = originalConfig;
|
|
60909
|
+
};
|
|
60910
|
+
|
|
60911
|
+
if(MathJaxVersion === 2) {
|
|
60912
|
+
MathJax.Hub.Queue(
|
|
60913
|
+
setConfig2,
|
|
60914
|
+
setRenderer2,
|
|
60915
|
+
initiateMathJax,
|
|
60916
|
+
finalizeMathJax,
|
|
60917
|
+
resetRenderer2,
|
|
60918
|
+
resetConfig2
|
|
60919
|
+
);
|
|
60920
|
+
} else if(MathJaxVersion === 3) {
|
|
60921
|
+
setConfig3();
|
|
60922
|
+
setRenderer3();
|
|
60923
|
+
MathJax.startup.defaultReady();
|
|
60924
|
+
|
|
60925
|
+
MathJax.startup.promise.then(function() {
|
|
60926
|
+
initiateMathJax();
|
|
60927
|
+
finalizeMathJax();
|
|
60928
|
+
|
|
60929
|
+
resetRenderer3();
|
|
60930
|
+
resetConfig3();
|
|
60931
|
+
});
|
|
60932
|
+
}
|
|
60831
60933
|
}
|
|
60832
60934
|
|
|
60833
60935
|
var TAG_STYLES = {
|
|
@@ -66647,6 +66749,11 @@ var configAttributes = {
|
|
|
66647
66749
|
dflt: false,
|
|
66648
66750
|
},
|
|
66649
66751
|
|
|
66752
|
+
typesetMath: {
|
|
66753
|
+
valType: 'boolean',
|
|
66754
|
+
dflt: true,
|
|
66755
|
+
},
|
|
66756
|
+
|
|
66650
66757
|
plotlyServerURL: {
|
|
66651
66758
|
valType: 'string',
|
|
66652
66759
|
dflt: '',
|
|
@@ -71492,7 +71599,8 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
71492
71599
|
var minRange = Math.min(rng[0], rng[1]);
|
|
71493
71600
|
var maxRange = Math.max(rng[0], rng[1]);
|
|
71494
71601
|
|
|
71495
|
-
var
|
|
71602
|
+
var numDtick = isNumeric(ax.dtick);
|
|
71603
|
+
var isDLog = (ax.type === 'log') && !(numDtick || ax.dtick.charAt(0) === 'L');
|
|
71496
71604
|
var isPeriod = ax.ticklabelmode === 'period';
|
|
71497
71605
|
|
|
71498
71606
|
// find the first tick
|
|
@@ -71523,13 +71631,36 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
71523
71631
|
x = axes.tickIncrement(x, ax.dtick, !axrev, ax.calendar);
|
|
71524
71632
|
}
|
|
71525
71633
|
|
|
71634
|
+
var ticklabelstep = ax.ticklabelstep;
|
|
71635
|
+
|
|
71526
71636
|
var maxTicks = Math.max(1000, ax._length || 0);
|
|
71527
71637
|
var tickVals = [];
|
|
71528
71638
|
var xPrevious = null;
|
|
71639
|
+
|
|
71640
|
+
var dTick;
|
|
71641
|
+
if(numDtick) {
|
|
71642
|
+
dTick = ax.dtick;
|
|
71643
|
+
} else {
|
|
71644
|
+
if(ax.type === 'date') {
|
|
71645
|
+
if(typeof ax.dtick === 'string' && ax.dtick.charAt(0) === 'M') {
|
|
71646
|
+
dTick = ONEAVGMONTH * ax.dtick.substring(1);
|
|
71647
|
+
}
|
|
71648
|
+
} else {
|
|
71649
|
+
dTick = ax._roughDTick;
|
|
71650
|
+
}
|
|
71651
|
+
}
|
|
71652
|
+
|
|
71653
|
+
var id = Math.round((
|
|
71654
|
+
ax.r2l(x) -
|
|
71655
|
+
ax.r2l(ax.tick0)
|
|
71656
|
+
) / dTick) - 1;
|
|
71657
|
+
|
|
71529
71658
|
for(;
|
|
71530
71659
|
(axrev) ? (x >= endTick) : (x <= endTick);
|
|
71531
71660
|
x = axes.tickIncrement(x, ax.dtick, axrev, ax.calendar)
|
|
71532
71661
|
) {
|
|
71662
|
+
id++;
|
|
71663
|
+
|
|
71533
71664
|
if(ax.rangebreaks) {
|
|
71534
71665
|
if(!axrev) {
|
|
71535
71666
|
if(x < startTick) continue;
|
|
@@ -71547,10 +71678,16 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
71547
71678
|
minor = true;
|
|
71548
71679
|
}
|
|
71549
71680
|
|
|
71550
|
-
|
|
71681
|
+
var obj = {
|
|
71551
71682
|
minor: minor,
|
|
71552
71683
|
value: x
|
|
71553
|
-
}
|
|
71684
|
+
};
|
|
71685
|
+
|
|
71686
|
+
if(ticklabelstep > 1 && id % ticklabelstep) {
|
|
71687
|
+
obj.skipLabel = true;
|
|
71688
|
+
}
|
|
71689
|
+
|
|
71690
|
+
tickVals.push(obj);
|
|
71554
71691
|
}
|
|
71555
71692
|
|
|
71556
71693
|
if(isPeriod) positionPeriodTicks(tickVals, ax, ax._definedDelta);
|
|
@@ -71603,12 +71740,20 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
71603
71740
|
ax._prevDateHead = '';
|
|
71604
71741
|
ax._inCalcTicks = true;
|
|
71605
71742
|
|
|
71743
|
+
var lastVisibleHead;
|
|
71744
|
+
var hideLabel = function(tick) {
|
|
71745
|
+
tick.text = ' '; // don't use an empty string here which can confuse automargin (issue 5132)
|
|
71746
|
+
ax._prevDateHead = lastVisibleHead;
|
|
71747
|
+
};
|
|
71748
|
+
|
|
71606
71749
|
var ticksOut = [];
|
|
71607
71750
|
var t, p;
|
|
71608
71751
|
for(i = 0; i < tickVals.length; i++) {
|
|
71609
71752
|
var _minor = tickVals[i].minor;
|
|
71610
71753
|
var _value = tickVals[i].value;
|
|
71611
71754
|
|
|
71755
|
+
lastVisibleHead = ax._prevDateHead;
|
|
71756
|
+
|
|
71612
71757
|
t = axes.tickText(
|
|
71613
71758
|
ax,
|
|
71614
71759
|
_value,
|
|
@@ -71623,11 +71768,14 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
71623
71768
|
if(p > maxRange) t.periodX = maxRange;
|
|
71624
71769
|
if(p < minRange) t.periodX = minRange;
|
|
71625
71770
|
|
|
71626
|
-
t
|
|
71627
|
-
ax._prevDateHead = '';
|
|
71771
|
+
hideLabel(t);
|
|
71628
71772
|
}
|
|
71629
71773
|
}
|
|
71630
71774
|
|
|
71775
|
+
if(tickVals[i].skipLabel) {
|
|
71776
|
+
hideLabel(t);
|
|
71777
|
+
}
|
|
71778
|
+
|
|
71631
71779
|
ticksOut.push(t);
|
|
71632
71780
|
}
|
|
71633
71781
|
|
|
@@ -73655,6 +73803,7 @@ axes.drawLabels = function(gd, ax, opts) {
|
|
|
73655
73803
|
var axId = ax._id;
|
|
73656
73804
|
var axLetter = axId.charAt(0);
|
|
73657
73805
|
var cls = opts.cls || axId + 'tick';
|
|
73806
|
+
|
|
73658
73807
|
var vals = opts.vals;
|
|
73659
73808
|
|
|
73660
73809
|
var labelFns = opts.labelFns;
|
|
@@ -78511,6 +78660,12 @@ module.exports = {
|
|
|
78511
78660
|
editType: 'ticks',
|
|
78512
78661
|
impliedEdits: {tickmode: 'linear'},
|
|
78513
78662
|
},
|
|
78663
|
+
ticklabelstep: {
|
|
78664
|
+
valType: 'integer',
|
|
78665
|
+
min: 1,
|
|
78666
|
+
dflt: 1,
|
|
78667
|
+
editType: 'ticks',
|
|
78668
|
+
},
|
|
78514
78669
|
tickvals: {
|
|
78515
78670
|
valType: 'data_array',
|
|
78516
78671
|
editType: 'ticks',
|
|
@@ -81375,6 +81530,14 @@ module.exports = function handleTickLabelDefaults(containerIn, containerOut, coe
|
|
|
81375
81530
|
color: dfltFontColor
|
|
81376
81531
|
});
|
|
81377
81532
|
|
|
81533
|
+
if(
|
|
81534
|
+
!options.noTicklabelstep &&
|
|
81535
|
+
axType !== 'multicategory' &&
|
|
81536
|
+
axType !== 'log'
|
|
81537
|
+
) {
|
|
81538
|
+
coerce('ticklabelstep');
|
|
81539
|
+
}
|
|
81540
|
+
|
|
81378
81541
|
if(!options.noAng) coerce('tickangle');
|
|
81379
81542
|
|
|
81380
81543
|
if(axType !== 'category') {
|
|
@@ -88754,7 +88917,7 @@ module.exports = function toSVG(gd, format, scale) {
|
|
|
88754
88917
|
var toppaper = fullLayout._toppaper;
|
|
88755
88918
|
var width = fullLayout.width;
|
|
88756
88919
|
var height = fullLayout.height;
|
|
88757
|
-
var i
|
|
88920
|
+
var i;
|
|
88758
88921
|
|
|
88759
88922
|
// make background color a rect in the svg, then revert after scraping
|
|
88760
88923
|
// all other alterations have been dealt with by properly preparing the svg
|
|
@@ -88827,32 +88990,21 @@ module.exports = function toSVG(gd, format, scale) {
|
|
|
88827
88990
|
}
|
|
88828
88991
|
});
|
|
88829
88992
|
|
|
88830
|
-
|
|
88831
|
-
|
|
88832
|
-
for(k in fullLayout._gradientUrlQueryParts) queryParts.push(k);
|
|
88833
|
-
}
|
|
88834
|
-
|
|
88835
|
-
if(fullLayout._patternUrlQueryParts) {
|
|
88836
|
-
for(k in fullLayout._patternUrlQueryParts) queryParts.push(k);
|
|
88837
|
-
}
|
|
88838
|
-
|
|
88839
|
-
if(queryParts.length) {
|
|
88840
|
-
svg.selectAll(queryParts.join(',')).each(function() {
|
|
88841
|
-
var pt = d3.select(this);
|
|
88993
|
+
svg.selectAll('.gradient_filled,.pattern_filled').each(function() {
|
|
88994
|
+
var pt = d3.select(this);
|
|
88842
88995
|
|
|
88843
|
-
|
|
88844
|
-
|
|
88845
|
-
|
|
88846
|
-
|
|
88847
|
-
|
|
88848
|
-
|
|
88996
|
+
// similar to font family styles above,
|
|
88997
|
+
// we must remove " after the SVG DOM has been serialized
|
|
88998
|
+
var fill = this.style.fill;
|
|
88999
|
+
if(fill && fill.indexOf('url(') !== -1) {
|
|
89000
|
+
pt.style('fill', fill.replace(DOUBLEQUOTE_REGEX, DUMMY_SUB));
|
|
89001
|
+
}
|
|
88849
89002
|
|
|
88850
|
-
|
|
88851
|
-
|
|
88852
|
-
|
|
88853
|
-
|
|
88854
|
-
|
|
88855
|
-
}
|
|
89003
|
+
var stroke = this.style.stroke;
|
|
89004
|
+
if(stroke && stroke.indexOf('url(') !== -1) {
|
|
89005
|
+
pt.style('stroke', stroke.replace(DOUBLEQUOTE_REGEX, DUMMY_SUB));
|
|
89006
|
+
}
|
|
89007
|
+
});
|
|
88856
89008
|
|
|
88857
89009
|
if(format === 'pdf' || format === 'eps') {
|
|
88858
89010
|
// these formats make the extra line MathJax adds around symbols look super thick in some cases
|
|
@@ -93944,6 +94096,7 @@ var hovertemplateAttrs = _dereq_('../../plots/template_attributes').hovertemplat
|
|
|
93944
94096
|
var colorScaleAttrs = _dereq_('../../components/colorscale/attributes');
|
|
93945
94097
|
var fontAttrs = _dereq_('../../plots/font_attributes');
|
|
93946
94098
|
var dash = _dereq_('../../components/drawing/attributes').dash;
|
|
94099
|
+
var pattern = _dereq_('../../components/drawing/attributes').pattern;
|
|
93947
94100
|
|
|
93948
94101
|
var Drawing = _dereq_('../../components/drawing');
|
|
93949
94102
|
var constants = _dereq_('./constants');
|
|
@@ -94131,6 +94284,7 @@ module.exports = {
|
|
|
94131
94284
|
editType: 'style',
|
|
94132
94285
|
anim: true,
|
|
94133
94286
|
},
|
|
94287
|
+
fillpattern: pattern,
|
|
94134
94288
|
marker: extendFlat({
|
|
94135
94289
|
symbol: {
|
|
94136
94290
|
valType: 'enumerated',
|
|
@@ -94867,6 +95021,7 @@ var handleLineDefaults = _dereq_('./line_defaults');
|
|
|
94867
95021
|
var handleLineShapeDefaults = _dereq_('./line_shape_defaults');
|
|
94868
95022
|
var handleTextDefaults = _dereq_('./text_defaults');
|
|
94869
95023
|
var handleFillColorDefaults = _dereq_('./fillcolor_defaults');
|
|
95024
|
+
var coercePattern = _dereq_('../../lib').coercePattern;
|
|
94870
95025
|
|
|
94871
95026
|
module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
|
|
94872
95027
|
function coerce(attr, dflt) {
|
|
@@ -94920,6 +95075,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
|
|
|
94920
95075
|
if(traceOut.fill !== 'none') {
|
|
94921
95076
|
handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce);
|
|
94922
95077
|
if(!subTypes.hasLines(traceOut)) handleLineShapeDefaults(traceIn, traceOut, coerce);
|
|
95078
|
+
coercePattern(coerce, 'fillpattern', traceOut.fillcolor, false);
|
|
94923
95079
|
}
|
|
94924
95080
|
|
|
94925
95081
|
var lineColor = (traceOut.line || {}).color;
|
|
@@ -96302,11 +96458,11 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
|
|
|
96302
96458
|
// the points on the axes are the first two points. Otherwise
|
|
96303
96459
|
// animations get a little crazy if the number of points changes.
|
|
96304
96460
|
transition(ownFillEl3).attr('d', 'M' + pt1 + 'L' + pt0 + 'L' + fullpath.substr(1))
|
|
96305
|
-
.call(Drawing.singleFillStyle);
|
|
96461
|
+
.call(Drawing.singleFillStyle, gd);
|
|
96306
96462
|
} else {
|
|
96307
96463
|
// fill to self: just join the path to itself
|
|
96308
96464
|
transition(ownFillEl3).attr('d', fullpath + 'Z')
|
|
96309
|
-
.call(Drawing.singleFillStyle);
|
|
96465
|
+
.call(Drawing.singleFillStyle, gd);
|
|
96310
96466
|
}
|
|
96311
96467
|
}
|
|
96312
96468
|
} else if(tonext) {
|
|
@@ -96318,7 +96474,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
|
|
|
96318
96474
|
// This makes strange results if one path is *not* entirely
|
|
96319
96475
|
// inside the other, but then that is a strange usage.
|
|
96320
96476
|
transition(tonext).attr('d', fullpath + 'Z' + prevRevpath + 'Z')
|
|
96321
|
-
.call(Drawing.singleFillStyle);
|
|
96477
|
+
.call(Drawing.singleFillStyle, gd);
|
|
96322
96478
|
} else {
|
|
96323
96479
|
// tonextx/y: for now just connect endpoints with lines. This is
|
|
96324
96480
|
// the correct behavior if the endpoints are at the same value of
|
|
@@ -96326,7 +96482,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
|
|
|
96326
96482
|
// things depending on whether the new endpoint projects onto the
|
|
96327
96483
|
// existing curve or off the end of it
|
|
96328
96484
|
transition(tonext).attr('d', fullpath + 'L' + prevRevpath.substr(1) + 'Z')
|
|
96329
|
-
.call(Drawing.singleFillStyle);
|
|
96485
|
+
.call(Drawing.singleFillStyle, gd);
|
|
96330
96486
|
}
|
|
96331
96487
|
trace._polygons = trace._polygons.concat(prevPolygons);
|
|
96332
96488
|
} else {
|
|
@@ -96719,7 +96875,7 @@ function style(gd) {
|
|
|
96719
96875
|
.call(Drawing.lineGroupStyle);
|
|
96720
96876
|
|
|
96721
96877
|
s.selectAll('g.trace path.js-fill')
|
|
96722
|
-
.call(Drawing.fillGroupStyle);
|
|
96878
|
+
.call(Drawing.fillGroupStyle, gd);
|
|
96723
96879
|
|
|
96724
96880
|
Registry.getComponentMethod('errorbars', 'style')(s);
|
|
96725
96881
|
}
|
|
@@ -100910,7 +101066,7 @@ function getSortFunc(opts, d2c) {
|
|
|
100910
101066
|
'use strict';
|
|
100911
101067
|
|
|
100912
101068
|
// package version injected by `npm run preprocess`
|
|
100913
|
-
exports.version = '2.
|
|
101069
|
+
exports.version = '2.10.0';
|
|
100914
101070
|
|
|
100915
101071
|
},{}],588:[function(_dereq_,module,exports){
|
|
100916
101072
|
(function (global){(function (){
|