plotly.js 2.9.0 → 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/test.sh +14 -1
- package/CHANGELOG.md +11 -1
- package/CONTRIBUTING.md +1 -1
- package/README.md +12 -4
- package/dist/README.md +26 -26
- package/dist/plot-schema.json +98 -0
- package/dist/plotly-basic.js +174 -83
- package/dist/plotly-basic.min.js +3 -3
- package/dist/plotly-cartesian.js +174 -83
- package/dist/plotly-cartesian.min.js +4 -4
- package/dist/plotly-finance.js +174 -83
- package/dist/plotly-finance.min.js +3 -3
- package/dist/plotly-geo-assets.js +2 -2
- package/dist/plotly-geo.js +174 -83
- package/dist/plotly-geo.min.js +3 -3
- package/dist/plotly-gl2d.js +174 -83
- package/dist/plotly-gl2d.min.js +6 -6
- package/dist/plotly-gl3d.js +174 -83
- package/dist/plotly-gl3d.min.js +8 -8
- package/dist/plotly-mapbox.js +174 -83
- package/dist/plotly-mapbox.min.js +2 -2
- package/dist/plotly-strict.js +174 -83
- package/dist/plotly-strict.min.js +6 -6
- package/dist/plotly-with-meta.js +178 -83
- package/dist/plotly.js +174 -83
- package/dist/plotly.min.js +2 -2
- package/package.json +6 -3
- package/src/components/drawing/index.js +28 -24
- package/src/components/legend/style.js +10 -6
- package/src/lib/svg_text_utils.js +106 -21
- package/src/plot_api/plot_config.js +9 -0
- package/src/snapshot/tosvg.js +14 -25
- 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/dist/plotly-basic.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plotly.js (basic) v2.
|
|
2
|
+
* plotly.js (basic) v2.10.0
|
|
3
3
|
* Copyright 2012-2022, Plotly, Inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the MIT license
|
|
@@ -24490,24 +24490,42 @@ drawing.dashStyle = function(dash, lineWidth) {
|
|
|
24490
24490
|
return dash;
|
|
24491
24491
|
};
|
|
24492
24492
|
|
|
24493
|
+
function setFillStyle(sel, trace, gd) {
|
|
24494
|
+
var markerPattern = trace.fillpattern;
|
|
24495
|
+
var patternShape = markerPattern && drawing.getPatternAttr(markerPattern.shape, 0, '');
|
|
24496
|
+
if(patternShape) {
|
|
24497
|
+
var patternBGColor = drawing.getPatternAttr(markerPattern.bgcolor, 0, null);
|
|
24498
|
+
var patternFGColor = drawing.getPatternAttr(markerPattern.fgcolor, 0, null);
|
|
24499
|
+
var patternFGOpacity = markerPattern.fgopacity;
|
|
24500
|
+
var patternSize = drawing.getPatternAttr(markerPattern.size, 0, 8);
|
|
24501
|
+
var patternSolidity = drawing.getPatternAttr(markerPattern.solidity, 0, 0.3);
|
|
24502
|
+
var patternID = trace.uid;
|
|
24503
|
+
drawing.pattern(sel, 'point', gd, patternID,
|
|
24504
|
+
patternShape, patternSize, patternSolidity,
|
|
24505
|
+
undefined, markerPattern.fillmode,
|
|
24506
|
+
patternBGColor, patternFGColor, patternFGOpacity
|
|
24507
|
+
);
|
|
24508
|
+
} else if(trace.fillcolor) {
|
|
24509
|
+
sel.call(Color.fill, trace.fillcolor);
|
|
24510
|
+
}
|
|
24511
|
+
}
|
|
24512
|
+
|
|
24493
24513
|
// Same as fillGroupStyle, except in this case the selection may be a transition
|
|
24494
|
-
drawing.singleFillStyle = function(sel) {
|
|
24514
|
+
drawing.singleFillStyle = function(sel, gd) {
|
|
24495
24515
|
var node = d3.select(sel.node());
|
|
24496
24516
|
var data = node.data();
|
|
24497
|
-
var
|
|
24498
|
-
|
|
24499
|
-
sel.call(Color.fill, fillcolor);
|
|
24500
|
-
}
|
|
24517
|
+
var trace = ((data[0] || [])[0] || {}).trace || {};
|
|
24518
|
+
setFillStyle(sel, trace, gd);
|
|
24501
24519
|
};
|
|
24502
24520
|
|
|
24503
|
-
drawing.fillGroupStyle = function(s) {
|
|
24521
|
+
drawing.fillGroupStyle = function(s, gd) {
|
|
24504
24522
|
s.style('stroke-width', 0)
|
|
24505
24523
|
.each(function(d) {
|
|
24506
24524
|
var shape = d3.select(this);
|
|
24507
24525
|
// N.B. 'd' won't be a calcdata item when
|
|
24508
24526
|
// fill !== 'none' on a segment-less and marker-less trace
|
|
24509
24527
|
if(d[0].trace) {
|
|
24510
|
-
shape
|
|
24528
|
+
setFillStyle(shape, d[0].trace, gd);
|
|
24511
24529
|
}
|
|
24512
24530
|
});
|
|
24513
24531
|
};
|
|
@@ -24660,12 +24678,7 @@ drawing.gradient = function(sel, gd, gradientID, type, colorscale, prop) {
|
|
|
24660
24678
|
sel.style(prop, getFullUrl(fullID, gd))
|
|
24661
24679
|
.style(prop + '-opacity', null);
|
|
24662
24680
|
|
|
24663
|
-
|
|
24664
|
-
return '.' + s.attr('class').replace(/\s/g, '.');
|
|
24665
|
-
};
|
|
24666
|
-
var k = className2query(d3.select(sel.node().parentNode)) +
|
|
24667
|
-
'>' + className2query(sel);
|
|
24668
|
-
fullLayout._gradientUrlQueryParts[k] = 1;
|
|
24681
|
+
sel.classed('gradient_filled', true);
|
|
24669
24682
|
};
|
|
24670
24683
|
|
|
24671
24684
|
/**
|
|
@@ -24872,11 +24885,6 @@ drawing.pattern = function(sel, calledBy, gd, patternID, shape, size, solidity,
|
|
|
24872
24885
|
.style('fill-opacity', null);
|
|
24873
24886
|
|
|
24874
24887
|
sel.classed('pattern_filled', true);
|
|
24875
|
-
var className2query = function(s) {
|
|
24876
|
-
return '.' + s.attr('class').replace(/\s/g, '.');
|
|
24877
|
-
};
|
|
24878
|
-
var k = className2query(d3.select(sel.node().parentNode)) + '>.pattern_filled';
|
|
24879
|
-
fullLayout._patternUrlQueryParts[k] = 1;
|
|
24880
24888
|
};
|
|
24881
24889
|
|
|
24882
24890
|
/*
|
|
@@ -24892,9 +24900,7 @@ drawing.initGradients = function(gd) {
|
|
|
24892
24900
|
var gradientsGroup = Lib.ensureSingle(fullLayout._defs, 'g', 'gradients');
|
|
24893
24901
|
gradientsGroup.selectAll('linearGradient,radialGradient').remove();
|
|
24894
24902
|
|
|
24895
|
-
|
|
24896
|
-
// used to fix URL strings during image exports
|
|
24897
|
-
fullLayout._gradientUrlQueryParts = {};
|
|
24903
|
+
d3.select(gd).selectAll('.gradient_filled').classed('gradient_filled', false);
|
|
24898
24904
|
};
|
|
24899
24905
|
|
|
24900
24906
|
drawing.initPatterns = function(gd) {
|
|
@@ -24903,9 +24909,7 @@ drawing.initPatterns = function(gd) {
|
|
|
24903
24909
|
var patternsGroup = Lib.ensureSingle(fullLayout._defs, 'g', 'patterns');
|
|
24904
24910
|
patternsGroup.selectAll('pattern').remove();
|
|
24905
24911
|
|
|
24906
|
-
|
|
24907
|
-
// used to fix URL strings during image exports
|
|
24908
|
-
fullLayout._patternUrlQueryParts = {};
|
|
24912
|
+
d3.select(gd).selectAll('.pattern_filled').classed('pattern_filled', false);
|
|
24909
24913
|
};
|
|
24910
24914
|
|
|
24911
24915
|
drawing.getPatternAttr = function(mp, i, dflt) {
|
|
@@ -32242,12 +32246,16 @@ module.exports = function style(s, gd, legend) {
|
|
|
32242
32246
|
var colorscale = cOpts.colorscale;
|
|
32243
32247
|
var reversescale = cOpts.reversescale;
|
|
32244
32248
|
|
|
32245
|
-
var
|
|
32249
|
+
var fillStyle = function(s) {
|
|
32246
32250
|
if(s.size()) {
|
|
32247
|
-
|
|
32248
|
-
|
|
32249
|
-
|
|
32250
|
-
|
|
32251
|
+
if(showFill) {
|
|
32252
|
+
Drawing.fillGroupStyle(s, gd);
|
|
32253
|
+
} else {
|
|
32254
|
+
var gradientID = 'legendfill-' + trace.uid;
|
|
32255
|
+
Drawing.gradient(s, gd, gradientID,
|
|
32256
|
+
getGradientDirection(reversescale),
|
|
32257
|
+
colorscale, 'fill');
|
|
32258
|
+
}
|
|
32251
32259
|
}
|
|
32252
32260
|
};
|
|
32253
32261
|
|
|
@@ -32276,7 +32284,7 @@ module.exports = function style(s, gd, legend) {
|
|
|
32276
32284
|
fill.enter().append('path').classed('js-fill', true);
|
|
32277
32285
|
fill.exit().remove();
|
|
32278
32286
|
fill.attr('d', pathStart + 'h' + itemWidth + 'v6h-' + itemWidth + 'z')
|
|
32279
|
-
.call(
|
|
32287
|
+
.call(fillStyle);
|
|
32280
32288
|
|
|
32281
32289
|
if(showLine || showGradientLine) {
|
|
32282
32290
|
var lw = boundLineWidth(undefined, trace.line, MAX_LINE_WIDTH, CST_LINE_WIDTH);
|
|
@@ -46903,6 +46911,7 @@ exports.convertToTspans = function(_context, gd, _callback) {
|
|
|
46903
46911
|
// Until we get tex integrated more fully (so it can be used along with non-tex)
|
|
46904
46912
|
// allow some elements to prohibit it by attaching 'data-notex' to the original
|
|
46905
46913
|
var tex = (!_context.attr('data-notex')) &&
|
|
46914
|
+
gd && gd._context.typesetMath &&
|
|
46906
46915
|
(typeof MathJax !== 'undefined') &&
|
|
46907
46916
|
str.match(FIND_TEX);
|
|
46908
46917
|
|
|
@@ -47057,70 +47066,154 @@ function cleanEscapesForTex(s) {
|
|
|
47057
47066
|
.replace(GT_MATCH, '\\gt ');
|
|
47058
47067
|
}
|
|
47059
47068
|
|
|
47069
|
+
var inlineMath = [['$', '$'], ['\\(', '\\)']];
|
|
47070
|
+
|
|
47060
47071
|
function texToSVG(_texString, _config, _callback) {
|
|
47072
|
+
var MathJaxVersion = parseInt(
|
|
47073
|
+
(MathJax.version || '').split('.')[0]
|
|
47074
|
+
);
|
|
47075
|
+
|
|
47076
|
+
if(
|
|
47077
|
+
MathJaxVersion !== 2 &&
|
|
47078
|
+
MathJaxVersion !== 3
|
|
47079
|
+
) {
|
|
47080
|
+
Lib.warn('No MathJax version:', MathJax.version);
|
|
47081
|
+
return;
|
|
47082
|
+
}
|
|
47083
|
+
|
|
47061
47084
|
var originalRenderer,
|
|
47062
47085
|
originalConfig,
|
|
47063
47086
|
originalProcessSectionDelay,
|
|
47064
47087
|
tmpDiv;
|
|
47065
47088
|
|
|
47066
|
-
|
|
47067
|
-
function() {
|
|
47089
|
+
var setConfig2 = function() {
|
|
47068
47090
|
originalConfig = Lib.extendDeepAll({}, MathJax.Hub.config);
|
|
47069
47091
|
|
|
47070
47092
|
originalProcessSectionDelay = MathJax.Hub.processSectionDelay;
|
|
47071
47093
|
if(MathJax.Hub.processSectionDelay !== undefined) {
|
|
47072
|
-
// MathJax 2.5+
|
|
47094
|
+
// MathJax 2.5+ but not 3+
|
|
47073
47095
|
MathJax.Hub.processSectionDelay = 0;
|
|
47074
47096
|
}
|
|
47075
47097
|
|
|
47076
47098
|
return MathJax.Hub.Config({
|
|
47077
47099
|
messageStyle: 'none',
|
|
47078
47100
|
tex2jax: {
|
|
47079
|
-
inlineMath:
|
|
47101
|
+
inlineMath: inlineMath
|
|
47080
47102
|
},
|
|
47081
47103
|
displayAlign: 'left',
|
|
47082
47104
|
});
|
|
47083
|
-
}
|
|
47084
|
-
|
|
47085
|
-
|
|
47105
|
+
};
|
|
47106
|
+
|
|
47107
|
+
var setConfig3 = function() {
|
|
47108
|
+
originalConfig = Lib.extendDeepAll({}, MathJax.config);
|
|
47109
|
+
|
|
47110
|
+
if(!MathJax.config.tex) {
|
|
47111
|
+
MathJax.config.tex = {};
|
|
47112
|
+
}
|
|
47113
|
+
|
|
47114
|
+
MathJax.config.tex.inlineMath = inlineMath;
|
|
47115
|
+
};
|
|
47116
|
+
|
|
47117
|
+
var setRenderer2 = function() {
|
|
47086
47118
|
originalRenderer = MathJax.Hub.config.menuSettings.renderer;
|
|
47087
47119
|
if(originalRenderer !== 'SVG') {
|
|
47088
47120
|
return MathJax.Hub.setRenderer('SVG');
|
|
47089
47121
|
}
|
|
47090
|
-
}
|
|
47091
|
-
|
|
47122
|
+
};
|
|
47123
|
+
|
|
47124
|
+
var setRenderer3 = function() {
|
|
47125
|
+
originalRenderer = MathJax.config.startup.output;
|
|
47126
|
+
if(originalRenderer !== 'svg') {
|
|
47127
|
+
MathJax.config.startup.output = 'svg';
|
|
47128
|
+
}
|
|
47129
|
+
};
|
|
47130
|
+
|
|
47131
|
+
var initiateMathJax = function() {
|
|
47092
47132
|
var randomID = 'math-output-' + Lib.randstr({}, 64);
|
|
47093
47133
|
tmpDiv = d3.select('body').append('div')
|
|
47094
47134
|
.attr({id: randomID})
|
|
47095
|
-
.style({
|
|
47096
|
-
|
|
47135
|
+
.style({
|
|
47136
|
+
visibility: 'hidden',
|
|
47137
|
+
position: 'absolute',
|
|
47138
|
+
'font-size': _config.fontSize + 'px'
|
|
47139
|
+
})
|
|
47097
47140
|
.text(cleanEscapesForTex(_texString));
|
|
47098
47141
|
|
|
47099
|
-
|
|
47100
|
-
|
|
47101
|
-
|
|
47102
|
-
|
|
47142
|
+
var tmpNode = tmpDiv.node();
|
|
47143
|
+
|
|
47144
|
+
return MathJaxVersion === 2 ?
|
|
47145
|
+
MathJax.Hub.Typeset(tmpNode) :
|
|
47146
|
+
MathJax.typeset([tmpNode]);
|
|
47147
|
+
};
|
|
47103
47148
|
|
|
47104
|
-
|
|
47149
|
+
var finalizeMathJax = function() {
|
|
47150
|
+
var sel = tmpDiv.select(
|
|
47151
|
+
MathJaxVersion === 2 ? '.MathJax_SVG' : '.MathJax'
|
|
47152
|
+
);
|
|
47153
|
+
|
|
47154
|
+
var node = !sel.empty() && tmpDiv.select('svg').node();
|
|
47155
|
+
if(!node) {
|
|
47105
47156
|
Lib.log('There was an error in the tex syntax.', _texString);
|
|
47106
47157
|
_callback();
|
|
47107
47158
|
} else {
|
|
47108
|
-
var
|
|
47109
|
-
|
|
47159
|
+
var nodeBBox = node.getBoundingClientRect();
|
|
47160
|
+
var glyphDefs;
|
|
47161
|
+
if(MathJaxVersion === 2) {
|
|
47162
|
+
glyphDefs = d3.select('body').select('#MathJax_SVG_glyphs');
|
|
47163
|
+
} else {
|
|
47164
|
+
glyphDefs = sel.select('defs');
|
|
47165
|
+
}
|
|
47166
|
+
_callback(sel, glyphDefs, nodeBBox);
|
|
47110
47167
|
}
|
|
47111
47168
|
|
|
47112
47169
|
tmpDiv.remove();
|
|
47170
|
+
};
|
|
47113
47171
|
|
|
47172
|
+
var resetRenderer2 = function() {
|
|
47114
47173
|
if(originalRenderer !== 'SVG') {
|
|
47115
47174
|
return MathJax.Hub.setRenderer(originalRenderer);
|
|
47116
47175
|
}
|
|
47117
|
-
}
|
|
47118
|
-
|
|
47176
|
+
};
|
|
47177
|
+
|
|
47178
|
+
var resetRenderer3 = function() {
|
|
47179
|
+
if(originalRenderer !== 'svg') {
|
|
47180
|
+
MathJax.config.startup.output = originalRenderer;
|
|
47181
|
+
}
|
|
47182
|
+
};
|
|
47183
|
+
|
|
47184
|
+
var resetConfig2 = function() {
|
|
47119
47185
|
if(originalProcessSectionDelay !== undefined) {
|
|
47120
47186
|
MathJax.Hub.processSectionDelay = originalProcessSectionDelay;
|
|
47121
47187
|
}
|
|
47122
47188
|
return MathJax.Hub.Config(originalConfig);
|
|
47123
|
-
}
|
|
47189
|
+
};
|
|
47190
|
+
|
|
47191
|
+
var resetConfig3 = function() {
|
|
47192
|
+
MathJax.config = originalConfig;
|
|
47193
|
+
};
|
|
47194
|
+
|
|
47195
|
+
if(MathJaxVersion === 2) {
|
|
47196
|
+
MathJax.Hub.Queue(
|
|
47197
|
+
setConfig2,
|
|
47198
|
+
setRenderer2,
|
|
47199
|
+
initiateMathJax,
|
|
47200
|
+
finalizeMathJax,
|
|
47201
|
+
resetRenderer2,
|
|
47202
|
+
resetConfig2
|
|
47203
|
+
);
|
|
47204
|
+
} else if(MathJaxVersion === 3) {
|
|
47205
|
+
setConfig3();
|
|
47206
|
+
setRenderer3();
|
|
47207
|
+
MathJax.startup.defaultReady();
|
|
47208
|
+
|
|
47209
|
+
MathJax.startup.promise.then(function() {
|
|
47210
|
+
initiateMathJax();
|
|
47211
|
+
finalizeMathJax();
|
|
47212
|
+
|
|
47213
|
+
resetRenderer3();
|
|
47214
|
+
resetConfig3();
|
|
47215
|
+
});
|
|
47216
|
+
}
|
|
47124
47217
|
}
|
|
47125
47218
|
|
|
47126
47219
|
var TAG_STYLES = {
|
|
@@ -52940,6 +53033,11 @@ var configAttributes = {
|
|
|
52940
53033
|
dflt: false,
|
|
52941
53034
|
},
|
|
52942
53035
|
|
|
53036
|
+
typesetMath: {
|
|
53037
|
+
valType: 'boolean',
|
|
53038
|
+
dflt: true,
|
|
53039
|
+
},
|
|
53040
|
+
|
|
52943
53041
|
plotlyServerURL: {
|
|
52944
53042
|
valType: 'string',
|
|
52945
53043
|
dflt: '',
|
|
@@ -73729,7 +73827,7 @@ module.exports = function toSVG(gd, format, scale) {
|
|
|
73729
73827
|
var toppaper = fullLayout._toppaper;
|
|
73730
73828
|
var width = fullLayout.width;
|
|
73731
73829
|
var height = fullLayout.height;
|
|
73732
|
-
var i
|
|
73830
|
+
var i;
|
|
73733
73831
|
|
|
73734
73832
|
// make background color a rect in the svg, then revert after scraping
|
|
73735
73833
|
// all other alterations have been dealt with by properly preparing the svg
|
|
@@ -73802,32 +73900,21 @@ module.exports = function toSVG(gd, format, scale) {
|
|
|
73802
73900
|
}
|
|
73803
73901
|
});
|
|
73804
73902
|
|
|
73805
|
-
|
|
73806
|
-
|
|
73807
|
-
for(k in fullLayout._gradientUrlQueryParts) queryParts.push(k);
|
|
73808
|
-
}
|
|
73809
|
-
|
|
73810
|
-
if(fullLayout._patternUrlQueryParts) {
|
|
73811
|
-
for(k in fullLayout._patternUrlQueryParts) queryParts.push(k);
|
|
73812
|
-
}
|
|
73813
|
-
|
|
73814
|
-
if(queryParts.length) {
|
|
73815
|
-
svg.selectAll(queryParts.join(',')).each(function() {
|
|
73816
|
-
var pt = d3.select(this);
|
|
73903
|
+
svg.selectAll('.gradient_filled,.pattern_filled').each(function() {
|
|
73904
|
+
var pt = d3.select(this);
|
|
73817
73905
|
|
|
73818
|
-
|
|
73819
|
-
|
|
73820
|
-
|
|
73821
|
-
|
|
73822
|
-
|
|
73823
|
-
|
|
73906
|
+
// similar to font family styles above,
|
|
73907
|
+
// we must remove " after the SVG DOM has been serialized
|
|
73908
|
+
var fill = this.style.fill;
|
|
73909
|
+
if(fill && fill.indexOf('url(') !== -1) {
|
|
73910
|
+
pt.style('fill', fill.replace(DOUBLEQUOTE_REGEX, DUMMY_SUB));
|
|
73911
|
+
}
|
|
73824
73912
|
|
|
73825
|
-
|
|
73826
|
-
|
|
73827
|
-
|
|
73828
|
-
|
|
73829
|
-
|
|
73830
|
-
}
|
|
73913
|
+
var stroke = this.style.stroke;
|
|
73914
|
+
if(stroke && stroke.indexOf('url(') !== -1) {
|
|
73915
|
+
pt.style('stroke', stroke.replace(DOUBLEQUOTE_REGEX, DUMMY_SUB));
|
|
73916
|
+
}
|
|
73917
|
+
});
|
|
73831
73918
|
|
|
73832
73919
|
if(format === 'pdf' || format === 'eps') {
|
|
73833
73920
|
// these formats make the extra line MathJax adds around symbols look super thick in some cases
|
|
@@ -78734,6 +78821,7 @@ var hovertemplateAttrs = _dereq_('../../plots/template_attributes').hovertemplat
|
|
|
78734
78821
|
var colorScaleAttrs = _dereq_('../../components/colorscale/attributes');
|
|
78735
78822
|
var fontAttrs = _dereq_('../../plots/font_attributes');
|
|
78736
78823
|
var dash = _dereq_('../../components/drawing/attributes').dash;
|
|
78824
|
+
var pattern = _dereq_('../../components/drawing/attributes').pattern;
|
|
78737
78825
|
|
|
78738
78826
|
var Drawing = _dereq_('../../components/drawing');
|
|
78739
78827
|
var constants = _dereq_('./constants');
|
|
@@ -78921,6 +79009,7 @@ module.exports = {
|
|
|
78921
79009
|
editType: 'style',
|
|
78922
79010
|
anim: true,
|
|
78923
79011
|
},
|
|
79012
|
+
fillpattern: pattern,
|
|
78924
79013
|
marker: extendFlat({
|
|
78925
79014
|
symbol: {
|
|
78926
79015
|
valType: 'enumerated',
|
|
@@ -79657,6 +79746,7 @@ var handleLineDefaults = _dereq_('./line_defaults');
|
|
|
79657
79746
|
var handleLineShapeDefaults = _dereq_('./line_shape_defaults');
|
|
79658
79747
|
var handleTextDefaults = _dereq_('./text_defaults');
|
|
79659
79748
|
var handleFillColorDefaults = _dereq_('./fillcolor_defaults');
|
|
79749
|
+
var coercePattern = _dereq_('../../lib').coercePattern;
|
|
79660
79750
|
|
|
79661
79751
|
module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
|
|
79662
79752
|
function coerce(attr, dflt) {
|
|
@@ -79710,6 +79800,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
|
|
|
79710
79800
|
if(traceOut.fill !== 'none') {
|
|
79711
79801
|
handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce);
|
|
79712
79802
|
if(!subTypes.hasLines(traceOut)) handleLineShapeDefaults(traceIn, traceOut, coerce);
|
|
79803
|
+
coercePattern(coerce, 'fillpattern', traceOut.fillcolor, false);
|
|
79713
79804
|
}
|
|
79714
79805
|
|
|
79715
79806
|
var lineColor = (traceOut.line || {}).color;
|
|
@@ -81092,11 +81183,11 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
|
|
|
81092
81183
|
// the points on the axes are the first two points. Otherwise
|
|
81093
81184
|
// animations get a little crazy if the number of points changes.
|
|
81094
81185
|
transition(ownFillEl3).attr('d', 'M' + pt1 + 'L' + pt0 + 'L' + fullpath.substr(1))
|
|
81095
|
-
.call(Drawing.singleFillStyle);
|
|
81186
|
+
.call(Drawing.singleFillStyle, gd);
|
|
81096
81187
|
} else {
|
|
81097
81188
|
// fill to self: just join the path to itself
|
|
81098
81189
|
transition(ownFillEl3).attr('d', fullpath + 'Z')
|
|
81099
|
-
.call(Drawing.singleFillStyle);
|
|
81190
|
+
.call(Drawing.singleFillStyle, gd);
|
|
81100
81191
|
}
|
|
81101
81192
|
}
|
|
81102
81193
|
} else if(tonext) {
|
|
@@ -81108,7 +81199,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
|
|
|
81108
81199
|
// This makes strange results if one path is *not* entirely
|
|
81109
81200
|
// inside the other, but then that is a strange usage.
|
|
81110
81201
|
transition(tonext).attr('d', fullpath + 'Z' + prevRevpath + 'Z')
|
|
81111
|
-
.call(Drawing.singleFillStyle);
|
|
81202
|
+
.call(Drawing.singleFillStyle, gd);
|
|
81112
81203
|
} else {
|
|
81113
81204
|
// tonextx/y: for now just connect endpoints with lines. This is
|
|
81114
81205
|
// the correct behavior if the endpoints are at the same value of
|
|
@@ -81116,7 +81207,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
|
|
|
81116
81207
|
// things depending on whether the new endpoint projects onto the
|
|
81117
81208
|
// existing curve or off the end of it
|
|
81118
81209
|
transition(tonext).attr('d', fullpath + 'L' + prevRevpath.substr(1) + 'Z')
|
|
81119
|
-
.call(Drawing.singleFillStyle);
|
|
81210
|
+
.call(Drawing.singleFillStyle, gd);
|
|
81120
81211
|
}
|
|
81121
81212
|
trace._polygons = trace._polygons.concat(prevPolygons);
|
|
81122
81213
|
} else {
|
|
@@ -81509,7 +81600,7 @@ function style(gd) {
|
|
|
81509
81600
|
.call(Drawing.lineGroupStyle);
|
|
81510
81601
|
|
|
81511
81602
|
s.selectAll('g.trace path.js-fill')
|
|
81512
|
-
.call(Drawing.fillGroupStyle);
|
|
81603
|
+
.call(Drawing.fillGroupStyle, gd);
|
|
81513
81604
|
|
|
81514
81605
|
Registry.getComponentMethod('errorbars', 'style')(s);
|
|
81515
81606
|
}
|
|
@@ -82696,7 +82787,7 @@ function getSortFunc(opts, d2c) {
|
|
|
82696
82787
|
'use strict';
|
|
82697
82788
|
|
|
82698
82789
|
// package version injected by `npm run preprocess`
|
|
82699
|
-
exports.version = '2.
|
|
82790
|
+
exports.version = '2.10.0';
|
|
82700
82791
|
|
|
82701
82792
|
},{}]},{},[8])(8)
|
|
82702
82793
|
});
|