plotly.js 2.9.0 → 2.11.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.
Files changed (86) hide show
  1. package/.circleci/config.yml +39 -1
  2. package/.circleci/test.sh +14 -1
  3. package/CHANGELOG.md +24 -1
  4. package/CONTRIBUTING.md +18 -1
  5. package/README.md +12 -4
  6. package/dist/README.md +28 -28
  7. package/dist/plot-schema.json +98 -0
  8. package/dist/plotly-basic.js +174 -83
  9. package/dist/plotly-basic.min.js +3 -3
  10. package/dist/plotly-cartesian.js +174 -83
  11. package/dist/plotly-cartesian.min.js +4 -4
  12. package/dist/plotly-finance.js +174 -83
  13. package/dist/plotly-finance.min.js +3 -3
  14. package/dist/plotly-geo-assets.js +2 -2
  15. package/dist/plotly-geo.js +174 -83
  16. package/dist/plotly-geo.min.js +3 -3
  17. package/dist/plotly-gl2d.js +601 -433
  18. package/dist/plotly-gl2d.min.js +10 -10
  19. package/dist/plotly-gl3d.js +223 -91
  20. package/dist/plotly-gl3d.min.js +8 -8
  21. package/dist/plotly-mapbox.js +174 -83
  22. package/dist/plotly-mapbox.min.js +2 -2
  23. package/dist/plotly-strict.js +40414 -1028
  24. package/dist/plotly-strict.min.js +11 -11
  25. package/dist/plotly-with-meta.js +881 -704
  26. package/dist/plotly.js +848 -675
  27. package/dist/plotly.min.js +4 -4
  28. package/lib/index-strict.js +5 -0
  29. package/package.json +13 -9
  30. package/src/components/drawing/index.js +28 -24
  31. package/src/components/legend/style.js +10 -6
  32. package/src/generated/regl-codegen/0919c57b995304312da30a5af7873a319bfb7b7e22ff6b4fa203ecbd5774ebfc +1462 -0
  33. package/src/generated/regl-codegen/13c0ae156483f2bcbd7ff29404f0abfd8689ff43f41791a6c7469868690a4260 +3391 -0
  34. package/src/generated/regl-codegen/19769c875db736c08a744c0a6aabe28276ed06aa24fdb7c36506a9f4c1f56f13 +3375 -0
  35. package/src/generated/regl-codegen/21cec01aa93887c70e86d7f1bc84d6837da0b1f5c1ff4cadd42ac6eb37f9f316 +2488 -0
  36. package/src/generated/regl-codegen/4df455b48c9de7d9f1de4b9481b505c09613ba7f90d2b4e360e673839566688e +662 -0
  37. package/src/generated/regl-codegen/53f2bf051e4ba66c90f343d29aa8da9e4029454c0d428f8e46e94dfddc97c8c6 +459 -0
  38. package/src/generated/regl-codegen/59568c77bcbe6343ee6109df49ceeb78c8a8a8a81872e88fb077f9a3d6dc0567 +637 -0
  39. package/src/generated/regl-codegen/6c3ff5a68d2906faf59307b58a799389f916ebdd3f7732ce75967575041988fc +2226 -0
  40. package/src/generated/regl-codegen/7c8e7f36e693904898ece5f7f8b49b23c69d98397567c3915a45647209eb7da4 +2052 -0
  41. package/src/generated/regl-codegen/8a43b073e4f3e9c0e499c8ac9c253f2aa1e3d3de2febfccc6526b52295dbf770 +664 -0
  42. package/src/generated/regl-codegen/909861c036d6f1ef40ba2dfcc33ef32489d2fe05fa7b7984d5ff315ddceb17b1 +454 -0
  43. package/src/generated/regl-codegen/c759965c8d66b2b356ae7455825df829f2ba7d4e7e903236f8c8d3bc5f45bd44 +2116 -0
  44. package/src/generated/regl-codegen/f9448a214a3e3cd439b767559aa71a4d1ccf5a8f39b8b756973e71acd33ff956 +2755 -0
  45. package/src/generated/regl-codegen/ff8495670417d5d0e4caa9942ad63b4dff0242a390ac1cb807c78ca326d6f3ce +639 -0
  46. package/src/lib/prepare_regl.js +7 -3
  47. package/src/lib/svg_text_utils.js +106 -21
  48. package/src/plot_api/plot_config.js +9 -0
  49. package/src/snapshot/tosvg.js +14 -25
  50. package/src/traces/parcoords/base_index.js +24 -0
  51. package/src/traces/parcoords/index.js +4 -22
  52. package/src/traces/parcoords/plot-strict.js +9 -0
  53. package/src/traces/parcoords/plot.js +5 -2
  54. package/src/traces/parcoords/regl_precompiled.js +12 -0
  55. package/src/traces/parcoords/strict.js +7 -0
  56. package/src/traces/scatter/attributes.js +2 -0
  57. package/src/traces/scatter/defaults.js +2 -0
  58. package/src/traces/scatter/plot.js +4 -4
  59. package/src/traces/scatter/style.js +1 -1
  60. package/src/traces/scattergl/base_index.js +29 -0
  61. package/src/traces/scattergl/index.js +3 -26
  62. package/src/traces/scattergl/plot.js +5 -2
  63. package/src/traces/scattergl/plot_strict.js +9 -0
  64. package/src/traces/scattergl/regl_precompiled.js +24 -0
  65. package/src/traces/scattergl/strict.js +7 -0
  66. package/src/traces/scatterpolargl/base_index.js +29 -0
  67. package/src/traces/scatterpolargl/index.js +3 -26
  68. package/src/traces/scatterpolargl/plot.js +4 -0
  69. package/src/traces/scatterpolargl/plot_strict.js +13 -0
  70. package/src/traces/scatterpolargl/regl_precompiled.js +24 -0
  71. package/src/traces/scatterpolargl/strict.js +7 -0
  72. package/src/traces/splom/base_index.js +36 -0
  73. package/src/traces/splom/base_plot.js +5 -2
  74. package/src/traces/splom/base_plot_strict.js +9 -0
  75. package/src/traces/splom/index.js +3 -33
  76. package/src/traces/splom/regl_precompiled.js +24 -0
  77. package/src/traces/splom/strict.js +7 -0
  78. package/src/version.js +1 -1
  79. package/stackgl_modules/index.js +49 -8
  80. package/stackgl_modules/package-lock.json +10 -10
  81. package/stackgl_modules/package.json +2 -2
  82. package/tasks/bundle.js +18 -0
  83. package/tasks/noci_test.sh +1 -1
  84. package/tasks/partial_bundle.js +26 -23
  85. package/tasks/stats.js +3 -3
  86. package/tasks/util/constants.js +13 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * plotly.js (cartesian) v2.9.0
