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
package/dist/plotly-finance.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plotly.js (finance) v2.
|
|
3
|
-
* Copyright 2012-
|
|
2
|
+
* plotly.js (finance) v2.10.1
|
|
3
|
+
* Copyright 2012-2022, Plotly, Inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the MIT license
|
|
6
6
|
*/
|
|
@@ -22880,6 +22880,7 @@ module.exports = overrideAll({
|
|
|
22880
22880
|
ticklen: axesAttrs.ticklen,
|
|
22881
22881
|
tickwidth: axesAttrs.tickwidth,
|
|
22882
22882
|
tickcolor: axesAttrs.tickcolor,
|
|
22883
|
+
ticklabelstep: axesAttrs.ticklabelstep,
|
|
22883
22884
|
showticklabels: axesAttrs.showticklabels,
|
|
22884
22885
|
tickfont: fontAttrs({
|
|
22885
22886
|
}),
|
|
@@ -23970,6 +23971,7 @@ function mockColorBarAxis(gd, opts, zrange) {
|
|
|
23970
23971
|
showticklabels: opts.showticklabels,
|
|
23971
23972
|
ticklabelposition: opts.ticklabelposition,
|
|
23972
23973
|
ticklabeloverflow: opts.ticklabeloverflow,
|
|
23974
|
+
ticklabelstep: opts.ticklabelstep,
|
|
23973
23975
|
tickfont: opts.tickfont,
|
|
23974
23976
|
tickangle: opts.tickangle,
|
|
23975
23977
|
tickformat: opts.tickformat,
|
|
@@ -25708,24 +25710,42 @@ drawing.dashStyle = function(dash, lineWidth) {
|
|
|
25708
25710
|
return dash;
|
|
25709
25711
|
};
|
|
25710
25712
|
|
|
25713
|
+
function setFillStyle(sel, trace, gd) {
|
|
25714
|
+
var markerPattern = trace.fillpattern;
|
|
25715
|
+
var patternShape = markerPattern && drawing.getPatternAttr(markerPattern.shape, 0, '');
|
|
25716
|
+
if(patternShape) {
|
|
25717
|
+
var patternBGColor = drawing.getPatternAttr(markerPattern.bgcolor, 0, null);
|
|
25718
|
+
var patternFGColor = drawing.getPatternAttr(markerPattern.fgcolor, 0, null);
|
|
25719
|
+
var patternFGOpacity = markerPattern.fgopacity;
|
|
25720
|
+
var patternSize = drawing.getPatternAttr(markerPattern.size, 0, 8);
|
|
25721
|
+
var patternSolidity = drawing.getPatternAttr(markerPattern.solidity, 0, 0.3);
|
|
25722
|
+
var patternID = trace.uid;
|
|
25723
|
+
drawing.pattern(sel, 'point', gd, patternID,
|
|
25724
|
+
patternShape, patternSize, patternSolidity,
|
|
25725
|
+
undefined, markerPattern.fillmode,
|
|
25726
|
+
patternBGColor, patternFGColor, patternFGOpacity
|
|
25727
|
+
);
|
|
25728
|
+
} else if(trace.fillcolor) {
|
|
25729
|
+
sel.call(Color.fill, trace.fillcolor);
|
|
25730
|
+
}
|
|
25731
|
+
}
|
|
25732
|
+
|
|
25711
25733
|
// Same as fillGroupStyle, except in this case the selection may be a transition
|
|
25712
|
-
drawing.singleFillStyle = function(sel) {
|
|
25734
|
+
drawing.singleFillStyle = function(sel, gd) {
|
|
25713
25735
|
var node = d3.select(sel.node());
|
|
25714
25736
|
var data = node.data();
|
|
25715
|
-
var
|
|
25716
|
-
|
|
25717
|
-
sel.call(Color.fill, fillcolor);
|
|
25718
|
-
}
|
|
25737
|
+
var trace = ((data[0] || [])[0] || {}).trace || {};
|
|
25738
|
+
setFillStyle(sel, trace, gd);
|
|
25719
25739
|
};
|
|
25720
25740
|
|
|
25721
|
-
drawing.fillGroupStyle = function(s) {
|
|
25741
|
+
drawing.fillGroupStyle = function(s, gd) {
|
|
25722
25742
|
s.style('stroke-width', 0)
|
|
25723
25743
|
.each(function(d) {
|
|
25724
25744
|
var shape = d3.select(this);
|
|
25725
25745
|
// N.B. 'd' won't be a calcdata item when
|
|
25726
25746
|
// fill !== 'none' on a segment-less and marker-less trace
|
|
25727
25747
|
if(d[0].trace) {
|
|
25728
|
-
shape
|
|
25748
|
+
setFillStyle(shape, d[0].trace, gd);
|
|
25729
25749
|
}
|
|
25730
25750
|
});
|
|
25731
25751
|
};
|
|
@@ -25878,12 +25898,7 @@ drawing.gradient = function(sel, gd, gradientID, type, colorscale, prop) {
|
|
|
25878
25898
|
sel.style(prop, getFullUrl(fullID, gd))
|
|
25879
25899
|
.style(prop + '-opacity', null);
|
|
25880
25900
|
|
|
25881
|
-
|
|
25882
|
-
return '.' + s.attr('class').replace(/\s/g, '.');
|
|
25883
|
-
};
|
|
25884
|
-
var k = className2query(d3.select(sel.node().parentNode)) +
|
|
25885
|
-
'>' + className2query(sel);
|
|
25886
|
-
fullLayout._gradientUrlQueryParts[k] = 1;
|
|
25901
|
+
sel.classed('gradient_filled', true);
|
|
25887
25902
|
};
|
|
25888
25903
|
|
|
25889
25904
|
/**
|
|
@@ -26090,11 +26105,6 @@ drawing.pattern = function(sel, calledBy, gd, patternID, shape, size, solidity,
|
|
|
26090
26105
|
.style('fill-opacity', null);
|
|
26091
26106
|
|
|
26092
26107
|
sel.classed('pattern_filled', true);
|
|
26093
|
-
var className2query = function(s) {
|
|
26094
|
-
return '.' + s.attr('class').replace(/\s/g, '.');
|
|
26095
|
-
};
|
|
26096
|
-
var k = className2query(d3.select(sel.node().parentNode)) + '>.pattern_filled';
|
|
26097
|
-
fullLayout._patternUrlQueryParts[k] = 1;
|
|
26098
26108
|
};
|
|
26099
26109
|
|
|
26100
26110
|
/*
|
|
@@ -26110,9 +26120,7 @@ drawing.initGradients = function(gd) {
|
|
|
26110
26120
|
var gradientsGroup = Lib.ensureSingle(fullLayout._defs, 'g', 'gradients');
|
|
26111
26121
|
gradientsGroup.selectAll('linearGradient,radialGradient').remove();
|
|
26112
26122
|
|
|
26113
|
-
|
|
26114
|
-
// used to fix URL strings during image exports
|
|
26115
|
-
fullLayout._gradientUrlQueryParts = {};
|
|
26123
|
+
d3.select(gd).selectAll('.gradient_filled').classed('gradient_filled', false);
|
|
26116
26124
|
};
|
|
26117
26125
|
|
|
26118
26126
|
drawing.initPatterns = function(gd) {
|
|
@@ -26121,9 +26129,7 @@ drawing.initPatterns = function(gd) {
|
|
|
26121
26129
|
var patternsGroup = Lib.ensureSingle(fullLayout._defs, 'g', 'patterns');
|
|
26122
26130
|
patternsGroup.selectAll('pattern').remove();
|
|
26123
26131
|
|
|
26124
|
-
|
|
26125
|
-
// used to fix URL strings during image exports
|
|
26126
|
-
fullLayout._patternUrlQueryParts = {};
|
|
26132
|
+
d3.select(gd).selectAll('.pattern_filled').classed('pattern_filled', false);
|
|
26127
26133
|
};
|
|
26128
26134
|
|
|
26129
26135
|
drawing.getPatternAttr = function(mp, i, dflt) {
|
|
@@ -32776,7 +32782,6 @@ function computeLegendDimensions(gd, groups, traces, legendObj) {
|
|
|
32776
32782
|
offsetY += h;
|
|
32777
32783
|
maxWidthInGroup = Math.max(maxWidthInGroup, textGap + w);
|
|
32778
32784
|
});
|
|
32779
|
-
maxGroupHeightInRow = Math.max(maxGroupHeightInRow, offsetY);
|
|
32780
32785
|
|
|
32781
32786
|
var next = maxWidthInGroup + itemGap;
|
|
32782
32787
|
|
|
@@ -32792,6 +32797,8 @@ function computeLegendDimensions(gd, groups, traces, legendObj) {
|
|
|
32792
32797
|
groupOffsetX = 0;
|
|
32793
32798
|
groupOffsetY += maxGroupHeightInRow + traceGroupGap;
|
|
32794
32799
|
maxGroupHeightInRow = offsetY;
|
|
32800
|
+
} else {
|
|
32801
|
+
maxGroupHeightInRow = Math.max(maxGroupHeightInRow, offsetY);
|
|
32795
32802
|
}
|
|
32796
32803
|
|
|
32797
32804
|
Drawing.setTranslate(this, groupOffsetX, groupOffsetY);
|
|
@@ -33459,12 +33466,16 @@ module.exports = function style(s, gd, legend) {
|
|
|
33459
33466
|
var colorscale = cOpts.colorscale;
|
|
33460
33467
|
var reversescale = cOpts.reversescale;
|
|
33461
33468
|
|
|
33462
|
-
var
|
|
33469
|
+
var fillStyle = function(s) {
|
|
33463
33470
|
if(s.size()) {
|
|
33464
|
-
|
|
33465
|
-
|
|
33466
|
-
|
|
33467
|
-
|
|
33471
|
+
if(showFill) {
|
|
33472
|
+
Drawing.fillGroupStyle(s, gd);
|
|
33473
|
+
} else {
|
|
33474
|
+
var gradientID = 'legendfill-' + trace.uid;
|
|
33475
|
+
Drawing.gradient(s, gd, gradientID,
|
|
33476
|
+
getGradientDirection(reversescale),
|
|
33477
|
+
colorscale, 'fill');
|
|
33478
|
+
}
|
|
33468
33479
|
}
|
|
33469
33480
|
};
|
|
33470
33481
|
|
|
@@ -33493,7 +33504,7 @@ module.exports = function style(s, gd, legend) {
|
|
|
33493
33504
|
fill.enter().append('path').classed('js-fill', true);
|
|
33494
33505
|
fill.exit().remove();
|
|
33495
33506
|
fill.attr('d', pathStart + 'h' + itemWidth + 'v6h-' + itemWidth + 'z')
|
|
33496
|
-
.call(
|
|
33507
|
+
.call(fillStyle);
|
|
33497
33508
|
|
|
33498
33509
|
if(showLine || showGradientLine) {
|
|
33499
33510
|
var lw = boundLineWidth(undefined, trace.line, MAX_LINE_WIDTH, CST_LINE_WIDTH);
|
|
@@ -35274,6 +35285,8 @@ var isNumeric = _dereq_('fast-isnumeric');
|
|
|
35274
35285
|
|
|
35275
35286
|
var Lib = _dereq_('../../lib');
|
|
35276
35287
|
var Icons = _dereq_('../../fonts/ploticon');
|
|
35288
|
+
var version = _dereq_('../../version').version;
|
|
35289
|
+
|
|
35277
35290
|
var Parser = new DOMParser();
|
|
35278
35291
|
|
|
35279
35292
|
/**
|
|
@@ -35552,6 +35565,10 @@ proto.hasButtons = function(buttons) {
|
|
|
35552
35565
|
return true;
|
|
35553
35566
|
};
|
|
35554
35567
|
|
|
35568
|
+
function jsVersion(str) {
|
|
35569
|
+
return str + ' (v' + version + ')';
|
|
35570
|
+
}
|
|
35571
|
+
|
|
35555
35572
|
/**
|
|
35556
35573
|
* @return {HTMLDivElement} The logo image wrapped in a group
|
|
35557
35574
|
*/
|
|
@@ -35561,7 +35578,7 @@ proto.getLogo = function() {
|
|
|
35561
35578
|
|
|
35562
35579
|
a.href = 'https://plotly.com/';
|
|
35563
35580
|
a.target = '_blank';
|
|
35564
|
-
a.setAttribute('data-title', Lib._(this.graphInfo, 'Produced with Plotly'));
|
|
35581
|
+
a.setAttribute('data-title', jsVersion(Lib._(this.graphInfo, 'Produced with Plotly.js')));
|
|
35565
35582
|
a.className = 'modebar-btn plotlyjsicon modebar-btn--logo';
|
|
35566
35583
|
|
|
35567
35584
|
a.appendChild(this.createIcon(Icons.newplotlylogo));
|
|
@@ -35603,7 +35620,7 @@ function createModeBar(gd, buttons) {
|
|
|
35603
35620
|
|
|
35604
35621
|
module.exports = createModeBar;
|
|
35605
35622
|
|
|
35606
|
-
},{"../../fonts/ploticon":225,"../../lib":242,"@plotly/d3":18,"fast-isnumeric":26}],177:[function(_dereq_,module,exports){
|
|
35623
|
+
},{"../../fonts/ploticon":225,"../../lib":242,"../../version":474,"@plotly/d3":18,"fast-isnumeric":26}],177:[function(_dereq_,module,exports){
|
|
35607
35624
|
'use strict';
|
|
35608
35625
|
|
|
35609
35626
|
var fontAttrs = _dereq_('../../plots/font_attributes');
|
|
@@ -48128,6 +48145,7 @@ exports.convertToTspans = function(_context, gd, _callback) {
|
|
|
48128
48145
|
// Until we get tex integrated more fully (so it can be used along with non-tex)
|
|
48129
48146
|
// allow some elements to prohibit it by attaching 'data-notex' to the original
|
|
48130
48147
|
var tex = (!_context.attr('data-notex')) &&
|
|
48148
|
+
gd && gd._context.typesetMath &&
|
|
48131
48149
|
(typeof MathJax !== 'undefined') &&
|
|
48132
48150
|
str.match(FIND_TEX);
|
|
48133
48151
|
|
|
@@ -48282,70 +48300,154 @@ function cleanEscapesForTex(s) {
|
|
|
48282
48300
|
.replace(GT_MATCH, '\\gt ');
|
|
48283
48301
|
}
|
|
48284
48302
|
|
|
48303
|
+
var inlineMath = [['$', '$'], ['\\(', '\\)']];
|
|
48304
|
+
|
|
48285
48305
|
function texToSVG(_texString, _config, _callback) {
|
|
48306
|
+
var MathJaxVersion = parseInt(
|
|
48307
|
+
(MathJax.version || '').split('.')[0]
|
|
48308
|
+
);
|
|
48309
|
+
|
|
48310
|
+
if(
|
|
48311
|
+
MathJaxVersion !== 2 &&
|
|
48312
|
+
MathJaxVersion !== 3
|
|
48313
|
+
) {
|
|
48314
|
+
Lib.warn('No MathJax version:', MathJax.version);
|
|
48315
|
+
return;
|
|
48316
|
+
}
|
|
48317
|
+
|
|
48286
48318
|
var originalRenderer,
|
|
48287
48319
|
originalConfig,
|
|
48288
48320
|
originalProcessSectionDelay,
|
|
48289
48321
|
tmpDiv;
|
|
48290
48322
|
|
|
48291
|
-
|
|
48292
|
-
function() {
|
|
48323
|
+
var setConfig2 = function() {
|
|
48293
48324
|
originalConfig = Lib.extendDeepAll({}, MathJax.Hub.config);
|
|
48294
48325
|
|
|
48295
48326
|
originalProcessSectionDelay = MathJax.Hub.processSectionDelay;
|
|
48296
48327
|
if(MathJax.Hub.processSectionDelay !== undefined) {
|
|
48297
|
-
// MathJax 2.5+
|
|
48328
|
+
// MathJax 2.5+ but not 3+
|
|
48298
48329
|
MathJax.Hub.processSectionDelay = 0;
|
|
48299
48330
|
}
|
|
48300
48331
|
|
|
48301
48332
|
return MathJax.Hub.Config({
|
|
48302
48333
|
messageStyle: 'none',
|
|
48303
48334
|
tex2jax: {
|
|
48304
|
-
inlineMath:
|
|
48335
|
+
inlineMath: inlineMath
|
|
48305
48336
|
},
|
|
48306
48337
|
displayAlign: 'left',
|
|
48307
48338
|
});
|
|
48308
|
-
}
|
|
48309
|
-
|
|
48310
|
-
|
|
48339
|
+
};
|
|
48340
|
+
|
|
48341
|
+
var setConfig3 = function() {
|
|
48342
|
+
originalConfig = Lib.extendDeepAll({}, MathJax.config);
|
|
48343
|
+
|
|
48344
|
+
if(!MathJax.config.tex) {
|
|
48345
|
+
MathJax.config.tex = {};
|
|
48346
|
+
}
|
|
48347
|
+
|
|
48348
|
+
MathJax.config.tex.inlineMath = inlineMath;
|
|
48349
|
+
};
|
|
48350
|
+
|
|
48351
|
+
var setRenderer2 = function() {
|
|
48311
48352
|
originalRenderer = MathJax.Hub.config.menuSettings.renderer;
|
|
48312
48353
|
if(originalRenderer !== 'SVG') {
|
|
48313
48354
|
return MathJax.Hub.setRenderer('SVG');
|
|
48314
48355
|
}
|
|
48315
|
-
}
|
|
48316
|
-
|
|
48356
|
+
};
|
|
48357
|
+
|
|
48358
|
+
var setRenderer3 = function() {
|
|
48359
|
+
originalRenderer = MathJax.config.startup.output;
|
|
48360
|
+
if(originalRenderer !== 'svg') {
|
|
48361
|
+
MathJax.config.startup.output = 'svg';
|
|
48362
|
+
}
|
|
48363
|
+
};
|
|
48364
|
+
|
|
48365
|
+
var initiateMathJax = function() {
|
|
48317
48366
|
var randomID = 'math-output-' + Lib.randstr({}, 64);
|
|
48318
48367
|
tmpDiv = d3.select('body').append('div')
|
|
48319
48368
|
.attr({id: randomID})
|
|
48320
|
-
.style({
|
|
48321
|
-
|
|
48369
|
+
.style({
|
|
48370
|
+
visibility: 'hidden',
|
|
48371
|
+
position: 'absolute',
|
|
48372
|
+
'font-size': _config.fontSize + 'px'
|
|
48373
|
+
})
|
|
48322
48374
|
.text(cleanEscapesForTex(_texString));
|
|
48323
48375
|
|
|
48324
|
-
|
|
48325
|
-
},
|
|
48326
|
-
function() {
|
|
48327
|
-
var glyphDefs = d3.select('body').select('#MathJax_SVG_glyphs');
|
|
48376
|
+
var tmpNode = tmpDiv.node();
|
|
48328
48377
|
|
|
48329
|
-
|
|
48378
|
+
return MathJaxVersion === 2 ?
|
|
48379
|
+
MathJax.Hub.Typeset(tmpNode) :
|
|
48380
|
+
MathJax.typeset([tmpNode]);
|
|
48381
|
+
};
|
|
48382
|
+
|
|
48383
|
+
var finalizeMathJax = function() {
|
|
48384
|
+
var sel = tmpDiv.select(
|
|
48385
|
+
MathJaxVersion === 2 ? '.MathJax_SVG' : '.MathJax'
|
|
48386
|
+
);
|
|
48387
|
+
|
|
48388
|
+
var node = !sel.empty() && tmpDiv.select('svg').node();
|
|
48389
|
+
if(!node) {
|
|
48330
48390
|
Lib.log('There was an error in the tex syntax.', _texString);
|
|
48331
48391
|
_callback();
|
|
48332
48392
|
} else {
|
|
48333
|
-
var
|
|
48334
|
-
|
|
48393
|
+
var nodeBBox = node.getBoundingClientRect();
|
|
48394
|
+
var glyphDefs;
|
|
48395
|
+
if(MathJaxVersion === 2) {
|
|
48396
|
+
glyphDefs = d3.select('body').select('#MathJax_SVG_glyphs');
|
|
48397
|
+
} else {
|
|
48398
|
+
glyphDefs = sel.select('defs');
|
|
48399
|
+
}
|
|
48400
|
+
_callback(sel, glyphDefs, nodeBBox);
|
|
48335
48401
|
}
|
|
48336
48402
|
|
|
48337
48403
|
tmpDiv.remove();
|
|
48404
|
+
};
|
|
48338
48405
|
|
|
48406
|
+
var resetRenderer2 = function() {
|
|
48339
48407
|
if(originalRenderer !== 'SVG') {
|
|
48340
48408
|
return MathJax.Hub.setRenderer(originalRenderer);
|
|
48341
48409
|
}
|
|
48342
|
-
}
|
|
48343
|
-
|
|
48410
|
+
};
|
|
48411
|
+
|
|
48412
|
+
var resetRenderer3 = function() {
|
|
48413
|
+
if(originalRenderer !== 'svg') {
|
|
48414
|
+
MathJax.config.startup.output = originalRenderer;
|
|
48415
|
+
}
|
|
48416
|
+
};
|
|
48417
|
+
|
|
48418
|
+
var resetConfig2 = function() {
|
|
48344
48419
|
if(originalProcessSectionDelay !== undefined) {
|
|
48345
48420
|
MathJax.Hub.processSectionDelay = originalProcessSectionDelay;
|
|
48346
48421
|
}
|
|
48347
48422
|
return MathJax.Hub.Config(originalConfig);
|
|
48348
|
-
}
|
|
48423
|
+
};
|
|
48424
|
+
|
|
48425
|
+
var resetConfig3 = function() {
|
|
48426
|
+
MathJax.config = originalConfig;
|
|
48427
|
+
};
|
|
48428
|
+
|
|
48429
|
+
if(MathJaxVersion === 2) {
|
|
48430
|
+
MathJax.Hub.Queue(
|
|
48431
|
+
setConfig2,
|
|
48432
|
+
setRenderer2,
|
|
48433
|
+
initiateMathJax,
|
|
48434
|
+
finalizeMathJax,
|
|
48435
|
+
resetRenderer2,
|
|
48436
|
+
resetConfig2
|
|
48437
|
+
);
|
|
48438
|
+
} else if(MathJaxVersion === 3) {
|
|
48439
|
+
setConfig3();
|
|
48440
|
+
setRenderer3();
|
|
48441
|
+
MathJax.startup.defaultReady();
|
|
48442
|
+
|
|
48443
|
+
MathJax.startup.promise.then(function() {
|
|
48444
|
+
initiateMathJax();
|
|
48445
|
+
finalizeMathJax();
|
|
48446
|
+
|
|
48447
|
+
resetRenderer3();
|
|
48448
|
+
resetConfig3();
|
|
48449
|
+
});
|
|
48450
|
+
}
|
|
48349
48451
|
}
|
|
48350
48452
|
|
|
48351
48453
|
var TAG_STYLES = {
|
|
@@ -54165,6 +54267,11 @@ var configAttributes = {
|
|
|
54165
54267
|
dflt: false,
|
|
54166
54268
|
},
|
|
54167
54269
|
|
|
54270
|
+
typesetMath: {
|
|
54271
|
+
valType: 'boolean',
|
|
54272
|
+
dflt: true,
|
|
54273
|
+
},
|
|
54274
|
+
|
|
54168
54275
|
plotlyServerURL: {
|
|
54169
54276
|
valType: 'string',
|
|
54170
54277
|
dflt: '',
|
|
@@ -59010,7 +59117,8 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
59010
59117
|
var minRange = Math.min(rng[0], rng[1]);
|
|
59011
59118
|
var maxRange = Math.max(rng[0], rng[1]);
|
|
59012
59119
|
|
|
59013
|
-
var
|
|
59120
|
+
var numDtick = isNumeric(ax.dtick);
|
|
59121
|
+
var isDLog = (ax.type === 'log') && !(numDtick || ax.dtick.charAt(0) === 'L');
|
|
59014
59122
|
var isPeriod = ax.ticklabelmode === 'period';
|
|
59015
59123
|
|
|
59016
59124
|
// find the first tick
|
|
@@ -59041,13 +59149,36 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
59041
59149
|
x = axes.tickIncrement(x, ax.dtick, !axrev, ax.calendar);
|
|
59042
59150
|
}
|
|
59043
59151
|
|
|
59152
|
+
var ticklabelstep = ax.ticklabelstep;
|
|
59153
|
+
|
|
59044
59154
|
var maxTicks = Math.max(1000, ax._length || 0);
|
|
59045
59155
|
var tickVals = [];
|
|
59046
59156
|
var xPrevious = null;
|
|
59157
|
+
|
|
59158
|
+
var dTick;
|
|
59159
|
+
if(numDtick) {
|
|
59160
|
+
dTick = ax.dtick;
|
|
59161
|
+
} else {
|
|
59162
|
+
if(ax.type === 'date') {
|
|
59163
|
+
if(typeof ax.dtick === 'string' && ax.dtick.charAt(0) === 'M') {
|
|
59164
|
+
dTick = ONEAVGMONTH * ax.dtick.substring(1);
|
|
59165
|
+
}
|
|
59166
|
+
} else {
|
|
59167
|
+
dTick = ax._roughDTick;
|
|
59168
|
+
}
|
|
59169
|
+
}
|
|
59170
|
+
|
|
59171
|
+
var id = Math.round((
|
|
59172
|
+
ax.r2l(x) -
|
|
59173
|
+
ax.r2l(ax.tick0)
|
|
59174
|
+
) / dTick) - 1;
|
|
59175
|
+
|
|
59047
59176
|
for(;
|
|
59048
59177
|
(axrev) ? (x >= endTick) : (x <= endTick);
|
|
59049
59178
|
x = axes.tickIncrement(x, ax.dtick, axrev, ax.calendar)
|
|
59050
59179
|
) {
|
|
59180
|
+
id++;
|
|
59181
|
+
|
|
59051
59182
|
if(ax.rangebreaks) {
|
|
59052
59183
|
if(!axrev) {
|
|
59053
59184
|
if(x < startTick) continue;
|
|
@@ -59065,10 +59196,16 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
59065
59196
|
minor = true;
|
|
59066
59197
|
}
|
|
59067
59198
|
|
|
59068
|
-
|
|
59199
|
+
var obj = {
|
|
59069
59200
|
minor: minor,
|
|
59070
59201
|
value: x
|
|
59071
|
-
}
|
|
59202
|
+
};
|
|
59203
|
+
|
|
59204
|
+
if(ticklabelstep > 1 && id % ticklabelstep) {
|
|
59205
|
+
obj.skipLabel = true;
|
|
59206
|
+
}
|
|
59207
|
+
|
|
59208
|
+
tickVals.push(obj);
|
|
59072
59209
|
}
|
|
59073
59210
|
|
|
59074
59211
|
if(isPeriod) positionPeriodTicks(tickVals, ax, ax._definedDelta);
|
|
@@ -59121,12 +59258,20 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
59121
59258
|
ax._prevDateHead = '';
|
|
59122
59259
|
ax._inCalcTicks = true;
|
|
59123
59260
|
|
|
59261
|
+
var lastVisibleHead;
|
|
59262
|
+
var hideLabel = function(tick) {
|
|
59263
|
+
tick.text = ' '; // don't use an empty string here which can confuse automargin (issue 5132)
|
|
59264
|
+
ax._prevDateHead = lastVisibleHead;
|
|
59265
|
+
};
|
|
59266
|
+
|
|
59124
59267
|
var ticksOut = [];
|
|
59125
59268
|
var t, p;
|
|
59126
59269
|
for(i = 0; i < tickVals.length; i++) {
|
|
59127
59270
|
var _minor = tickVals[i].minor;
|
|
59128
59271
|
var _value = tickVals[i].value;
|
|
59129
59272
|
|
|
59273
|
+
lastVisibleHead = ax._prevDateHead;
|
|
59274
|
+
|
|
59130
59275
|
t = axes.tickText(
|
|
59131
59276
|
ax,
|
|
59132
59277
|
_value,
|
|
@@ -59141,11 +59286,14 @@ axes.calcTicks = function calcTicks(ax, opts) {
|
|
|
59141
59286
|
if(p > maxRange) t.periodX = maxRange;
|
|
59142
59287
|
if(p < minRange) t.periodX = minRange;
|
|
59143
59288
|
|
|
59144
|
-
t
|
|
59145
|
-
ax._prevDateHead = '';
|
|
59289
|
+
hideLabel(t);
|
|
59146
59290
|
}
|
|
59147
59291
|
}
|
|
59148
59292
|
|
|
59293
|
+
if(tickVals[i].skipLabel) {
|
|
59294
|
+
hideLabel(t);
|
|
59295
|
+
}
|
|
59296
|
+
|
|
59149
59297
|
ticksOut.push(t);
|
|
59150
59298
|
}
|
|
59151
59299
|
|
|
@@ -61173,6 +61321,7 @@ axes.drawLabels = function(gd, ax, opts) {
|
|
|
61173
61321
|
var axId = ax._id;
|
|
61174
61322
|
var axLetter = axId.charAt(0);
|
|
61175
61323
|
var cls = opts.cls || axId + 'tick';
|
|
61324
|
+
|
|
61176
61325
|
var vals = opts.vals;
|
|
61177
61326
|
|
|
61178
61327
|
var labelFns = opts.labelFns;
|
|
@@ -66029,6 +66178,12 @@ module.exports = {
|
|
|
66029
66178
|
editType: 'ticks',
|
|
66030
66179
|
impliedEdits: {tickmode: 'linear'},
|
|
66031
66180
|
},
|
|
66181
|
+
ticklabelstep: {
|
|
66182
|
+
valType: 'integer',
|
|
66183
|
+
min: 1,
|
|
66184
|
+
dflt: 1,
|
|
66185
|
+
editType: 'ticks',
|
|
66186
|
+
},
|
|
66032
66187
|
tickvals: {
|
|
66033
66188
|
valType: 'data_array',
|
|
66034
66189
|
editType: 'ticks',
|
|
@@ -68893,6 +69048,14 @@ module.exports = function handleTickLabelDefaults(containerIn, containerOut, coe
|
|
|
68893
69048
|
color: dfltFontColor
|
|
68894
69049
|
});
|
|
68895
69050
|
|
|
69051
|
+
if(
|
|
69052
|
+
!options.noTicklabelstep &&
|
|
69053
|
+
axType !== 'multicategory' &&
|
|
69054
|
+
axType !== 'log'
|
|
69055
|
+
) {
|
|
69056
|
+
coerce('ticklabelstep');
|
|
69057
|
+
}
|
|
69058
|
+
|
|
68896
69059
|
if(!options.noAng) coerce('tickangle');
|
|
68897
69060
|
|
|
68898
69061
|
if(axType !== 'category') {
|
|
@@ -74898,7 +75061,7 @@ module.exports = function toSVG(gd, format, scale) {
|
|
|
74898
75061
|
var toppaper = fullLayout._toppaper;
|
|
74899
75062
|
var width = fullLayout.width;
|
|
74900
75063
|
var height = fullLayout.height;
|
|
74901
|
-
var i
|
|
75064
|
+
var i;
|
|
74902
75065
|
|
|
74903
75066
|
// make background color a rect in the svg, then revert after scraping
|
|
74904
75067
|
// all other alterations have been dealt with by properly preparing the svg
|
|
@@ -74971,32 +75134,21 @@ module.exports = function toSVG(gd, format, scale) {
|
|
|
74971
75134
|
}
|
|
74972
75135
|
});
|
|
74973
75136
|
|
|
74974
|
-
|
|
74975
|
-
|
|
74976
|
-
for(k in fullLayout._gradientUrlQueryParts) queryParts.push(k);
|
|
74977
|
-
}
|
|
74978
|
-
|
|
74979
|
-
if(fullLayout._patternUrlQueryParts) {
|
|
74980
|
-
for(k in fullLayout._patternUrlQueryParts) queryParts.push(k);
|
|
74981
|
-
}
|
|
75137
|
+
svg.selectAll('.gradient_filled,.pattern_filled').each(function() {
|
|
75138
|
+
var pt = d3.select(this);
|
|
74982
75139
|
|
|
74983
|
-
|
|
74984
|
-
|
|
74985
|
-
|
|
74986
|
-
|
|
74987
|
-
|
|
74988
|
-
|
|
74989
|
-
var fill = this.style.fill;
|
|
74990
|
-
if(fill && fill.indexOf('url(') !== -1) {
|
|
74991
|
-
pt.style('fill', fill.replace(DOUBLEQUOTE_REGEX, DUMMY_SUB));
|
|
74992
|
-
}
|
|
75140
|
+
// similar to font family styles above,
|
|
75141
|
+
// we must remove " after the SVG DOM has been serialized
|
|
75142
|
+
var fill = this.style.fill;
|
|
75143
|
+
if(fill && fill.indexOf('url(') !== -1) {
|
|
75144
|
+
pt.style('fill', fill.replace(DOUBLEQUOTE_REGEX, DUMMY_SUB));
|
|
75145
|
+
}
|
|
74993
75146
|
|
|
74994
|
-
|
|
74995
|
-
|
|
74996
|
-
|
|
74997
|
-
|
|
74998
|
-
|
|
74999
|
-
}
|
|
75147
|
+
var stroke = this.style.stroke;
|
|
75148
|
+
if(stroke && stroke.indexOf('url(') !== -1) {
|
|
75149
|
+
pt.style('stroke', stroke.replace(DOUBLEQUOTE_REGEX, DUMMY_SUB));
|
|
75150
|
+
}
|
|
75151
|
+
});
|
|
75000
75152
|
|
|
75001
75153
|
if(format === 'pdf' || format === 'eps') {
|
|
75002
75154
|
// these formats make the extra line MathJax adds around symbols look super thick in some cases
|
|
@@ -82089,6 +82241,7 @@ module.exports = {
|
|
|
82089
82241
|
ticklen: axesAttrs.ticklen,
|
|
82090
82242
|
tickwidth: axesAttrs.tickwidth,
|
|
82091
82243
|
tickcolor: axesAttrs.tickcolor,
|
|
82244
|
+
ticklabelstep: axesAttrs.ticklabelstep,
|
|
82092
82245
|
showticklabels: axesAttrs.showticklabels,
|
|
82093
82246
|
tickfont: fontAttrs({
|
|
82094
82247
|
}),
|
|
@@ -85871,6 +86024,7 @@ var hovertemplateAttrs = _dereq_('../../plots/template_attributes').hovertemplat
|
|
|
85871
86024
|
var colorScaleAttrs = _dereq_('../../components/colorscale/attributes');
|
|
85872
86025
|
var fontAttrs = _dereq_('../../plots/font_attributes');
|
|
85873
86026
|
var dash = _dereq_('../../components/drawing/attributes').dash;
|
|
86027
|
+
var pattern = _dereq_('../../components/drawing/attributes').pattern;
|
|
85874
86028
|
|
|
85875
86029
|
var Drawing = _dereq_('../../components/drawing');
|
|
85876
86030
|
var constants = _dereq_('./constants');
|
|
@@ -86058,6 +86212,7 @@ module.exports = {
|
|
|
86058
86212
|
editType: 'style',
|
|
86059
86213
|
anim: true,
|
|
86060
86214
|
},
|
|
86215
|
+
fillpattern: pattern,
|
|
86061
86216
|
marker: extendFlat({
|
|
86062
86217
|
symbol: {
|
|
86063
86218
|
valType: 'enumerated',
|
|
@@ -86794,6 +86949,7 @@ var handleLineDefaults = _dereq_('./line_defaults');
|
|
|
86794
86949
|
var handleLineShapeDefaults = _dereq_('./line_shape_defaults');
|
|
86795
86950
|
var handleTextDefaults = _dereq_('./text_defaults');
|
|
86796
86951
|
var handleFillColorDefaults = _dereq_('./fillcolor_defaults');
|
|
86952
|
+
var coercePattern = _dereq_('../../lib').coercePattern;
|
|
86797
86953
|
|
|
86798
86954
|
module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
|
|
86799
86955
|
function coerce(attr, dflt) {
|
|
@@ -86847,6 +87003,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
|
|
|
86847
87003
|
if(traceOut.fill !== 'none') {
|
|
86848
87004
|
handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce);
|
|
86849
87005
|
if(!subTypes.hasLines(traceOut)) handleLineShapeDefaults(traceIn, traceOut, coerce);
|
|
87006
|
+
coercePattern(coerce, 'fillpattern', traceOut.fillcolor, false);
|
|
86850
87007
|
}
|
|
86851
87008
|
|
|
86852
87009
|
var lineColor = (traceOut.line || {}).color;
|
|
@@ -88229,11 +88386,11 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
|
|
|
88229
88386
|
// the points on the axes are the first two points. Otherwise
|
|
88230
88387
|
// animations get a little crazy if the number of points changes.
|
|
88231
88388
|
transition(ownFillEl3).attr('d', 'M' + pt1 + 'L' + pt0 + 'L' + fullpath.substr(1))
|
|
88232
|
-
.call(Drawing.singleFillStyle);
|
|
88389
|
+
.call(Drawing.singleFillStyle, gd);
|
|
88233
88390
|
} else {
|
|
88234
88391
|
// fill to self: just join the path to itself
|
|
88235
88392
|
transition(ownFillEl3).attr('d', fullpath + 'Z')
|
|
88236
|
-
.call(Drawing.singleFillStyle);
|
|
88393
|
+
.call(Drawing.singleFillStyle, gd);
|
|
88237
88394
|
}
|
|
88238
88395
|
}
|
|
88239
88396
|
} else if(tonext) {
|
|
@@ -88245,7 +88402,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
|
|
|
88245
88402
|
// This makes strange results if one path is *not* entirely
|
|
88246
88403
|
// inside the other, but then that is a strange usage.
|
|
88247
88404
|
transition(tonext).attr('d', fullpath + 'Z' + prevRevpath + 'Z')
|
|
88248
|
-
.call(Drawing.singleFillStyle);
|
|
88405
|
+
.call(Drawing.singleFillStyle, gd);
|
|
88249
88406
|
} else {
|
|
88250
88407
|
// tonextx/y: for now just connect endpoints with lines. This is
|
|
88251
88408
|
// the correct behavior if the endpoints are at the same value of
|
|
@@ -88253,7 +88410,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
|
|
|
88253
88410
|
// things depending on whether the new endpoint projects onto the
|
|
88254
88411
|
// existing curve or off the end of it
|
|
88255
88412
|
transition(tonext).attr('d', fullpath + 'L' + prevRevpath.substr(1) + 'Z')
|
|
88256
|
-
.call(Drawing.singleFillStyle);
|
|
88413
|
+
.call(Drawing.singleFillStyle, gd);
|
|
88257
88414
|
}
|
|
88258
88415
|
trace._polygons = trace._polygons.concat(prevPolygons);
|
|
88259
88416
|
} else {
|
|
@@ -88646,7 +88803,7 @@ function style(gd) {
|
|
|
88646
88803
|
.call(Drawing.lineGroupStyle);
|
|
88647
88804
|
|
|
88648
88805
|
s.selectAll('g.trace path.js-fill')
|
|
88649
|
-
.call(Drawing.fillGroupStyle);
|
|
88806
|
+
.call(Drawing.fillGroupStyle, gd);
|
|
88650
88807
|
|
|
88651
88808
|
Registry.getComponentMethod('errorbars', 'style')(s);
|
|
88652
88809
|
}
|
|
@@ -90618,7 +90775,7 @@ function getSortFunc(opts, d2c) {
|
|
|
90618
90775
|
'use strict';
|
|
90619
90776
|
|
|
90620
90777
|
// package version injected by `npm run preprocess`
|
|
90621
|
-
exports.version = '2.
|
|
90778
|
+
exports.version = '2.10.1';
|
|
90622
90779
|
|
|
90623
90780
|
},{}]},{},[12])(12)
|
|
90624
90781
|
});
|