2
+ * plotly.js (cartesian) v2.11.0
3
3
  * Copyright 2012-2022, Plotly, Inc.
4
4
  * All rights reserved.
5
5
  * Licensed under the MIT license
@@ -33660,24 +33660,42 @@ drawing.dashStyle = function(dash, lineWidth) {
33660
33660
  return dash;
33661
33661
  };
33662
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
+
33663
33683
  // Same as fillGroupStyle, except in this case the selection may be a transition
33664
- drawing.singleFillStyle = function(sel) {
33684
+ drawing.singleFillStyle = function(sel, gd) {
33665
33685
  var node = d3.select(sel.node());
33666
33686
  var data = node.data();
33667
- var fillcolor = (((data[0] || [])[0] || {}).trace || {}).fillcolor;
33668
- if(fillcolor) {
33669
- sel.call(Color.fill, fillcolor);
33670
- }
33687
+ var trace = ((data[0] || [])[0] || {}).trace || {};
33688
+ setFillStyle(sel, trace, gd);
33671
33689
  };
33672
33690
 
33673
- drawing.fillGroupStyle = function(s) {
33691
+ drawing.fillGroupStyle = function(s, gd) {
33674
33692
  s.style('stroke-width', 0)
33675
33693
  .each(function(d) {
33676
33694
  var shape = d3.select(this);
33677
33695
  // N.B. 'd' won't be a calcdata item when
33678
33696
  // fill !== 'none' on a segment-less and marker-less trace
33679
33697
  if(d[0].trace) {
33680
- shape.call(Color.fill, d[0].trace.fillcolor);
33698
+ setFillStyle(shape, d[0].trace, gd);
33681
33699
  }
33682
33700
  });
33683
33701
  };
@@ -33830,12 +33848,7 @@ drawing.gradient = function(sel, gd, gradientID, type, colorscale, prop) {
33830
33848
  sel.style(prop, getFullUrl(fullID, gd))
33831
33849
  .style(prop + '-opacity', null);
33832
33850
 
33833
- var className2query = function(s) {
33834
- return '.' + s.attr('class').replace(/\s/g, '.');
33835
- };
33836
- var k = className2query(d3.select(sel.node().parentNode)) +
33837
- '>' + className2query(sel);
33838
- fullLayout._gradientUrlQueryParts[k] = 1;
33851
+ sel.classed('gradient_filled', true);
33839
33852
  };
33840
33853
 
33841
33854
  /**
@@ -34042,11 +34055,6 @@ drawing.pattern = function(sel, calledBy, gd, patternID, shape, size, solidity,
34042
34055
  .style('fill-opacity', null);
34043
34056
 
34044
34057
  sel.classed('pattern_filled', true);
34045
- var className2query = function(s) {
34046
- return '.' + s.attr('class').replace(/\s/g, '.');
34047
- };
34048
- var k = className2query(d3.select(sel.node().parentNode)) + '>.pattern_filled';
34049
- fullLayout._patternUrlQueryParts[k] = 1;
34050
34058
  };
34051
34059
 
34052
34060
  /*
@@ -34062,9 +34070,7 @@ drawing.initGradients = function(gd) {
34062
34070
  var gradientsGroup = Lib.ensureSingle(fullLayout._defs, 'g', 'gradients');
34063
34071
  gradientsGroup.selectAll('linearGradient,radialGradient').remove();
34064
34072
 
34065
- // initialize stash of query parts filled in Drawing.gradient,
34066
- // used to fix URL strings during image exports
34067
- fullLayout._gradientUrlQueryParts = {};
34073
+ d3.select(gd).selectAll('.gradient_filled').classed('gradient_filled', false);
34068
34074
  };
34069
34075
 
34070
34076
  drawing.initPatterns = function(gd) {
@@ -34073,9 +34079,7 @@ drawing.initPatterns = function(gd) {
34073
34079
  var patternsGroup = Lib.ensureSingle(fullLayout._defs, 'g', 'patterns');
34074
34080
  patternsGroup.selectAll('pattern').remove();
34075
34081
 
34076
- // initialize stash of query parts filled in Drawing.pattern,
34077
- // used to fix URL strings during image exports
34078
- fullLayout._patternUrlQueryParts = {};
34082
+ d3.select(gd).selectAll('.pattern_filled').classed('pattern_filled', false);
34079
34083
  };
34080
34084
 
34081
34085
  drawing.getPatternAttr = function(mp, i, dflt) {
@@ -41412,12 +41416,16 @@ module.exports = function style(s, gd, legend) {
41412
41416
  var colorscale = cOpts.colorscale;
41413
41417
  var reversescale = cOpts.reversescale;
41414
41418
 
41415
- var fillGradient = function(s) {
41419
+ var fillStyle = function(s) {
41416
41420
  if(s.size()) {
41417
- var gradientID = 'legendfill-' + trace.uid;
41418
- Drawing.gradient(s, gd, gradientID,
41419
- getGradientDirection(reversescale),
41420
- colorscale, 'fill');
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
+ }
41421
41429
  }
41422
41430
  };
41423
41431
 
@@ -41446,7 +41454,7 @@ module.exports = function style(s, gd, legend) {
41446
41454
  fill.enter().append('path').classed('js-fill', true);
41447
41455
  fill.exit().remove();
41448
41456
  fill.attr('d', pathStart + 'h' + itemWidth + 'v6h-' + itemWidth + 'z')
41449
- .call(showFill ? Drawing.fillGroupStyle : fillGradient);
41457
+ .call(fillStyle);
41450
41458
 
41451
41459
  if(showLine || showGradientLine) {
41452
41460
  var lw = boundLineWidth(undefined, trace.line, MAX_LINE_WIDTH, CST_LINE_WIDTH);
@@ -56073,6 +56081,7 @@ exports.convertToTspans = function(_context, gd, _callback) {
56073
56081
  // Until we get tex integrated more fully (so it can be used along with non-tex)
56074
56082
  // allow some elements to prohibit it by attaching 'data-notex' to the original
56075
56083
  var tex = (!_context.attr('data-notex')) &&
56084
+ gd && gd._context.typesetMath &&
56076
56085
  (typeof MathJax !== 'undefined') &&
56077
56086
  str.match(FIND_TEX);
56078
56087
 
@@ -56227,70 +56236,154 @@ function cleanEscapesForTex(s) {
56227
56236
  .replace(GT_MATCH, '\\gt ');
56228
56237
  }
56229
56238
 
56239
+ var inlineMath = [['$', '$'], ['\\(', '\\)']];
56240
+
56230
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
+
56231
56254
  var originalRenderer,
56232
56255
  originalConfig,
56233
56256
  originalProcessSectionDelay,
56234
56257
  tmpDiv;
56235
56258
 
56236
- MathJax.Hub.Queue(
56237
- function() {
56259
+ var setConfig2 = function() {
56238
56260
  originalConfig = Lib.extendDeepAll({}, MathJax.Hub.config);
56239
56261
 
56240
56262
  originalProcessSectionDelay = MathJax.Hub.processSectionDelay;
56241
56263
  if(MathJax.Hub.processSectionDelay !== undefined) {
56242
- // MathJax 2.5+
56264
+ // MathJax 2.5+ but not 3+
56243
56265
  MathJax.Hub.processSectionDelay = 0;
56244
56266
  }
56245
56267
 
56246
56268
  return MathJax.Hub.Config({
56247
56269
  messageStyle: 'none',
56248
56270
  tex2jax: {
56249
- inlineMath: [['$', '$'], ['\\(', '\\)']]
56271
+ inlineMath: inlineMath
56250
56272
  },
56251
56273
  displayAlign: 'left',
56252
56274
  });
56253
- },
56254
- function() {
56255
- // Get original renderer
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() {
56256
56288
  originalRenderer = MathJax.Hub.config.menuSettings.renderer;
56257
56289
  if(originalRenderer !== 'SVG') {
56258
56290
  return MathJax.Hub.setRenderer('SVG');
56259
56291
  }
56260
- },
56261
- function() {
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() {
56262
56302
  var randomID = 'math-output-' + Lib.randstr({}, 64);
56263
56303
  tmpDiv = d3.select('body').append('div')
56264
56304
  .attr({id: randomID})
56265
- .style({visibility: 'hidden', position: 'absolute'})
56266
- .style({'font-size': _config.fontSize + 'px'})
56305
+ .style({
56306
+ visibility: 'hidden',
56307
+ position: 'absolute',
56308
+ 'font-size': _config.fontSize + 'px'
56309
+ })
56267
56310
  .text(cleanEscapesForTex(_texString));
56268
56311
 
56269
- return MathJax.Hub.Typeset(tmpDiv.node());
56270
- },
56271
- function() {
56272
- var glyphDefs = d3.select('body').select('#MathJax_SVG_glyphs');
56312
+ var tmpNode = tmpDiv.node();
56313
+
56314
+ return MathJaxVersion === 2 ?
56315
+ MathJax.Hub.Typeset(tmpNode) :
56316
+ MathJax.typeset([tmpNode]);
56317
+ };
56273
56318
 
56274
- if(tmpDiv.select('.MathJax_SVG').empty() || !tmpDiv.select('svg').node()) {
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) {
56275
56326
  Lib.log('There was an error in the tex syntax.', _texString);
56276
56327
  _callback();
56277
56328
  } else {
56278
- var svgBBox = tmpDiv.select('svg').node().getBoundingClientRect();
56279
- _callback(tmpDiv.select('.MathJax_SVG'), glyphDefs, svgBBox);
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);
56280
56337
  }
56281
56338
 
56282
56339
  tmpDiv.remove();
56340
+ };
56283
56341
 
56342
+ var resetRenderer2 = function() {
56284
56343
  if(originalRenderer !== 'SVG') {
56285
56344
  return MathJax.Hub.setRenderer(originalRenderer);
56286
56345
  }
56287
- },
56288
- function() {
56346
+ };
56347
+
56348
+ var resetRenderer3 = function() {
56349
+ if(originalRenderer !== 'svg') {
56350
+ MathJax.config.startup.output = originalRenderer;
56351
+ }
56352
+ };
56353
+
56354
+ var resetConfig2 = function() {
56289
56355
  if(originalProcessSectionDelay !== undefined) {
56290
56356
  MathJax.Hub.processSectionDelay = originalProcessSectionDelay;
56291
56357
  }
56292
56358
  return MathJax.Hub.Config(originalConfig);
56293
- });
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
+ }
56294
56387
  }
56295
56388
 
56296
56389
  var TAG_STYLES = {
@@ -62110,6 +62203,11 @@ var configAttributes = {
62110
62203
  dflt: false,
62111
62204
  },
62112
62205
 
62206
+ typesetMath: {
62207
+ valType: 'boolean',
62208
+ dflt: true,
62209
+ },
62210
+
62113
62211
  plotlyServerURL: {
62114
62212
  valType: 'string',
62115
62213
  dflt: '',
@@ -84033,7 +84131,7 @@ module.exports = function toSVG(gd, format, scale) {
84033
84131
  var toppaper = fullLayout._toppaper;
84034
84132
  var width = fullLayout.width;
84035
84133
  var height = fullLayout.height;
84036
- var i, k;
84134
+ var i;
84037
84135
 
84038
84136
  // make background color a rect in the svg, then revert after scraping
84039
84137
  // all other alterations have been dealt with by properly preparing the svg
@@ -84106,32 +84204,21 @@ module.exports = function toSVG(gd, format, scale) {
84106
84204
  }
84107
84205
  });
84108
84206
 
84109
- var queryParts = [];
84110
- if(fullLayout._gradientUrlQueryParts) {
84111
- for(k in fullLayout._gradientUrlQueryParts) queryParts.push(k);
84112
- }
84113
-
84114
- if(fullLayout._patternUrlQueryParts) {
84115
- for(k in fullLayout._patternUrlQueryParts) queryParts.push(k);
84116
- }
84117
-
84118
- if(queryParts.length) {
84119
- svg.selectAll(queryParts.join(',')).each(function() {
84120
- var pt = d3.select(this);
84207
+ svg.selectAll('.gradient_filled,.pattern_filled').each(function() {
84208
+ var pt = d3.select(this);
84121
84209
 
84122
- // similar to font family styles above,
84123
- // we must remove " after the SVG DOM has been serialized
84124
- var fill = this.style.fill;
84125
- if(fill && fill.indexOf('url(') !== -1) {
84126
- pt.style('fill', fill.replace(DOUBLEQUOTE_REGEX, DUMMY_SUB));
84127
- }
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
+ }
84128
84216
 
84129
- var stroke = this.style.stroke;
84130
- if(stroke && stroke.indexOf('url(') !== -1) {
84131
- pt.style('stroke', stroke.replace(DOUBLEQUOTE_REGEX, DUMMY_SUB));
84132
- }
84133
- });
84134
- }
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
+ });
84135
84222
 
84136
84223
  if(format === 'pdf' || format === 'eps') {
84137
84224
  // these formats make the extra line MathJax adds around symbols look super thick in some cases
@@ -97649,6 +97736,7 @@ var hovertemplateAttrs = _dereq_('../../plots/template_attributes').hovertemplat
97649
97736
  var colorScaleAttrs = _dereq_('../../components/colorscale/attributes');
97650
97737
  var fontAttrs = _dereq_('../../plots/font_attributes');
97651
97738
  var dash = _dereq_('../../components/drawing/attributes').dash;
97739
+ var pattern = _dereq_('../../components/drawing/attributes').pattern;
97652
97740
 
97653
97741
  var Drawing = _dereq_('../../components/drawing');
97654
97742
  var constants = _dereq_('./constants');
@@ -97836,6 +97924,7 @@ module.exports = {
97836
97924
  editType: 'style',
97837
97925
  anim: true,
97838
97926
  },
97927
+ fillpattern: pattern,
97839
97928
  marker: extendFlat({
97840
97929
  symbol: {
97841
97930
  valType: 'enumerated',
@@ -98572,6 +98661,7 @@ var handleLineDefaults = _dereq_('./line_defaults');
98572
98661
  var handleLineShapeDefaults = _dereq_('./line_shape_defaults');
98573
98662
  var handleTextDefaults = _dereq_('./text_defaults');
98574
98663
  var handleFillColorDefaults = _dereq_('./fillcolor_defaults');
98664
+ var coercePattern = _dereq_('../../lib').coercePattern;
98575
98665
 
98576
98666
  module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
98577
98667
  function coerce(attr, dflt) {
@@ -98625,6 +98715,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
98625
98715
  if(traceOut.fill !== 'none') {
98626
98716
  handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce);
98627
98717
  if(!subTypes.hasLines(traceOut)) handleLineShapeDefaults(traceIn, traceOut, coerce);
98718
+ coercePattern(coerce, 'fillpattern', traceOut.fillcolor, false);
98628
98719
  }
98629
98720
 
98630
98721
  var lineColor = (traceOut.line || {}).color;
@@ -100007,11 +100098,11 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
100007
100098
  // the points on the axes are the first two points. Otherwise
100008
100099
  // animations get a little crazy if the number of points changes.
100009
100100
  transition(ownFillEl3).attr('d', 'M' + pt1 + 'L' + pt0 + 'L' + fullpath.substr(1))
100010
- .call(Drawing.singleFillStyle);
100101
+ .call(Drawing.singleFillStyle, gd);
100011
100102
  } else {
100012
100103
  // fill to self: just join the path to itself
100013
100104
  transition(ownFillEl3).attr('d', fullpath + 'Z')
100014
- .call(Drawing.singleFillStyle);
100105
+ .call(Drawing.singleFillStyle, gd);
100015
100106
  }
100016
100107
  }
100017
100108
  } else if(tonext) {
@@ -100023,7 +100114,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
100023
100114
  // This makes strange results if one path is *not* entirely
100024
100115
  // inside the other, but then that is a strange usage.
100025
100116
  transition(tonext).attr('d', fullpath + 'Z' + prevRevpath + 'Z')
100026
- .call(Drawing.singleFillStyle);
100117
+ .call(Drawing.singleFillStyle, gd);
100027
100118
  } else {
100028
100119
  // tonextx/y: for now just connect endpoints with lines. This is
100029
100120
  // the correct behavior if the endpoints are at the same value of
@@ -100031,7 +100122,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
100031
100122
  // things depending on whether the new endpoint projects onto the
100032
100123
  // existing curve or off the end of it
100033
100124
  transition(tonext).attr('d', fullpath + 'L' + prevRevpath.substr(1) + 'Z')
100034
- .call(Drawing.singleFillStyle);
100125
+ .call(Drawing.singleFillStyle, gd);
100035
100126
  }
100036
100127
  trace._polygons = trace._polygons.concat(prevPolygons);
100037
100128
  } else {
@@ -100424,7 +100515,7 @@ function style(gd) {
100424
100515
  .call(Drawing.lineGroupStyle);
100425
100516
 
100426
100517
  s.selectAll('g.trace path.js-fill')
100427
- .call(Drawing.fillGroupStyle);
100518
+ .call(Drawing.fillGroupStyle, gd);
100428
100519
 
100429
100520
  Registry.getComponentMethod('errorbars', 'style')(s);
100430
100521
  }
@@ -102891,7 +102982,7 @@ function getSortFunc(opts, d2c) {
102891
102982
  'use strict';
102892
102983
 
102893
102984
  // package version injected by `npm run preprocess`
102894
- exports.version = '2.9.0';
102985
+ exports.version = '2.11.0';
102895
102986
 
102896
102987
  },{}]},{},[15])(15)
102897
102988
  });