plotly.js 2.6.3 → 2.8.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.
Files changed (57) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +3 -3
  3. package/dist/README.md +26 -26
  4. package/dist/plot-schema.json +1015 -407
  5. package/dist/plotly-basic.js +533 -197
  6. package/dist/plotly-basic.min.js +4 -4
  7. package/dist/plotly-cartesian.js +996 -343
  8. package/dist/plotly-cartesian.min.js +3 -3
  9. package/dist/plotly-finance.js +583 -199
  10. package/dist/plotly-finance.min.js +4 -4
  11. package/dist/plotly-geo-assets.js +2 -2
  12. package/dist/plotly-geo.js +529 -195
  13. package/dist/plotly-geo.min.js +4 -4
  14. package/dist/plotly-gl2d.js +545 -196
  15. package/dist/plotly-gl2d.min.js +2 -2
  16. package/dist/plotly-gl3d.js +529 -195
  17. package/dist/plotly-gl3d.min.js +8 -8
  18. package/dist/plotly-mapbox.js +535 -198
  19. package/dist/plotly-mapbox.min.js +2 -2
  20. package/dist/plotly-strict.js +1220 -564
  21. package/dist/plotly-strict.min.js +3 -3
  22. package/dist/plotly-with-meta.js +1312 -626
  23. package/dist/plotly.js +1274 -618
  24. package/dist/plotly.min.js +10 -10
  25. package/package.json +9 -9
  26. package/src/components/colorbar/attributes.js +29 -20
  27. package/src/components/colorbar/defaults.js +30 -8
  28. package/src/components/colorbar/draw.js +374 -128
  29. package/src/components/drawing/index.js +6 -3
  30. package/src/components/fx/hover.js +5 -2
  31. package/src/components/fx/hoverlabel_defaults.js +4 -2
  32. package/src/components/fx/layout_attributes.js +14 -4
  33. package/src/components/fx/layout_defaults.js +2 -0
  34. package/src/components/legend/attributes.js +7 -0
  35. package/src/components/legend/defaults.js +24 -7
  36. package/src/components/titles/index.js +8 -2
  37. package/src/plot_api/plot_api.js +38 -9
  38. package/src/plots/font_attributes.js +3 -0
  39. package/src/plots/layout_attributes.js +1 -0
  40. package/src/plots/mapbox/mapbox.js +6 -3
  41. package/src/plots/plots.js +7 -15
  42. package/src/traces/bar/plot.js +1 -1
  43. package/src/traces/contour/attributes.js +12 -0
  44. package/src/traces/contour/defaults.js +9 -1
  45. package/src/traces/heatmap/attributes.js +16 -0
  46. package/src/traces/heatmap/defaults.js +2 -0
  47. package/src/traces/heatmap/label_defaults.js +13 -0
  48. package/src/traces/heatmap/plot.js +205 -4
  49. package/src/traces/histogram/attributes.js +40 -0
  50. package/src/traces/histogram/defaults.js +11 -0
  51. package/src/traces/histogram2d/attributes.js +8 -0
  52. package/src/traces/histogram2d/defaults.js +4 -0
  53. package/src/traces/histogram2dcontour/attributes.js +3 -1
  54. package/src/traces/histogram2dcontour/defaults.js +8 -1
  55. package/src/traces/pie/calc.js +3 -1
  56. package/src/version.js +1 -1
  57. package/tasks/test_mock.js +1 -0
@@ -1,5 +1,5 @@
1
1
  /**
2
- * plotly.js (cartesian) v2.6.3
2
+ * plotly.js (cartesian) v2.8.1
3
3
  * Copyright 2012-2021, Plotly, Inc.
4
4
  * All rights reserved.
5
5
  * Licensed under the MIT license
@@ -77,7 +77,7 @@ for(var selector in rules) {
77
77
 
78
78
  module.exports = _dereq_('../src/transforms/aggregate');
79
79
 
80
- },{"../src/transforms/aggregate":546}],3:[function(_dereq_,module,exports){
80
+ },{"../src/transforms/aggregate":547}],3:[function(_dereq_,module,exports){
81
81
  'use strict';
82
82
 
83
83
  module.exports = _dereq_('../src/traces/bar');
@@ -107,12 +107,12 @@ module.exports = _dereq_('../src/core');
107
107
 
108
108
  module.exports = _dereq_('../src/transforms/filter');
109
109
 
110
- },{"../src/transforms/filter":547}],9:[function(_dereq_,module,exports){
110
+ },{"../src/transforms/filter":548}],9:[function(_dereq_,module,exports){
111
111
  'use strict';
112
112
 
113
113
  module.exports = _dereq_('../src/transforms/groupby');
114
114
 
115
- },{"../src/transforms/groupby":548}],10:[function(_dereq_,module,exports){
115
+ },{"../src/transforms/groupby":549}],10:[function(_dereq_,module,exports){
116
116
  'use strict';
117
117
 
118
118
  module.exports = _dereq_('../src/traces/heatmap');
@@ -122,22 +122,22 @@ module.exports = _dereq_('../src/traces/heatmap');
122
122
 
123
123
  module.exports = _dereq_('../src/traces/histogram');
124
124
 
125
- },{"../src/traces/histogram":465}],12:[function(_dereq_,module,exports){
125
+ },{"../src/traces/histogram":466}],12:[function(_dereq_,module,exports){
126
126
  'use strict';
127
127
 
128
128
  module.exports = _dereq_('../src/traces/histogram2d');
129
129
 
130
- },{"../src/traces/histogram2d":471}],13:[function(_dereq_,module,exports){
130
+ },{"../src/traces/histogram2d":472}],13:[function(_dereq_,module,exports){
131
131
  'use strict';
132
132
 
133
133
  module.exports = _dereq_('../src/traces/histogram2dcontour');
134
134
 
135
- },{"../src/traces/histogram2dcontour":475}],14:[function(_dereq_,module,exports){
135
+ },{"../src/traces/histogram2dcontour":476}],14:[function(_dereq_,module,exports){
136
136
  'use strict';
137
137
 
138
138
  module.exports = _dereq_('../src/traces/image');
139
139
 
140
- },{"../src/traces/image":483}],15:[function(_dereq_,module,exports){
140
+ },{"../src/traces/image":484}],15:[function(_dereq_,module,exports){
141
141
  'use strict';
142
142
 
143
143
  var Plotly = _dereq_('./core');
@@ -173,22 +173,22 @@ module.exports = Plotly;
173
173
 
174
174
  module.exports = _dereq_('../src/traces/pie');
175
175
 
176
- },{"../src/traces/pie":492}],17:[function(_dereq_,module,exports){
176
+ },{"../src/traces/pie":493}],17:[function(_dereq_,module,exports){
177
177
  'use strict';
178
178
 
179
179
  module.exports = _dereq_('../src/traces/scatterternary');
180
180
 
181
- },{"../src/traces/scatterternary":533}],18:[function(_dereq_,module,exports){
181
+ },{"../src/traces/scatterternary":534}],18:[function(_dereq_,module,exports){
182
182
  'use strict';
183
183
 
184
184
  module.exports = _dereq_('../src/transforms/sort');
185
185
 
186
- },{"../src/transforms/sort":550}],19:[function(_dereq_,module,exports){
186
+ },{"../src/transforms/sort":551}],19:[function(_dereq_,module,exports){
187
187
  'use strict';
188
188
 
189
189
  module.exports = _dereq_('../src/traces/violin');
190
190
 
191
- },{"../src/traces/violin":541}],20:[function(_dereq_,module,exports){
191
+ },{"../src/traces/violin":542}],20:[function(_dereq_,module,exports){
192
192
  !function() {
193
193
  var d3 = {
194
194
  version: "3.8.0"
@@ -16525,15 +16525,18 @@ var SIG_EXIF = str2arr('Exif\0\0');
16525
16525
  module.exports = function (data) {
16526
16526
  if (data.length < 2) return;
16527
16527
 
16528
- // first marker of the file MUST be 0xFFD8
16529
- if (data[0] !== 0xFF || data[1] !== 0xD8) return;
16528
+ // first marker of the file MUST be 0xFFD8,
16529
+ // following by either 0xFFE0, 0xFFE2 or 0xFFE3
16530
+ if (data[0] !== 0xFF || data[1] !== 0xD8 || data[2] !== 0xFF) return;
16530
16531
 
16531
16532
  var offset = 2;
16532
16533
 
16533
16534
  for (;;) {
16534
- if (data.length - offset < 2) return;
16535
- // not a JPEG marker
16536
- if (data[offset++] !== 0xFF) return;
16535
+ // skip until we see 0xFF, see https://github.com/nodeca/probe-image-size/issues/68
16536
+ for (;;) {
16537
+ if (data.length - offset < 2) return;
16538
+ if (data[offset++] === 0xFF) break;
16539
+ }
16537
16540
 
16538
16541
  var code = data[offset++];
16539
16542
  var length;
@@ -30723,13 +30726,11 @@ var overrideAll = _dereq_('../../plot_api/edit_types').overrideAll;
30723
30726
 
30724
30727
 
30725
30728
  module.exports = overrideAll({
30726
- // TODO: only right is supported currently
30727
- // orient: {
30728
- // valType: 'enumerated',
30729
- // values: ['left', 'right', 'top', 'bottom'],
30730
- // dflt: 'right',
30731
- //
30732
- // },
30729
+ orientation: {
30730
+ valType: 'enumerated',
30731
+ values: ['h', 'v'],
30732
+ dflt: 'v',
30733
+ },
30733
30734
  thicknessmode: {
30734
30735
  valType: 'enumerated',
30735
30736
  values: ['fraction', 'pixels'],
@@ -30752,14 +30753,12 @@ module.exports = overrideAll({
30752
30753
  },
30753
30754
  x: {
30754
30755
  valType: 'number',
30755
- dflt: 1.02,
30756
30756
  min: -2,
30757
30757
  max: 3,
30758
30758
  },
30759
30759
  xanchor: {
30760
30760
  valType: 'enumerated',
30761
30761
  values: ['left', 'center', 'right'],
30762
- dflt: 'left',
30763
30762
  },
30764
30763
  xpad: {
30765
30764
  valType: 'number',
@@ -30768,14 +30767,12 @@ module.exports = overrideAll({
30768
30767
  },
30769
30768
  y: {
30770
30769
  valType: 'number',
30771
- dflt: 0.5,
30772
30770
  min: -2,
30773
30771
  max: 3,
30774
30772
  },
30775
30773
  yanchor: {
30776
30774
  valType: 'enumerated',
30777
30775
  values: ['top', 'middle', 'bottom'],
30778
- dflt: 'middle',
30779
30776
  },
30780
30777
  ypad: {
30781
30778
  valType: 'number',
@@ -30807,15 +30804,21 @@ module.exports = overrideAll({
30807
30804
  ticks: extendFlat({}, axesAttrs.ticks, {dflt: ''}),
30808
30805
  ticklabeloverflow: extendFlat({}, axesAttrs.ticklabeloverflow, {
30809
30806
  }),
30807
+
30808
+ // ticklabelposition: not used directly, as values depend on orientation
30809
+ // left/right options are for x axes, and top/bottom options are for y axes
30810
30810
  ticklabelposition: {
30811
30811
  valType: 'enumerated',
30812
30812
  values: [
30813
30813
  'outside', 'inside',
30814
30814
  'outside top', 'inside top',
30815
+ 'outside left', 'inside left',
30816
+ 'outside right', 'inside right',
30815
30817
  'outside bottom', 'inside bottom'
30816
30818
  ],
30817
30819
  dflt: 'outside',
30818
30820
  },
30821
+
30819
30822
  ticklen: axesAttrs.ticklen,
30820
30823
  tickwidth: axesAttrs.tickwidth,
30821
30824
  tickcolor: axesAttrs.tickcolor,
@@ -30842,7 +30845,6 @@ module.exports = overrideAll({
30842
30845
  side: {
30843
30846
  valType: 'enumerated',
30844
30847
  values: ['right', 'top', 'bottom'],
30845
- dflt: 'top',
30846
30848
  }
30847
30849
  },
30848
30850
 
@@ -30901,23 +30903,30 @@ module.exports = function colorbarDefaults(containerIn, containerOut, layout) {
30901
30903
  return Lib.coerce(colorbarIn, colorbarOut, attributes, attr, dflt);
30902
30904
  }
30903
30905
 
30906
+ var margin = layout.margin || {t: 0, b: 0, l: 0, r: 0};
30907
+ var w = layout.width - margin.l - margin.r;
30908
+ var h = layout.height - margin.t - margin.b;
30909
+
30910
+ var orientation = coerce('orientation');
30911
+ var isVertical = orientation === 'v';
30912
+
30904
30913
  var thicknessmode = coerce('thicknessmode');
30905
30914
  coerce('thickness', (thicknessmode === 'fraction') ?
30906
- 30 / (layout.width - layout.margin.l - layout.margin.r) :
30915
+ 30 / (isVertical ? w : h) :
30907
30916
  30
30908
30917
  );
30909
30918
 
30910
30919
  var lenmode = coerce('lenmode');
30911
30920
  coerce('len', (lenmode === 'fraction') ?
30912
30921
  1 :
30913
- layout.height - layout.margin.t - layout.margin.b
30922
+ isVertical ? h : w
30914
30923
  );
30915
30924
 
30916
- coerce('x');
30917
- coerce('xanchor');
30925
+ coerce('x', isVertical ? 1.02 : 0.5);
30926
+ coerce('xanchor', isVertical ? 'left' : 'center');
30918
30927
  coerce('xpad');
30919
- coerce('y');
30920
- coerce('yanchor');
30928
+ coerce('y', isVertical ? 0.5 : 1.02);
30929
+ coerce('yanchor', isVertical ? 'middle' : 'bottom');
30921
30930
  coerce('ypad');
30922
30931
  Lib.noneOrAll(colorbarIn, colorbarOut, ['x', 'y']);
30923
30932
 
@@ -30927,7 +30936,22 @@ module.exports = function colorbarDefaults(containerIn, containerOut, layout) {
30927
30936
  coerce('borderwidth');
30928
30937
  coerce('bgcolor');
30929
30938
 
30930
- var ticklabelposition = coerce('ticklabelposition');
30939
+ var ticklabelposition = Lib.coerce(colorbarIn, colorbarOut, {
30940
+ ticklabelposition: {
30941
+ valType: 'enumerated',
30942
+ dflt: 'outside',
30943
+ values: isVertical ? [
30944
+ 'outside', 'inside',
30945
+ 'outside top', 'inside top',
30946
+ 'outside bottom', 'inside bottom'
30947
+ ] : [
30948
+ 'outside', 'inside',
30949
+ 'outside left', 'inside left',
30950
+ 'outside right', 'inside right'
30951
+ ]
30952
+ }
30953
+ }, 'ticklabelposition');
30954
+
30931
30955
  coerce('ticklabeloverflow', ticklabelposition.indexOf('inside') !== -1 ? 'hide past domain' : 'hide past div');
30932
30956
 
30933
30957
  handleTickValueDefaults(colorbarIn, colorbarOut, coerce, 'linear');
@@ -30949,7 +30973,7 @@ module.exports = function colorbarDefaults(containerIn, containerOut, layout) {
30949
30973
  size: Lib.bigFont(tickFont.size)
30950
30974
  });
30951
30975
  Lib.coerceFont(coerce, 'title.font', dfltTitleFont);
30952
- coerce('title.side');
30976
+ coerce('title.side', isVertical ? 'top' : 'right');
30953
30977
  };
30954
30978
 
30955
30979
  },{"../../lib":287,"../../plot_api/plot_template":323,"../../plots/cartesian/prefix_suffix_defaults":353,"../../plots/cartesian/tick_label_defaults":358,"../../plots/cartesian/tick_mark_defaults":359,"../../plots/cartesian/tick_value_defaults":360,"./attributes":158}],161:[function(_dereq_,module,exports){
@@ -31122,18 +31146,20 @@ function makeColorBarData(gd) {
31122
31146
  }
31123
31147
 
31124
31148
  function drawColorBar(g, opts, gd) {
31149
+ var isVertical = opts.orientation === 'v';
31125
31150
  var len = opts.len;
31126
31151
  var lenmode = opts.lenmode;
31127
31152
  var thickness = opts.thickness;
31128
31153
  var thicknessmode = opts.thicknessmode;
31129
31154
  var outlinewidth = opts.outlinewidth;
31130
31155
  var borderwidth = opts.borderwidth;
31156
+ var bgcolor = opts.bgcolor;
31131
31157
  var xanchor = opts.xanchor;
31132
31158
  var yanchor = opts.yanchor;
31133
31159
  var xpad = opts.xpad;
31134
31160
  var ypad = opts.ypad;
31135
31161
  var optsX = opts.x;
31136
- var optsY = opts.y;
31162
+ var optsY = isVertical ? opts.y : 1 - opts.y;
31137
31163
 
31138
31164
  var fullLayout = gd._fullLayout;
31139
31165
  var gs = fullLayout._size;
@@ -31164,23 +31190,35 @@ function drawColorBar(g, opts, gd) {
31164
31190
  // when the colorbar itself is pushing the margins.
31165
31191
  // but then the fractional size is calculated based on the
31166
31192
  // actual graph size, so that the axes will size correctly.
31167
- var thickPx = Math.round(thickness * (thicknessmode === 'fraction' ? gs.w : 1));
31168
- var thickFrac = thickPx / gs.w;
31169
- var lenPx = Math.round(len * (lenmode === 'fraction' ? gs.h : 1));
31170
- var lenFrac = lenPx / gs.h;
31171
- var xpadFrac = xpad / gs.w;
31172
- var yExtraPx = (borderwidth + outlinewidth) / 2;
31173
- var ypadFrac = ypad / gs.h;
31193
+ var thickPx = Math.round(thickness * (thicknessmode === 'fraction' ? (isVertical ? gs.w : gs.h) : 1));
31194
+ var thickFrac = thickPx / (isVertical ? gs.w : gs.h);
31195
+ var lenPx = Math.round(len * (lenmode === 'fraction' ? (isVertical ? gs.h : gs.w) : 1));
31196
+ var lenFrac = lenPx / (isVertical ? gs.h : gs.w);
31174
31197
 
31175
31198
  // x positioning: do it initially just for left anchor,
31176
31199
  // then fix at the end (since we don't know the width yet)
31177
- var uPx = Math.round(optsX * gs.w + xpad);
31178
- // for dragging... this is getting a little muddled...
31179
- var uFrac = optsX - thickFrac * ({center: 0.5, right: 1}[xanchor] || 0);
31200
+ var uPx = Math.round(isVertical ?
31201
+ optsX * gs.w + xpad :
31202
+ optsY * gs.h + ypad
31203
+ );
31180
31204
 
31181
- // y positioning we can do correctly from the start
31182
- var vFrac = optsY + lenFrac * (({top: -0.5, bottom: 0.5}[yanchor] || 0) - 0.5);
31183
- var vPx = Math.round(gs.h * (1 - vFrac));
31205
+ var xRatio = {center: 0.5, right: 1}[xanchor] || 0;
31206
+ var yRatio = {top: 1, middle: 0.5}[yanchor] || 0;
31207
+
31208
+ // for dragging... this is getting a little muddled...
31209
+ var uFrac = isVertical ?
31210
+ optsX - xRatio * thickFrac :
31211
+ optsY - yRatio * thickFrac;
31212
+
31213
+ // y/x positioning (for v/h) we can do correctly from the start
31214
+ var vFrac = isVertical ?
31215
+ optsY - yRatio * lenFrac :
31216
+ optsX - xRatio * lenFrac;
31217
+
31218
+ var vPx = Math.round(isVertical ?
31219
+ gs.h * (1 - vFrac) :
31220
+ gs.w * vFrac
31221
+ );
31184
31222
 
31185
31223
  // stash a few things for makeEditable
31186
31224
  opts._lenFrac = lenFrac;
@@ -31193,12 +31231,23 @@ function drawColorBar(g, opts, gd) {
31193
31231
 
31194
31232
  // position can't go in through supplyDefaults
31195
31233
  // because that restricts it to [0,1]
31196
- ax.position = optsX + xpadFrac + thickFrac;
31234
+ ax.position = thickFrac + (isVertical ?
31235
+ optsX + xpad / gs.w :
31236
+ optsY + ypad / gs.h
31237
+ );
31238
+
31239
+ var topOrBottom = ['top', 'bottom'].indexOf(titleSide) !== -1;
31240
+
31241
+ if(isVertical && topOrBottom) {
31242
+ ax.title.side = titleSide;
31243
+ ax.titlex = optsX + xpad / gs.w;
31244
+ ax.titley = vFrac + (title.side === 'top' ? lenFrac - ypad / gs.h : ypad / gs.h);
31245
+ }
31197
31246
 
31198
- if(['top', 'bottom'].indexOf(titleSide) !== -1) {
31247
+ if(!isVertical && !topOrBottom) {
31199
31248
  ax.title.side = titleSide;
31200
- ax.titlex = optsX + xpadFrac;
31201
- ax.titley = vFrac + (title.side === 'top' ? lenFrac - ypadFrac : ypadFrac);
31249
+ ax.titley = optsY + ypad / gs.h;
31250
+ ax.titlex = vFrac + xpad / gs.w; // right side
31202
31251
  }
31203
31252
 
31204
31253
  if(line.color && opts.tickmode === 'auto') {
@@ -31223,9 +31272,12 @@ function drawColorBar(g, opts, gd) {
31223
31272
 
31224
31273
  // set domain after init, because we may want to
31225
31274
  // allow it outside [0,1]
31226
- ax.domain = [
31227
- vFrac + ypadFrac,
31228
- vFrac + lenFrac - ypadFrac
31275
+ ax.domain = isVertical ? [
31276
+ vFrac + ypad / gs.h,
31277
+ vFrac + lenFrac - ypad / gs.h
31278
+ ] : [
31279
+ vFrac + xpad / gs.w,
31280
+ vFrac + lenFrac - xpad / gs.w
31229
31281
  ];
31230
31282
 
31231
31283
  ax.setScale();
@@ -31235,9 +31287,13 @@ function drawColorBar(g, opts, gd) {
31235
31287
  var titleCont = g.select('.' + cn.cbtitleunshift)
31236
31288
  .attr('transform', strTranslate(-Math.round(gs.l), -Math.round(gs.t)));
31237
31289
 
31290
+ var ticklabelposition = ax.ticklabelposition;
31291
+ var titleFontSize = ax.title.font.size;
31292
+
31238
31293
  var axLayer = g.select('.' + cn.cbaxis);
31239
31294
  var titleEl;
31240
31295
  var titleHeight = 0;
31296
+ var titleWidth = 0;
31241
31297
 
31242
31298
  function drawTitle(titleClass, titleOpts) {
31243
31299
  var dfltTitleOpts = {
@@ -31262,54 +31318,98 @@ function drawColorBar(g, opts, gd) {
31262
31318
  }
31263
31319
 
31264
31320
  function drawDummyTitle() {
31265
- if(['top', 'bottom'].indexOf(titleSide) !== -1) {
31266
- // draw the title so we know how much room it needs
31267
- // when we squish the axis. This one only applies to
31268
- // top or bottom titles, not right side.
31269
- var x = gs.l + (optsX + xpadFrac) * gs.w;
31270
- var fontSize = ax.title.font.size;
31271
- var y;
31321
+ // draw the title so we know how much room it needs
31322
+ // when we squish the axis.
31323
+ // On vertical colorbars this only applies to top or bottom titles, not right side.
31324
+ // On horizontal colorbars this only applies to right, etc.
31325
+
31326
+ if(
31327
+ (isVertical && topOrBottom) ||
31328
+ (!isVertical && !topOrBottom)
31329
+ ) {
31330
+ var x, y;
31272
31331
 
31273
31332
  if(titleSide === 'top') {
31274
- y = (1 - (vFrac + lenFrac - ypadFrac)) * gs.h +
31275
- gs.t + 3 + fontSize * 0.75;
31276
- } else {
31277
- y = (1 - (vFrac + ypadFrac)) * gs.h +
31278
- gs.t - 3 - fontSize * 0.25;
31333
+ x = xpad + gs.l + gs.w * optsX;
31334
+ y = ypad + gs.t + gs.h * (1 - vFrac - lenFrac) + 3 + titleFontSize * 0.75;
31335
+ }
31336
+
31337
+ if(titleSide === 'bottom') {
31338
+ x = xpad + gs.l + gs.w * optsX;
31339
+ y = ypad + gs.t + gs.h * (1 - vFrac) - 3 - titleFontSize * 0.25;
31340
+ }
31341
+
31342
+ if(titleSide === 'right') {
31343
+ y = ypad + gs.t + gs.h * optsY + 3 + titleFontSize * 0.75;
31344
+ x = xpad + gs.l + gs.w * vFrac;
31279
31345
  }
31346
+
31280
31347
  drawTitle(ax._id + 'title', {
31281
- attributes: {x: x, y: y, 'text-anchor': 'start'}
31348
+ attributes: {x: x, y: y, 'text-anchor': isVertical ? 'start' : 'middle'}
31282
31349
  });
31283
31350
  }
31284
31351
  }
31285
31352
 
31286
31353
  function drawCbTitle() {
31287
- if(['top', 'bottom'].indexOf(titleSide) === -1) {
31288
- var fontSize = ax.title.font.size;
31289
- var y = ax._offset + ax._length / 2;
31290
- var x = gs.l + (ax.position || 0) * gs.w + ((ax.side === 'right') ?
31291
- 10 + fontSize * ((ax.showticklabels ? 1 : 0.5)) :
31292
- -10 - fontSize * ((ax.showticklabels ? 0.5 : 0)));
31293
-
31294
- // the 'h' + is a hack to get around the fact that
31295
- // convertToTspans rotates any 'y...' class by 90 degrees.
31296
- // TODO: find a better way to control this.
31297
- drawTitle('h' + ax._id + 'title', {
31354
+ if(
31355
+ (isVertical && !topOrBottom) ||
31356
+ (!isVertical && topOrBottom)
31357
+ ) {
31358
+ var pos = ax.position || 0;
31359
+ var mid = ax._offset + ax._length / 2;
31360
+ var x, y;
31361
+
31362
+ if(titleSide === 'right') {
31363
+ y = mid;
31364
+ x = gs.l + gs.w * pos + 10 + titleFontSize * (
31365
+ ax.showticklabels ? 1 : 0.5
31366
+ );
31367
+ } else {
31368
+ x = mid;
31369
+
31370
+ if(titleSide === 'bottom') {
31371
+ y = gs.t + gs.h * pos + 10 + (
31372
+ ticklabelposition.indexOf('inside') === -1 ?
31373
+ ax.tickfont.size :
31374
+ 0
31375
+ ) + (
31376
+ ax.ticks !== 'intside' ?
31377
+ opts.ticklen || 0 :
31378
+ 0
31379
+ );
31380
+ }
31381
+
31382
+ if(titleSide === 'top') {
31383
+ var nlines = title.text.split('<br>').length;
31384
+ y = gs.t + gs.h * pos + 10 - thickPx - LINE_SPACING * titleFontSize * nlines;
31385
+ }
31386
+ }
31387
+
31388
+ drawTitle((isVertical ?
31389
+ // the 'h' + is a hack to get around the fact that
31390
+ // convertToTspans rotates any 'y...' class by 90 degrees.
31391
+ // TODO: find a better way to control this.
31392
+ 'h' :
31393
+ 'v'
31394
+ ) + ax._id + 'title', {
31298
31395
  avoid: {
31299
31396
  selection: d3.select(gd).selectAll('g.' + ax._id + 'tick'),
31300
31397
  side: titleSide,
31301
- offsetLeft: gs.l,
31302
- offsetTop: 0,
31303
- maxShift: fullLayout.width
31398
+ offsetTop: isVertical ? 0 : gs.t,
31399
+ offsetLeft: isVertical ? gs.l : 0,
31400
+ maxShift: isVertical ? fullLayout.width : fullLayout.height
31304
31401
  },
31305
31402
  attributes: {x: x, y: y, 'text-anchor': 'middle'},
31306
- transform: {rotate: '-90', offset: 0}
31403
+ transform: {rotate: isVertical ? -90 : 0, offset: 0}
31307
31404
  });
31308
31405
  }
31309
31406
  }
31310
31407
 
31311
31408
  function drawAxis() {
31312
- if(['top', 'bottom'].indexOf(titleSide) !== -1) {
31409
+ if(
31410
+ (!isVertical && !topOrBottom) ||
31411
+ (isVertical && topOrBottom)
31412
+ ) {
31313
31413
  // squish the axis top to make room for the title
31314
31414
  var titleGroup = g.select('.' + cn.cbtitle);
31315
31415
  var titleText = titleGroup.select('text');
@@ -31321,39 +31421,63 @@ function drawColorBar(g, opts, gd) {
31321
31421
  if(titleText.node()) {
31322
31422
  lineSize = parseInt(titleText.node().style.fontSize, 10) * LINE_SPACING;
31323
31423
  }
31424
+
31425
+ var bb;
31324
31426
  if(mathJaxNode) {
31325
- titleHeight = Drawing.bBox(mathJaxNode).height;
31427
+ bb = Drawing.bBox(mathJaxNode);
31428
+ titleWidth = bb.width;
31429
+ titleHeight = bb.height;
31326
31430
  if(titleHeight > lineSize) {
31327
31431
  // not entirely sure how mathjax is doing
31328
31432
  // vertical alignment, but this seems to work.
31329
31433
  titleTrans[1] -= (titleHeight - lineSize) / 2;
31330
31434
  }
31331
31435
  } else if(titleText.node() && !titleText.classed(cn.jsPlaceholder)) {
31332
- titleHeight = Drawing.bBox(titleText.node()).height;
31436
+ bb = Drawing.bBox(titleText.node());
31437
+ titleWidth = bb.width;
31438
+ titleHeight = bb.height;
31333
31439
  }
31334
- if(titleHeight) {
31335
- // buffer btwn colorbar and title
31336
- // TODO: configurable
31337
- titleHeight += 5;
31338
31440
 
31339
- if(titleSide === 'top') {
31340
- ax.domain[1] -= titleHeight / gs.h;
31341
- titleTrans[1] *= -1;
31342
- } else {
31343
- ax.domain[0] += titleHeight / gs.h;
31344
- var nlines = svgTextUtils.lineCount(titleText);
31345
- titleTrans[1] += (1 - nlines) * lineSize;
31441
+ if(isVertical) {
31442
+ if(titleHeight) {
31443
+ // buffer btwn colorbar and title
31444
+ // TODO: configurable
31445
+ titleHeight += 5;
31446
+
31447
+ if(titleSide === 'top') {
31448
+ ax.domain[1] -= titleHeight / gs.h;
31449
+ titleTrans[1] *= -1;
31450
+ } else {
31451
+ ax.domain[0] += titleHeight / gs.h;
31452
+ var nlines = svgTextUtils.lineCount(titleText);
31453
+ titleTrans[1] += (1 - nlines) * lineSize;
31454
+ }
31455
+
31456
+ titleGroup.attr('transform', strTranslate(titleTrans[0], titleTrans[1]));
31457
+ ax.setScale();
31346
31458
  }
31459
+ } else { // horizontal colorbars
31460
+ if(titleWidth) {
31461
+ if(titleSide === 'right') {
31462
+ ax.domain[0] += (titleWidth + titleFontSize / 2) / gs.w;
31463
+ }
31347
31464
 
31348
- titleGroup.attr('transform', strTranslate(titleTrans[0], titleTrans[1]));
31349
- ax.setScale();
31465
+ titleGroup.attr('transform', strTranslate(titleTrans[0], titleTrans[1]));
31466
+ ax.setScale();
31467
+ }
31350
31468
  }
31351
31469
  }
31352
31470
 
31353
31471
  g.selectAll('.' + cn.cbfills + ',.' + cn.cblines)
31354
- .attr('transform', strTranslate(0, Math.round(gs.h * (1 - ax.domain[1]))));
31472
+ .attr('transform', isVertical ?
31473
+ strTranslate(0, Math.round(gs.h * (1 - ax.domain[1]))) :
31474
+ strTranslate(Math.round(gs.w * ax.domain[0]), 0)
31475
+ );
31355
31476
 
31356
- axLayer.attr('transform', strTranslate(0, Math.round(-gs.t)));
31477
+ axLayer.attr('transform', isVertical ?
31478
+ strTranslate(0, Math.round(-gs.t)) :
31479
+ strTranslate(Math.round(-gs.l), 0)
31480
+ );
31357
31481
 
31358
31482
  var fills = g.select('.' + cn.cbfills)
31359
31483
  .selectAll('rect.' + cn.cbfill)
@@ -31379,20 +31503,22 @@ function drawColorBar(g, opts, gd) {
31379
31503
 
31380
31504
  // offset the side adjoining the next rectangle so they
31381
31505
  // overlap, to prevent antialiasing gaps
31382
- z[1] = Lib.constrain(z[1] + (z[1] > z[0]) ? 1 : -1, zBounds[0], zBounds[1]);
31383
-
31506
+ if(isVertical) {
31507
+ z[1] = Lib.constrain(z[1] + (z[1] > z[0]) ? 1 : -1, zBounds[0], zBounds[1]);
31508
+ } /* else {
31509
+ // TODO: horizontal case
31510
+ } */
31384
31511
 
31385
31512
  // Colorbar cannot currently support opacities so we
31386
31513
  // use an opaque fill even when alpha channels present
31387
- var fillEl = d3.select(this).attr({
31388
- x: uPx,
31389
- width: Math.max(thickPx, 2),
31390
- y: d3.min(z),
31391
- height: Math.max(d3.max(z) - d3.min(z), 2),
31392
- });
31514
+ var fillEl = d3.select(this)
31515
+ .attr(isVertical ? 'x' : 'y', uPx)
31516
+ .attr(isVertical ? 'y' : 'x', d3.min(z))
31517
+ .attr(isVertical ? 'width' : 'height', Math.max(thickPx, 2))
31518
+ .attr(isVertical ? 'height' : 'width', Math.max(d3.max(z) - d3.min(z), 2));
31393
31519
 
31394
31520
  if(opts._fillgradient) {
31395
- Drawing.gradient(fillEl, gd, opts._id, 'vertical', opts._fillgradient, 'fill');
31521
+ Drawing.gradient(fillEl, gd, opts._id, isVertical ? 'vertical' : 'horizontalreversed', opts._fillgradient, 'fill');
31396
31522
  } else {
31397
31523
  // tinycolor can't handle exponents and
31398
31524
  // at this scale, removing it makes no difference.
@@ -31408,9 +31534,15 @@ function drawColorBar(g, opts, gd) {
31408
31534
  .classed(cn.cbline, true);
31409
31535
  lines.exit().remove();
31410
31536
  lines.each(function(d) {
31537
+ var a = uPx;
31538
+ var b = (Math.round(ax.c2p(d)) + (line.width / 2) % 1);
31539
+
31411
31540
  d3.select(this)
31412
- .attr('d', 'M' + uPx + ',' +
31413
- (Math.round(ax.c2p(d)) + (line.width / 2) % 1) + 'h' + thickPx)
31541
+ .attr('d', 'M' +
31542
+ (isVertical ? a + ',' + b : b + ',' + a) +
31543
+ (isVertical ? 'h' : 'v') +
31544
+ thickPx
31545
+ )
31414
31546
  .call(Drawing.lineGroupStyle, line.width, lineColormap(d), line.dash);
31415
31547
  });
31416
31548
 
@@ -31443,82 +31575,211 @@ function drawColorBar(g, opts, gd) {
31443
31575
  // TODO: why are we redrawing multiple times now with this?
31444
31576
  // I guess autoMargin doesn't like being post-promise?
31445
31577
  function positionCB() {
31578
+ var bb;
31446
31579
  var innerThickness = thickPx + outlinewidth / 2;
31447
- if(ax.ticklabelposition.indexOf('inside') === -1) {
31448
- innerThickness += Drawing.bBox(axLayer.node()).width;
31580
+ if(ticklabelposition.indexOf('inside') === -1) {
31581
+ bb = Drawing.bBox(axLayer.node());
31582
+ innerThickness += isVertical ? bb.width : bb.height;
31449
31583
  }
31450
31584
 
31451
31585
  titleEl = titleCont.select('text');
31452
31586
 
31587
+ var titleWidth = 0;
31588
+
31589
+ var topSideVertical = isVertical && titleSide === 'top';
31590
+ var rightSideHorizontal = !isVertical && titleSide === 'right';
31591
+
31592
+ var moveY = 0;
31593
+
31453
31594
  if(titleEl.node() && !titleEl.classed(cn.jsPlaceholder)) {
31595
+ var _titleHeight;
31596
+
31454
31597
  var mathJaxNode = titleCont.select('.h' + ax._id + 'title-math-group').node();
31455
- var titleWidth;
31456
- if(mathJaxNode && ['top', 'bottom'].indexOf(titleSide) !== -1) {
31457
- titleWidth = Drawing.bBox(mathJaxNode).width;
31598
+ if(mathJaxNode && (
31599
+ (isVertical && topOrBottom) ||
31600
+ (!isVertical && !topOrBottom)
31601
+ )) {
31602
+ bb = Drawing.bBox(mathJaxNode);
31603
+ titleWidth = bb.width;
31604
+ _titleHeight = bb.height;
31458
31605
  } else {
31459
31606
  // note: the formula below works for all title sides,
31460
31607
  // (except for top/bottom mathjax, above)
31461
31608
  // but the weird gs.l is because the titleunshift
31462
31609
  // transform gets removed by Drawing.bBox
31463
- titleWidth = Drawing.bBox(titleCont.node()).right - uPx - gs.l;
31610
+ bb = Drawing.bBox(titleCont.node());
31611
+ titleWidth = bb.right - gs.l - (isVertical ? uPx : vPx);
31612
+ _titleHeight = bb.bottom - gs.t - (isVertical ? vPx : uPx);
31613
+
31614
+ if(
31615
+ !isVertical && titleSide === 'top'
31616
+ ) {
31617
+ innerThickness += bb.height;
31618
+ moveY = bb.height;
31619
+ }
31620
+ }
31621
+
31622
+ if(rightSideHorizontal) {
31623
+ titleEl.attr('transform', strTranslate(titleWidth / 2 + titleFontSize / 2, 0));
31624
+
31625
+ titleWidth *= 2;
31464
31626
  }
31465
- innerThickness = Math.max(innerThickness, titleWidth);
31627
+
31628
+ innerThickness = Math.max(innerThickness,
31629
+ isVertical ? titleWidth : _titleHeight
31630
+ );
31466
31631
  }
31467
31632
 
31468
- var outerThickness = 2 * xpad + innerThickness + borderwidth + outlinewidth / 2;
31633
+ var outerThickness = (isVertical ?
31634
+ xpad :
31635
+ ypad
31636
+ ) * 2 + innerThickness + borderwidth + outlinewidth / 2;
31469
31637
 
31470
- g.select('.' + cn.cbbg).attr({
31471
- x: uPx - xpad - (borderwidth + outlinewidth) / 2,
31472
- y: vPx - lenPx - yExtraPx,
31473
- width: Math.max(outerThickness, 2),
31474
- height: Math.max(lenPx + 2 * yExtraPx, 2)
31475
- })
31476
- .call(Color.fill, opts.bgcolor)
31638
+ var hColorbarMoveTitle = 0;
31639
+ if(!isVertical && title.text && yanchor === 'bottom' && optsY <= 0) {
31640
+ hColorbarMoveTitle = outerThickness / 2;
31641
+
31642
+ outerThickness += hColorbarMoveTitle;
31643
+ moveY += hColorbarMoveTitle;
31644
+ }
31645
+ fullLayout._hColorbarMoveTitle = hColorbarMoveTitle;
31646
+ fullLayout._hColorbarMoveCBTitle = moveY;
31647
+
31648
+ var extraW = borderwidth + outlinewidth;
31649
+
31650
+ g.select('.' + cn.cbbg)
31651
+ .attr('x', (isVertical ? uPx : vPx) - extraW / 2 - (isVertical ? xpad : 0))
31652
+ .attr('y', (isVertical ? vPx : uPx) - (isVertical ? lenPx : ypad + moveY - hColorbarMoveTitle))
31653
+ .attr(isVertical ? 'width' : 'height', Math.max(outerThickness - hColorbarMoveTitle, 2))
31654
+ .attr(isVertical ? 'height' : 'width', Math.max(lenPx + extraW, 2))
31655
+ .call(Color.fill, bgcolor)
31477
31656
  .call(Color.stroke, opts.bordercolor)
31478
31657
  .style('stroke-width', borderwidth);
31479
31658
 
31480
- g.selectAll('.' + cn.cboutline).attr({
31481
- x: uPx,
31482
- y: vPx - lenPx + ypad + (titleSide === 'top' ? titleHeight : 0),
31483
- width: Math.max(thickPx, 2),
31484
- height: Math.max(lenPx - 2 * ypad - titleHeight, 2)
31485
- })
31659
+ var moveX = rightSideHorizontal ? Math.max(titleWidth - 10, 0) : 0;
31660
+
31661
+ g.selectAll('.' + cn.cboutline)
31662
+ .attr('x', (isVertical ? uPx : vPx + xpad) + moveX)
31663
+ .attr('y', (isVertical ? vPx + ypad - lenPx : uPx) + (topSideVertical ? titleHeight : 0))
31664
+ .attr(isVertical ? 'width' : 'height', Math.max(thickPx, 2))
31665
+ .attr(isVertical ? 'height' : 'width', Math.max(lenPx - (isVertical ?
31666
+ 2 * ypad + titleHeight :
31667
+ 2 * xpad + moveX
31668
+ ), 2))
31486
31669
  .call(Color.stroke, opts.outlinecolor)
31487
31670
  .style({
31488
31671
  fill: 'none',
31489
31672
  'stroke-width': outlinewidth
31490
31673
  });
31491
31674
 
31492
- // fix positioning for xanchor!='left'
31493
- var xoffset = ({center: 0.5, right: 1}[xanchor] || 0) * outerThickness;
31494
- g.attr('transform', strTranslate(gs.l - xoffset, gs.t));
31675
+ g.attr('transform', strTranslate(
31676
+ gs.l - (isVertical ? xRatio * outerThickness : 0),
31677
+ gs.t - (isVertical ? 0 : (1 - yRatio) * outerThickness - moveY)
31678
+ ));
31679
+
31680
+ if(!isVertical && (
31681
+ borderwidth || (
31682
+ tinycolor(bgcolor).getAlpha() &&
31683
+ !tinycolor.equals(fullLayout.paper_bgcolor, bgcolor)
31684
+ )
31685
+ )) {
31686
+ // for horizontal colorbars when there is a border line or having different background color
31687
+ // hide/adjust x positioning for the first/last tick labels if they go outside the border
31688
+ var tickLabels = axLayer.selectAll('text');
31689
+ var numTicks = tickLabels[0].length;
31690
+
31691
+ var border = g.select('.' + cn.cbbg).node();
31692
+ var oBb = Drawing.bBox(border);
31693
+ var oTr = Drawing.getTranslate(g);
31694
+
31695
+ var TEXTPAD = 2;
31696
+
31697
+ tickLabels.each(function(d, i) {
31698
+ var first = 0;
31699
+ var last = numTicks - 1;
31700
+ if(i === first || i === last) {
31701
+ var iBb = Drawing.bBox(this);
31702
+ var iTr = Drawing.getTranslate(this);
31703
+ var deltaX;
31704
+
31705
+ if(i === last) {
31706
+ var iRight = iBb.right + iTr.x;
31707
+ var oRight = oBb.right + oTr.x + vPx - borderwidth - TEXTPAD + optsX;
31708
+
31709
+ deltaX = oRight - iRight;
31710
+ if(deltaX > 0) deltaX = 0;
31711
+ } else if(i === first) {
31712
+ var iLeft = iBb.left + iTr.x;
31713
+ var oLeft = oBb.left + oTr.x + vPx + borderwidth + TEXTPAD;
31714
+
31715
+ deltaX = oLeft - iLeft;
31716
+ if(deltaX < 0) deltaX = 0;
31717
+ }
31718
+
31719
+ if(deltaX) {
31720
+ if(numTicks < 3) { // adjust position
31721
+ this.setAttribute('transform',
31722
+ 'translate(' + deltaX + ',0) ' +
31723
+ this.getAttribute('transform')
31724
+ );
31725
+ } else { // hide
31726
+ this.setAttribute('visibility', 'hidden');
31727
+ }
31728
+ }
31729
+ }
31730
+ });
31731
+ }
31495
31732
 
31496
31733
  // auto margin adjustment
31497
31734
  var marginOpts = {};
31735
+ var lFrac = FROM_TL[xanchor];
31736
+ var rFrac = FROM_BR[xanchor];
31498
31737
  var tFrac = FROM_TL[yanchor];
31499
31738
  var bFrac = FROM_BR[yanchor];
31500
- if(lenmode === 'pixels') {
31501
- marginOpts.y = optsY;
31502
- marginOpts.t = lenPx * tFrac;
31503
- marginOpts.b = lenPx * bFrac;
31504
- } else {
31505
- marginOpts.t = marginOpts.b = 0;
31506
- marginOpts.yt = optsY + len * tFrac;
31507
- marginOpts.yb = optsY - len * bFrac;
31508
- }
31509
31739
 
31510
- var lFrac = FROM_TL[xanchor];
31511
- var rFrac = FROM_BR[xanchor];
31512
- if(thicknessmode === 'pixels') {
31513
- marginOpts.x = optsX;
31514
- marginOpts.l = outerThickness * lFrac;
31515
- marginOpts.r = outerThickness * rFrac;
31516
- } else {
31517
- var extraThickness = outerThickness - thickPx;
31518
- marginOpts.l = extraThickness * lFrac;
31519
- marginOpts.r = extraThickness * rFrac;
31520
- marginOpts.xl = optsX - thickness * lFrac;
31521
- marginOpts.xr = optsX + thickness * rFrac;
31740
+ var extraThickness = outerThickness - thickPx;
31741
+ if(isVertical) {
31742
+ if(lenmode === 'pixels') {
31743
+ marginOpts.y = optsY;
31744
+ marginOpts.t = lenPx * tFrac;
31745
+ marginOpts.b = lenPx * bFrac;
31746
+ } else {
31747
+ marginOpts.t = marginOpts.b = 0;
31748
+ marginOpts.yt = optsY + len * tFrac;
31749
+ marginOpts.yb = optsY - len * bFrac;
31750
+ }
31751
+
31752
+ if(thicknessmode === 'pixels') {
31753
+ marginOpts.x = optsX;
31754
+ marginOpts.l = outerThickness * lFrac;
31755
+ marginOpts.r = outerThickness * rFrac;
31756
+ } else {
31757
+ marginOpts.l = extraThickness * lFrac;
31758
+ marginOpts.r = extraThickness * rFrac;
31759
+ marginOpts.xl = optsX - thickness * lFrac;
31760
+ marginOpts.xr = optsX + thickness * rFrac;
31761
+ }
31762
+ } else { // horizontal colorbars
31763
+ if(lenmode === 'pixels') {
31764
+ marginOpts.x = optsX;
31765
+ marginOpts.l = lenPx * lFrac;
31766
+ marginOpts.r = lenPx * rFrac;
31767
+ } else {
31768
+ marginOpts.l = marginOpts.r = 0;
31769
+ marginOpts.xl = optsX + len * lFrac;
31770
+ marginOpts.xr = optsX - len * rFrac;
31771
+ }
31772
+
31773
+ if(thicknessmode === 'pixels') {
31774
+ marginOpts.y = 1 - optsY;
31775
+ marginOpts.t = outerThickness * tFrac;
31776
+ marginOpts.b = outerThickness * bFrac;
31777
+ } else {
31778
+ marginOpts.t = extraThickness * tFrac;
31779
+ marginOpts.b = extraThickness * bFrac;
31780
+ marginOpts.yt = optsY - thickness * tFrac;
31781
+ marginOpts.yb = optsY + thickness * bFrac;
31782
+ }
31522
31783
  }
31523
31784
 
31524
31785
  Plots.autoMargin(gd, opts._id, marginOpts);
@@ -31535,6 +31796,7 @@ function drawColorBar(g, opts, gd) {
31535
31796
  }
31536
31797
 
31537
31798
  function makeEditable(g, opts, gd) {
31799
+ var isVertical = opts.orientation === 'v';
31538
31800
  var fullLayout = gd._fullLayout;
31539
31801
  var gs = fullLayout._size;
31540
31802
  var t0, xf, yf;
@@ -31549,9 +31811,13 @@ function makeEditable(g, opts, gd) {
31549
31811
  moveFn: function(dx, dy) {
31550
31812
  g.attr('transform', t0 + strTranslate(dx, dy));
31551
31813
 
31552
- xf = dragElement.align(opts._uFrac + (dx / gs.w), opts._thickFrac,
31814
+ xf = dragElement.align(
31815
+ (isVertical ? opts._uFrac : opts._vFrac) + (dx / gs.w),
31816
+ isVertical ? opts._thickFrac : opts._lenFrac,
31553
31817
  0, 1, opts.xanchor);
31554
- yf = dragElement.align(opts._vFrac - (dy / gs.h), opts._lenFrac,
31818
+ yf = dragElement.align(
31819
+ (isVertical ? opts._vFrac : (1 - opts._uFrac)) - (dy / gs.h),
31820
+ isVertical ? opts._lenFrac : opts._thickFrac,
31555
31821
  0, 1, opts.yanchor);
31556
31822
 
31557
31823
  var csr = dragElement.getCursor(xf, yf, opts.xanchor, opts.yanchor);
@@ -31628,6 +31894,8 @@ function calcLevels(gd, opts, zrange) {
31628
31894
  function mockColorBarAxis(gd, opts, zrange) {
31629
31895
  var fullLayout = gd._fullLayout;
31630
31896
 
31897
+ var isVertical = opts.orientation === 'v';
31898
+
31631
31899
  var cbAxisIn = {
31632
31900
  type: 'linear',
31633
31901
  range: zrange,
@@ -31658,17 +31926,19 @@ function mockColorBarAxis(gd, opts, zrange) {
31658
31926
  title: opts.title,
31659
31927
  showline: true,
31660
31928
  anchor: 'free',
31661
- side: 'right',
31929
+ side: isVertical ? 'right' : 'bottom',
31662
31930
  position: 1
31663
31931
  };
31664
31932
 
31933
+ var letter = isVertical ? 'y' : 'x';
31934
+
31665
31935
  var cbAxisOut = {
31666
31936
  type: 'linear',
31667
- _id: 'y' + opts._id
31937
+ _id: letter + opts._id
31668
31938
  };
31669
31939
 
31670
31940
  var axisOptions = {
31671
- letter: 'y',
31941
+ letter: letter,
31672
31942
  font: fullLayout.font,
31673
31943
  noHover: true,
31674
31944
  noTickson: true,
@@ -34130,7 +34400,7 @@ var TEXTOFFSETSIGN = {
34130
34400
  start: 1, end: -1, middle: 0, bottom: 1, top: -1
34131
34401
  };
34132
34402
 
34133
- function textPointPosition(s, textPosition, fontSize, markerRadius) {
34403
+ function textPointPosition(s, textPosition, fontSize, markerRadius, dontTouchParent) {
34134
34404
  var group = d3.select(s.node().parentNode);
34135
34405
 
34136
34406
  var v = textPosition.indexOf('top') !== -1 ?
@@ -34152,7 +34422,9 @@ function textPointPosition(s, textPosition, fontSize, markerRadius) {
34152
34422
 
34153
34423
  // fix the overall text group position
34154
34424
  s.attr('text-anchor', h);
34155
- group.attr('transform', strTranslate(dx, dy));
34425
+ if(!dontTouchParent) {
34426
+ group.attr('transform', strTranslate(dx, dy));
34427
+ }
34156
34428
  }
34157
34429
 
34158
34430
  function extracTextFontSize(d, trace) {
@@ -34222,7 +34494,8 @@ drawing.selectedTextStyle = function(s, trace) {
34222
34494
  var fontSize = extracTextFontSize(d, trace);
34223
34495
 
34224
34496
  Color.fill(tx, tc);
34225
- textPointPosition(tx, tp, fontSize, d.mrc2 || d.mrc);
34497
+ var dontTouchParent = Registry.traceIs(trace, 'bar-like');
34498
+ textPointPosition(tx, tp, fontSize, d.mrc2 || d.mrc, dontTouchParent);
34226
34499
  });
34227
34500
  };
34228
34501
 
@@ -34644,7 +34917,7 @@ drawing.setTextPointsScale = function(selection, xScale, yScale) {
34644
34917
  });
34645
34918
  };
34646
34919
 
34647
- },{"../../components/fx/helpers":193,"../../constants/alignment":262,"../../constants/interactions":266,"../../constants/xmlns_namespaces":268,"../../lib":287,"../../lib/svg_text_utils":310,"../../registry":378,"../../traces/scatter/make_bubble_size_func":516,"../../traces/scatter/subtypes":524,"../color":157,"../colorscale":169,"./symbol_defs":180,"@plotly/d3":20,"fast-isnumeric":33,"tinycolor2":121}],180:[function(_dereq_,module,exports){
34920
+ },{"../../components/fx/helpers":193,"../../constants/alignment":262,"../../constants/interactions":266,"../../constants/xmlns_namespaces":268,"../../lib":287,"../../lib/svg_text_utils":310,"../../registry":378,"../../traces/scatter/make_bubble_size_func":517,"../../traces/scatter/subtypes":525,"../color":157,"../colorscale":169,"./symbol_defs":180,"@plotly/d3":20,"fast-isnumeric":33,"tinycolor2":121}],180:[function(_dereq_,module,exports){
34648
34921
  'use strict';
34649
34922
 
34650
34923
  var d3 = _dereq_('@plotly/d3');
@@ -35743,7 +36016,7 @@ function errorCoords(d, xa, ya) {
35743
36016
  return out;
35744
36017
  }
35745
36018
 
35746
- },{"../../traces/scatter/subtypes":524,"../drawing":179,"@plotly/d3":20,"fast-isnumeric":33}],187:[function(_dereq_,module,exports){
36019
+ },{"../../traces/scatter/subtypes":525,"../drawing":179,"@plotly/d3":20,"fast-isnumeric":33}],187:[function(_dereq_,module,exports){
35747
36020
  'use strict';
35748
36021
 
35749
36022
  var d3 = _dereq_('@plotly/d3');
@@ -37278,7 +37551,9 @@ function createHoverText(hoverData, opts) {
37278
37551
  orientation: 'v'
37279
37552
  }
37280
37553
  };
37281
- var mockLayoutOut = {};
37554
+ var mockLayoutOut = {
37555
+ font: font
37556
+ };
37282
37557
  legendSupplyDefaults(mockLayoutIn, mockLayoutOut, gd._fullData);
37283
37558
  var mockLegend = mockLayoutOut.legend;
37284
37559
 
@@ -37319,7 +37594,8 @@ function createHoverText(hoverData, opts) {
37319
37594
 
37320
37595
  // Draw unified hover label
37321
37596
  mockLegend._inHover = true;
37322
- mockLegend._groupTitleFont = font;
37597
+ mockLegend._groupTitleFont = hoverlabel.grouptitlefont;
37598
+
37323
37599
  legendDraw(gd, mockLegend);
37324
37600
 
37325
37601
  // Position the hover
@@ -38321,9 +38597,11 @@ var isUnifiedHover = _dereq_('./helpers').isUnifiedHover;
38321
38597
  module.exports = function handleHoverLabelDefaults(contIn, contOut, coerce, opts) {
38322
38598
  opts = opts || {};
38323
38599
 
38600
+ var hasLegend = contOut.legend;
38601
+
38324
38602
  function inheritFontAttr(attr) {
38325
38603
  if(!opts.font[attr]) {
38326
- opts.font[attr] = contOut.legend ? contOut.legend.font[attr] : contOut.font[attr];
38604
+ opts.font[attr] = hasLegend ? contOut.legend.font[attr] : contOut.font[attr];
38327
38605
  }
38328
38606
  }
38329
38607
 
@@ -38334,7 +38612,7 @@ module.exports = function handleHoverLabelDefaults(contIn, contOut, coerce, opts
38334
38612
  inheritFontAttr('family');
38335
38613
  inheritFontAttr('color');
38336
38614
 
38337
- if(contOut.legend) {
38615
+ if(hasLegend) {
38338
38616
  if(!opts.bgcolor) opts.bgcolor = Color.combine(contOut.legend.bgcolor, contOut.paper_bgcolor);
38339
38617
  if(!opts.bordercolor) opts.bordercolor = contOut.legend.bordercolor;
38340
38618
  } else {
@@ -38443,11 +38721,13 @@ function castHoverinfo(trace, fullLayout, ptNumber) {
38443
38721
 
38444
38722
  var constants = _dereq_('./constants');
38445
38723
 
38446
- var fontAttrs = _dereq_('../../plots/font_attributes')({
38724
+ var fontAttrs = _dereq_('../../plots/font_attributes');
38725
+
38726
+ var font = fontAttrs({
38447
38727
  editType: 'none',
38448
38728
  });
38449
- fontAttrs.family.dflt = constants.HOVERFONT;
38450
- fontAttrs.size.dflt = constants.HOVERFONTSIZE;
38729
+ font.family.dflt = constants.HOVERFONT;
38730
+ font.size.dflt = constants.HOVERFONTSIZE;
38451
38731
 
38452
38732
  module.exports = {
38453
38733
  clickmode: {
@@ -38503,7 +38783,10 @@ module.exports = {
38503
38783
  valType: 'color',
38504
38784
  editType: 'none',
38505
38785
  },
38506
- font: fontAttrs,
38786
+ font: font,
38787
+ grouptitlefont: fontAttrs({
38788
+ editType: 'none',
38789
+ }),
38507
38790
  align: {
38508
38791
  valType: 'enumerated',
38509
38792
  values: ['left', 'right', 'auto'],
@@ -38516,6 +38799,7 @@ module.exports = {
38516
38799
  dflt: 15,
38517
38800
  editType: 'none',
38518
38801
  },
38802
+
38519
38803
  editType: 'none'
38520
38804
  },
38521
38805
  selectdirection: {
@@ -38563,6 +38847,8 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) {
38563
38847
  }
38564
38848
 
38565
38849
  handleHoverLabelDefaults(layoutIn, layoutOut, coerce);
38850
+
38851
+ Lib.coerceFont(coerce, 'hoverlabel.grouptitlefont', layoutOut.hoverlabel.font);
38566
38852
  };
38567
38853
 
38568
38854
  },{"../../lib":287,"./hoverlabel_defaults":195,"./hovermode_defaults":196,"./layout_attributes":198}],200:[function(_dereq_,module,exports){
@@ -39446,6 +39732,9 @@ module.exports = {
39446
39732
  font: fontAttrs({
39447
39733
  editType: 'legend',
39448
39734
  }),
39735
+ grouptitlefont: fontAttrs({
39736
+ editType: 'legend',
39737
+ }),
39449
39738
  orientation: {
39450
39739
  valType: 'enumerated',
39451
39740
  values: ['v', 'h'],
@@ -39569,6 +39858,7 @@ var Registry = _dereq_('../../registry');
39569
39858
  var Lib = _dereq_('../../lib');
39570
39859
  var Template = _dereq_('../../plot_api/plot_template');
39571
39860
 
39861
+ var plotsAttrs = _dereq_('../../plots/attributes');
39572
39862
  var attributes = _dereq_('./attributes');
39573
39863
  var basePlotLayoutAttributes = _dereq_('../../plots/layout_attributes');
39574
39864
  var helpers = _dereq_('./helpers');
@@ -39576,13 +39866,30 @@ var helpers = _dereq_('./helpers');
39576
39866
 
39577
39867
  module.exports = function legendDefaults(layoutIn, layoutOut, fullData) {
39578
39868
  var containerIn = layoutIn.legend || {};
39869
+ var containerOut = Template.newContainer(layoutOut, 'legend');
39870
+
39871
+ function coerce(attr, dflt) {
39872
+ return Lib.coerce(containerIn, containerOut, attributes, attr, dflt);
39873
+ }
39874
+
39875
+ var trace;
39876
+ var traceCoerce = function(attr, dflt) {
39877
+ var traceIn = trace._input;
39878
+ var traceOut = trace;
39879
+ return Lib.coerce(traceIn, traceOut, plotsAttrs, attr, dflt);
39880
+ };
39881
+
39882
+ var globalFont = layoutOut.font || {};
39883
+ var grouptitlefont = Lib.coerceFont(coerce, 'grouptitlefont', Lib.extendFlat({}, globalFont, {
39884
+ size: Math.round(globalFont.size * 1.1)
39885
+ }));
39579
39886
 
39580
39887
  var legendTraceCount = 0;
39581
39888
  var legendReallyHasATrace = false;
39582
39889
  var defaultOrder = 'normal';
39583
39890
 
39584
39891
  for(var i = 0; i < fullData.length; i++) {
39585
- var trace = fullData[i];
39892
+ trace = fullData[i];
39586
39893
 
39587
39894
  if(!trace.visible) continue;
39588
39895
 
@@ -39609,6 +39916,8 @@ module.exports = function legendDefaults(layoutIn, layoutOut, fullData) {
39609
39916
  legendTraceCount++;
39610
39917
  }
39611
39918
  }
39919
+
39920
+ Lib.coerceFont(traceCoerce, 'legendgrouptitle.font', grouptitlefont);
39612
39921
  }
39613
39922
 
39614
39923
  if((Registry.traceIs(trace, 'bar') && layoutOut.barmode === 'stack') ||
@@ -39627,13 +39936,10 @@ module.exports = function legendDefaults(layoutIn, layoutOut, fullData) {
39627
39936
  basePlotLayoutAttributes, 'showlegend',
39628
39937
  legendReallyHasATrace && legendTraceCount > 1);
39629
39938
 
39630
- if(showLegend === false && !containerIn.uirevision) return;
39631
-
39632
- var containerOut = Template.newContainer(layoutOut, 'legend');
39939
+ // delete legend
39940
+ if(showLegend === false) layoutOut.legend = undefined;
39633
39941
 
39634
- function coerce(attr, dflt) {
39635
- return Lib.coerce(containerIn, containerOut, attributes, attr, dflt);
39636
- }
39942
+ if(showLegend === false && !containerIn.uirevision) return;
39637
39943
 
39638
39944
  coerce('uirevision', layoutOut.uirevision);
39639
39945
 
@@ -39695,7 +40001,7 @@ module.exports = function legendDefaults(layoutIn, layoutOut, fullData) {
39695
40001
  }
39696
40002
  };
39697
40003
 
39698
- },{"../../lib":287,"../../plot_api/plot_template":323,"../../plots/layout_attributes":369,"../../registry":378,"./attributes":207,"./helpers":213}],210:[function(_dereq_,module,exports){
40004
+ },{"../../lib":287,"../../plot_api/plot_template":323,"../../plots/attributes":330,"../../plots/layout_attributes":369,"../../registry":378,"./attributes":207,"./helpers":213}],210:[function(_dereq_,module,exports){
39699
40005
  'use strict';
39700
40006
 
39701
40007
  var d3 = _dereq_('@plotly/d3');
@@ -41668,7 +41974,7 @@ function dimAttr(v, dflt, max) {
41668
41974
  return v;
41669
41975
  }
41670
41976
 
41671
- },{"../../lib":287,"../../registry":378,"../../traces/pie/helpers":491,"../../traces/pie/style_one":497,"../../traces/scatter/subtypes":524,"../color":157,"../colorscale/helpers":168,"../drawing":179,"./constants":208,"@plotly/d3":20}],216:[function(_dereq_,module,exports){
41977
+ },{"../../lib":287,"../../registry":378,"../../traces/pie/helpers":492,"../../traces/pie/style_one":498,"../../traces/scatter/subtypes":525,"../color":157,"../colorscale/helpers":168,"../drawing":179,"./constants":208,"@plotly/d3":20}],216:[function(_dereq_,module,exports){
41672
41978
  'use strict';
41673
41979
 
41674
41980
  var constants = _dereq_('./constants');
@@ -42902,7 +43208,7 @@ function fillCustomButton(customButtons) {
42902
43208
  return customButtons;
42903
43209
  }
42904
43210
 
42905
- },{"../../plots/cartesian/axis_ids":338,"../../registry":378,"../../traces/scatter/subtypes":524,"../fx/helpers":193,"./buttons":217,"./constants":218,"./modebar":222}],222:[function(_dereq_,module,exports){
43211
+ },{"../../plots/cartesian/axis_ids":338,"../../registry":378,"../../traces/scatter/subtypes":525,"../fx/helpers":193,"./buttons":217,"./constants":218,"./modebar":222}],222:[function(_dereq_,module,exports){
42906
43212
  'use strict';
42907
43213
 
42908
43214
  var d3 = _dereq_('@plotly/d3');
@@ -44831,7 +45137,7 @@ module.exports = templatedArray('shape', {
44831
45137
  editType: 'arraydraw'
44832
45138
  });
44833
45139
 
44834
- },{"../../constants/axis_placeable_objects":263,"../../lib/extend":281,"../../plot_api/plot_template":323,"../../traces/scatter/attributes":499,"../annotations/attributes":140,"../drawing/attributes":178}],238:[function(_dereq_,module,exports){
45140
+ },{"../../constants/axis_placeable_objects":263,"../../lib/extend":281,"../../plot_api/plot_template":323,"../../traces/scatter/attributes":500,"../annotations/attributes":140,"../drawing/attributes":178}],238:[function(_dereq_,module,exports){
44835
45141
  'use strict';
44836
45142
 
44837
45143
  var Lib = _dereq_('../../lib');
@@ -48147,8 +48453,10 @@ function draw(gd, titleClass, options) {
48147
48453
 
48148
48454
  var elShouldExist = txt || editable;
48149
48455
 
48456
+ var hColorbarMoveTitle;
48150
48457
  if(!group) {
48151
48458
  group = Lib.ensureSingle(fullLayout._infolayer, 'g', 'g-' + titleClass);
48459
+ hColorbarMoveTitle = fullLayout._hColorbarMoveTitle;
48152
48460
  }
48153
48461
 
48154
48462
  var el = group.selectAll('text')
@@ -48172,13 +48480,17 @@ function draw(gd, titleClass, options) {
48172
48480
  function drawTitle(titleEl) {
48173
48481
  var transformVal;
48174
48482
 
48483
+ if(!transform && hColorbarMoveTitle) {
48484
+ transform = {};
48485
+ }
48486
+
48175
48487
  if(transform) {
48176
48488
  transformVal = '';
48177
48489
  if(transform.rotate) {
48178
48490
  transformVal += 'rotate(' + [transform.rotate, attributes.x, attributes.y] + ')';
48179
48491
  }
48180
- if(transform.offset) {
48181
- transformVal += strTranslate(0, transform.offset);
48492
+ if(transform.offset || hColorbarMoveTitle) {
48493
+ transformVal += strTranslate(0, (transform.offset || 0) - (hColorbarMoveTitle || 0));
48182
48494
  }
48183
48495
  } else {
48184
48496
  transformVal = null;
@@ -49975,7 +50287,7 @@ exports.Fx = {
49975
50287
  exports.Snapshot = _dereq_('./snapshot');
49976
50288
  exports.PlotSchema = _dereq_('./plot_api/plot_schema');
49977
50289
 
49978
- },{"../build/plotcss":1,"./components/annotations":148,"./components/annotations3d":153,"./components/colorbar":163,"./components/colorscale":169,"./components/errorbars":185,"./components/fx":197,"./components/grid":201,"./components/images":206,"./components/legend":214,"./components/modebar":220,"./components/rangeselector":228,"./components/rangeslider":235,"./components/shapes":249,"./components/sliders":254,"./components/updatemenus":260,"./fonts/ploticon":270,"./locale-en":314,"./locale-en-us":313,"./plot_api":318,"./plot_api/plot_schema":322,"./plots/plots":371,"./registry":378,"./snapshot":383,"./traces/scatter":511,"./version":551,"native-promise-only":72}],270:[function(_dereq_,module,exports){
50290
+ },{"../build/plotcss":1,"./components/annotations":148,"./components/annotations3d":153,"./components/colorbar":163,"./components/colorscale":169,"./components/errorbars":185,"./components/fx":197,"./components/grid":201,"./components/images":206,"./components/legend":214,"./components/modebar":220,"./components/rangeselector":228,"./components/rangeslider":235,"./components/shapes":249,"./components/sliders":254,"./components/updatemenus":260,"./fonts/ploticon":270,"./locale-en":314,"./locale-en-us":313,"./plot_api":318,"./plot_api/plot_schema":322,"./plots/plots":371,"./registry":378,"./snapshot":383,"./traces/scatter":512,"./version":552,"native-promise-only":72}],270:[function(_dereq_,module,exports){
49979
50291
  'use strict';
49980
50292
 
49981
50293
  module.exports = {
@@ -59636,7 +59948,7 @@ function cleanDeprecatedAttributeKeys(aobj) {
59636
59948
  if((key === 'title' || oldAxisTitleRegex.test(key) || colorbarRegex.test(key)) &&
59637
59949
  (typeof value === 'string' || typeof value === 'number')) {
59638
59950
  replace(key, key.replace('title', 'title.text'));
59639
- } else if(key.indexOf('titlefont') > -1) {
59951
+ } else if(key.indexOf('titlefont') > -1 && key.indexOf('grouptitlefont') === -1) {
59640
59952
  replace(key, key.replace('titlefont', 'title.font'));
59641
59953
  } else if(key.indexOf('titleposition') > -1) {
59642
59954
  replace(key, key.replace('titleposition', 'title.position'));
@@ -60313,7 +60625,8 @@ function findUIPattern(key, patternSpecs) {
60313
60625
  var spec = patternSpecs[i];
60314
60626
  var match = key.match(spec.pattern);
60315
60627
  if(match) {
60316
- return {head: match[1], attr: spec.attr};
60628
+ var head = match[1] || '';
60629
+ return {head: head, tail: key.substr(head.length + 1), attr: spec.attr};
60317
60630
  }
60318
60631
  }
60319
60632
  }
@@ -60365,26 +60678,54 @@ function valsMatch(v1, v2) {
60365
60678
 
60366
60679
  function applyUIRevisions(data, layout, oldFullData, oldFullLayout) {
60367
60680
  var layoutPreGUI = oldFullLayout._preGUI;
60368
- var key, revAttr, oldRev, newRev, match, preGUIVal, newNP, newVal;
60681
+ var key, revAttr, oldRev, newRev, match, preGUIVal, newNP, newVal, head, tail;
60369
60682
  var bothInheritAutorange = [];
60683
+ var newAutorangeIn = {};
60370
60684
  var newRangeAccepted = {};
60371
60685
  for(key in layoutPreGUI) {
60372
60686
  match = findUIPattern(key, layoutUIControlPatterns);
60373
60687
  if(match) {
60374
- revAttr = match.attr || (match.head + '.uirevision');
60688
+ head = match.head;
60689
+ tail = match.tail;
60690
+ revAttr = match.attr || (head + '.uirevision');
60375
60691
  oldRev = nestedProperty(oldFullLayout, revAttr).get();
60376
60692
  newRev = oldRev && getNewRev(revAttr, layout);
60693
+
60377
60694
  if(newRev && (newRev === oldRev)) {
60378
60695
  preGUIVal = layoutPreGUI[key];
60379
60696
  if(preGUIVal === null) preGUIVal = undefined;
60380
60697
  newNP = nestedProperty(layout, key);
60381
60698
  newVal = newNP.get();
60699
+
60382
60700
  if(valsMatch(newVal, preGUIVal)) {
60383
- if(newVal === undefined && key.substr(key.length - 9) === 'autorange') {
60384
- bothInheritAutorange.push(key.substr(0, key.length - 10));
60701
+ if(newVal === undefined && tail === 'autorange') {
60702
+ bothInheritAutorange.push(head);
60385
60703
  }
60386
60704
  newNP.set(undefinedToNull(nestedProperty(oldFullLayout, key).get()));
60387
60705
  continue;
60706
+ } else if(tail === 'autorange' || tail.substr(0, 6) === 'range[') {
60707
+ // Special case for (auto)range since we push it back into the layout
60708
+ // so all null should be treated equivalently to autorange: true with any range
60709
+ var pre0 = layoutPreGUI[head + '.range[0]'];
60710
+ var pre1 = layoutPreGUI[head + '.range[1]'];
60711
+ var preAuto = layoutPreGUI[head + '.autorange'];
60712
+ if(preAuto || (preAuto === null && pre0 === null && pre1 === null)) {
60713
+ // Only read the input layout once and stash the result,
60714
+ // so we get it before we start modifying it
60715
+ if(!(head in newAutorangeIn)) {
60716
+ var newContainer = nestedProperty(layout, head).get();
60717
+ newAutorangeIn[head] = newContainer && (
60718
+ newContainer.autorange ||
60719
+ (newContainer.autorange !== false && (
60720
+ !newContainer.range || newContainer.range.length !== 2)
60721
+ )
60722
+ );
60723
+ }
60724
+ if(newAutorangeIn[head]) {
60725
+ newNP.set(undefinedToNull(nestedProperty(oldFullLayout, key).get()));
60726
+ continue;
60727
+ }
60728
+ }
60388
60729
  }
60389
60730
  }
60390
60731
  } else {
@@ -60395,12 +60736,12 @@ function applyUIRevisions(data, layout, oldFullData, oldFullLayout) {
60395
60736
  // so remove it from _preGUI for next time.
60396
60737
  delete layoutPreGUI[key];
60397
60738
 
60398
- if(key.substr(key.length - 8, 6) === 'range[') {
60399
- newRangeAccepted[key.substr(0, key.length - 9)] = 1;
60739
+ if(match && match.tail.substr(0, 6) === 'range[') {
60740
+ newRangeAccepted[match.head] = 1;
60400
60741
  }
60401
60742
  }
60402
60743
 
60403
- // Special logic for `autorange`, since it interacts with `range`:
60744
+ // More special logic for `autorange`, since it interacts with `range`:
60404
60745
  // If the new figure's matching `range` was kept, and `autorange`
60405
60746
  // wasn't supplied explicitly in either the original or the new figure,
60406
60747
  // we shouldn't alter that - but we may just have done that, so fix it.
@@ -64332,7 +64673,7 @@ function toImage(gd, opts) {
64332
64673
 
64333
64674
  module.exports = toImage;
64334
64675
 
64335
- },{"../lib":287,"../plots/plots":371,"../snapshot/helpers":382,"../snapshot/svgtoimg":384,"../snapshot/tosvg":386,"../version":551,"./plot_api":320,"fast-isnumeric":33}],327:[function(_dereq_,module,exports){
64676
+ },{"../lib":287,"../plots/plots":371,"../snapshot/helpers":382,"../snapshot/svgtoimg":384,"../snapshot/tosvg":386,"../version":552,"./plot_api":320,"fast-isnumeric":33}],327:[function(_dereq_,module,exports){
64336
64677
  'use strict';
64337
64678
 
64338
64679
  var Lib = _dereq_('../lib');
@@ -77475,6 +77816,9 @@ module.exports = function(opts) {
77475
77816
  // TODO - that's uber hacky... better solution?
77476
77817
  };
77477
77818
 
77819
+ if(opts.autoSize) attrs.size.dflt = 'auto';
77820
+ if(opts.autoColor) attrs.color.dflt = 'auto';
77821
+
77478
77822
  if(opts.arrayOk) {
77479
77823
  attrs.family.arrayOk = true;
77480
77824
  attrs.size.arrayOk = true;
@@ -77834,6 +78178,7 @@ module.exports = {
77834
78178
  valType: 'boolean',
77835
78179
  editType: 'legend',
77836
78180
  },
78181
+
77837
78182
  colorway: {
77838
78183
  valType: 'colorlist',
77839
78184
  dflt: colorAttrs.defaults,
@@ -79246,13 +79591,7 @@ plots.supplyTraceDefaults = function(traceIn, traceOut, colorIndex, layout, trac
79246
79591
  );
79247
79592
 
79248
79593
  coerce('legendgroup');
79249
- var titleText = coerce('legendgrouptitle.text');
79250
- if(titleText) {
79251
- Lib.coerceFont(coerce, 'legendgrouptitle.font', Lib.extendFlat({}, layout.font, {
79252
- size: Math.round(layout.font.size * 1.1) // default to larger font size
79253
- }));
79254
- }
79255
-
79594
+ coerce('legendgrouptitle.text');
79256
79595
  coerce('legendrank');
79257
79596
 
79258
79597
  traceOut._dfltShowLegend = true;
@@ -79400,16 +79739,14 @@ plots.supplyLayoutGlobalDefaults = function(layoutIn, layoutOut, formatObj) {
79400
79739
 
79401
79740
  coerce('autotypenumbers');
79402
79741
 
79403
- var globalFont = Lib.coerceFont(coerce, 'font');
79404
-
79405
- coerce('title.text', layoutOut._dfltTitle.plot);
79742
+ var font = Lib.coerceFont(coerce, 'font');
79743
+ var fontSize = font.size;
79406
79744
 
79407
- Lib.coerceFont(coerce, 'title.font', {
79408
- family: globalFont.family,
79409
- size: Math.round(globalFont.size * 1.4),
79410
- color: globalFont.color
79411
- });
79745
+ Lib.coerceFont(coerce, 'title.font', Lib.extendFlat({}, font, {
79746
+ size: Math.round(fontSize * 1.4)
79747
+ }));
79412
79748
 
79749
+ coerce('title.text', layoutOut._dfltTitle.plot);
79413
79750
  coerce('title.xref');
79414
79751
  coerce('title.yref');
79415
79752
  coerce('title.x');
@@ -83977,7 +84314,7 @@ module.exports = {
83977
84314
  }
83978
84315
  };
83979
84316
 
83980
- },{"../../components/colorscale/attributes":164,"../../components/drawing/attributes":178,"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../../plots/font_attributes":365,"../../plots/template_attributes":373,"../scatter/attributes":499,"./constants":390}],389:[function(_dereq_,module,exports){
84317
+ },{"../../components/colorscale/attributes":164,"../../components/drawing/attributes":178,"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../../plots/font_attributes":365,"../../plots/template_attributes":373,"../scatter/attributes":500,"./constants":390}],389:[function(_dereq_,module,exports){
83981
84318
  'use strict';
83982
84319
 
83983
84320
  var Axes = _dereq_('../../plots/cartesian/axes');
@@ -84052,7 +84389,7 @@ module.exports = function calc(gd, trace) {
84052
84389
  return cd;
84053
84390
  };
84054
84391
 
84055
- },{"../../components/colorscale/calc":165,"../../components/colorscale/helpers":168,"../../plots/cartesian/align_period":331,"../../plots/cartesian/axes":334,"../scatter/calc_selection":501,"./arrays_to_calcdata":387}],390:[function(_dereq_,module,exports){
84392
+ },{"../../components/colorscale/calc":165,"../../components/colorscale/helpers":168,"../../plots/cartesian/align_period":331,"../../plots/cartesian/axes":334,"../scatter/calc_selection":502,"./arrays_to_calcdata":387}],390:[function(_dereq_,module,exports){
84056
84393
  'use strict';
84057
84394
 
84058
84395
  module.exports = {
@@ -85019,7 +85356,7 @@ module.exports = {
85019
85356
  handleText: handleText
85020
85357
  };
85021
85358
 
85022
- },{"../../components/color":157,"../../lib":287,"../../plots/cartesian/constraints":342,"../../registry":378,"../scatter/period_defaults":519,"../scatter/xy_defaults":526,"./attributes":388,"./style_defaults":403}],393:[function(_dereq_,module,exports){
85359
+ },{"../../components/color":157,"../../lib":287,"../../plots/cartesian/constraints":342,"../../registry":378,"../scatter/period_defaults":520,"../scatter/xy_defaults":527,"./attributes":388,"./style_defaults":403}],393:[function(_dereq_,module,exports){
85023
85360
  'use strict';
85024
85361
 
85025
85362
  module.exports = function eventData(out, pt, trace) {
@@ -85364,7 +85701,7 @@ module.exports = {
85364
85701
  }
85365
85702
  };
85366
85703
 
85367
- },{"../../plots/cartesian":348,"../scatter/marker_colorbar":517,"./arrays_to_calcdata":387,"./attributes":388,"./calc":389,"./cross_trace_calc":391,"./defaults":392,"./event_data":393,"./hover":395,"./layout_attributes":397,"./layout_defaults":398,"./plot":399,"./select":400,"./style":402}],397:[function(_dereq_,module,exports){
85704
+ },{"../../plots/cartesian":348,"../scatter/marker_colorbar":518,"./arrays_to_calcdata":387,"./attributes":388,"./calc":389,"./cross_trace_calc":391,"./defaults":392,"./event_data":393,"./hover":395,"./layout_attributes":397,"./layout_defaults":398,"./plot":399,"./select":400,"./style":402}],397:[function(_dereq_,module,exports){
85368
85705
  'use strict';
85369
85706
 
85370
85707
 
@@ -85879,7 +86216,7 @@ function appendBarText(gd, plotinfo, bar, cd, i, x0, x1, y0, y1, opts, makeOnCom
85879
86216
  }
85880
86217
 
85881
86218
  transform.fontSize = font.size;
85882
- recordMinTextSize(trace.type, transform, fullLayout);
86219
+ recordMinTextSize(trace.type === 'histogram' ? 'bar' : trace.type, transform, fullLayout);
85883
86220
  calcBar.transform = transform;
85884
86221
 
85885
86222
  transition(textSelection, fullLayout, opts, makeOnCompleteCallback)
@@ -86910,7 +87247,7 @@ module.exports = {
86910
87247
  }
86911
87248
  };
86912
87249
 
86913
- },{"../../components/color/attributes":156,"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../../plots/template_attributes":373,"../bar/attributes":388,"../scatter/attributes":499}],406:[function(_dereq_,module,exports){
87250
+ },{"../../components/color/attributes":156,"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../../plots/template_attributes":373,"../bar/attributes":388,"../scatter/attributes":500}],406:[function(_dereq_,module,exports){
86914
87251
  'use strict';
86915
87252
 
86916
87253
  var isNumeric = _dereq_('fast-isnumeric');
@@ -87891,7 +88228,7 @@ module.exports = {
87891
88228
  handlePointsDefaults: handlePointsDefaults
87892
88229
  };
87893
88230
 
87894
- },{"../../components/color":157,"../../lib":287,"../../plots/cartesian/axis_autotype":335,"../../registry":378,"../bar/defaults":392,"../scatter/period_defaults":519,"./attributes":405}],409:[function(_dereq_,module,exports){
88231
+ },{"../../components/color":157,"../../lib":287,"../../plots/cartesian/axis_autotype":335,"../../registry":378,"../bar/defaults":392,"../scatter/period_defaults":520,"./attributes":405}],409:[function(_dereq_,module,exports){
87895
88232
  'use strict';
87896
88233
 
87897
88234
  module.exports = function eventData(out, pt) {
@@ -88772,6 +89109,10 @@ module.exports = extendFlat({
88772
89109
  yhoverformat: axisHoverFormat('y'),
88773
89110
  zhoverformat: axisHoverFormat('z', 1),
88774
89111
  hovertemplate: heatmapAttrs.hovertemplate,
89112
+ texttemplate: extendFlat({}, heatmapAttrs.texttemplate, {
89113
+ }),
89114
+ textfont: extendFlat({}, heatmapAttrs.textfont, {
89115
+ }),
88775
89116
  hoverongaps: heatmapAttrs.hoverongaps,
88776
89117
  connectgaps: extendFlat({}, heatmapAttrs.connectgaps, {
88777
89118
  }),
@@ -88887,7 +89228,7 @@ module.exports = extendFlat({
88887
89228
  })
88888
89229
  );
88889
89230
 
88890
- },{"../../components/colorscale/attributes":164,"../../components/drawing/attributes":178,"../../constants/filter_ops":265,"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../../plots/font_attributes":365,"../heatmap/attributes":439,"../scatter/attributes":499}],418:[function(_dereq_,module,exports){
89231
+ },{"../../components/colorscale/attributes":164,"../../components/drawing/attributes":178,"../../constants/filter_ops":265,"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../../plots/font_attributes":365,"../heatmap/attributes":439,"../scatter/attributes":500}],418:[function(_dereq_,module,exports){
88891
89232
  'use strict';
88892
89233
 
88893
89234
  var Colorscale = _dereq_('../../components/colorscale');
@@ -89406,6 +89747,7 @@ var handlePeriodDefaults = _dereq_('../scatter/period_defaults');
89406
89747
  var handleConstraintDefaults = _dereq_('./constraint_defaults');
89407
89748
  var handleContoursDefaults = _dereq_('./contours_defaults');
89408
89749
  var handleStyleDefaults = _dereq_('./style_defaults');
89750
+ var handleHeatmapLabelDefaults = _dereq_('../heatmap/label_defaults');
89409
89751
  var attributes = _dereq_('./attributes');
89410
89752
 
89411
89753
 
@@ -89430,8 +89772,8 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
89430
89772
 
89431
89773
  coerce('text');
89432
89774
  coerce('hovertext');
89433
- coerce('hovertemplate');
89434
89775
  coerce('hoverongaps');
89776
+ coerce('hovertemplate');
89435
89777
 
89436
89778
  var isConstraint = (coerce('contours.type') === 'constraint');
89437
89779
  coerce('connectgaps', Lib.isArray1D(traceOut.z));
@@ -89442,9 +89784,16 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
89442
89784
  handleContoursDefaults(traceIn, traceOut, coerce, coerce2);
89443
89785
  handleStyleDefaults(traceIn, traceOut, coerce, layout);
89444
89786
  }
89787
+
89788
+ if(
89789
+ traceOut.contours &&
89790
+ traceOut.contours.coloring === 'heatmap'
89791
+ ) {
89792
+ handleHeatmapLabelDefaults(coerce, layout);
89793
+ }
89445
89794
  };
89446
89795
 
89447
- },{"../../lib":287,"../heatmap/xyz_defaults":453,"../scatter/period_defaults":519,"./attributes":417,"./constraint_defaults":422,"./contours_defaults":424,"./style_defaults":438}],427:[function(_dereq_,module,exports){
89796
+ },{"../../lib":287,"../heatmap/label_defaults":449,"../heatmap/xyz_defaults":454,"../scatter/period_defaults":520,"./attributes":417,"./constraint_defaults":422,"./contours_defaults":424,"./style_defaults":438}],427:[function(_dereq_,module,exports){
89448
89797
  'use strict';
89449
89798
 
89450
89799
  var Lib = _dereq_('../../lib');
@@ -90718,7 +91067,7 @@ function makeClipMask(cd0) {
90718
91067
  return z;
90719
91068
  }
90720
91069
 
90721
- },{"../../components/colorscale":169,"../../components/drawing":179,"../../lib":287,"../../lib/svg_text_utils":310,"../../plots/cartesian/axes":334,"../../plots/cartesian/set_convert":356,"../heatmap/plot":450,"./close_boundaries":419,"./constants":421,"./convert_to_constraints":425,"./empty_pathinfo":427,"./find_all_paths":429,"./make_crossings":434,"@plotly/d3":20}],436:[function(_dereq_,module,exports){
91070
+ },{"../../components/colorscale":169,"../../components/drawing":179,"../../lib":287,"../../lib/svg_text_utils":310,"../../plots/cartesian/axes":334,"../../plots/cartesian/set_convert":356,"../heatmap/plot":451,"./close_boundaries":419,"./constants":421,"./convert_to_constraints":425,"./empty_pathinfo":427,"./find_all_paths":429,"./make_crossings":434,"@plotly/d3":20}],436:[function(_dereq_,module,exports){
90722
91071
  'use strict';
90723
91072
 
90724
91073
  var Axes = _dereq_('../../plots/cartesian/axes');
@@ -90886,7 +91235,7 @@ module.exports = function style(gd) {
90886
91235
  heatmapStyle(gd);
90887
91236
  };
90888
91237
 
90889
- },{"../../components/drawing":179,"../heatmap/style":451,"./make_color_map":433,"@plotly/d3":20}],438:[function(_dereq_,module,exports){
91238
+ },{"../../components/drawing":179,"../heatmap/style":452,"./make_color_map":433,"@plotly/d3":20}],438:[function(_dereq_,module,exports){
90890
91239
  'use strict';
90891
91240
 
90892
91241
  var colorscaleDefaults = _dereq_('../../components/colorscale/defaults');
@@ -90927,8 +91276,10 @@ module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, layout,
90927
91276
 
90928
91277
  var scatterAttrs = _dereq_('../scatter/attributes');
90929
91278
  var baseAttrs = _dereq_('../../plots/attributes');
91279
+ var fontAttrs = _dereq_('../../plots/font_attributes');
90930
91280
  var axisHoverFormat = _dereq_('../../plots/cartesian/axis_format_attributes').axisHoverFormat;
90931
91281
  var hovertemplateAttrs = _dereq_('../../plots/template_attributes').hovertemplateAttrs;
91282
+ var texttemplateAttrs = _dereq_('../../plots/template_attributes').texttemplateAttrs;
90932
91283
  var colorScaleAttrs = _dereq_('../../components/colorscale/attributes');
90933
91284
 
90934
91285
  var extendFlat = _dereq_('../../lib/extend').extendFlat;
@@ -91007,6 +91358,19 @@ module.exports = extendFlat({
91007
91358
  zhoverformat: axisHoverFormat('z', 1),
91008
91359
 
91009
91360
  hovertemplate: hovertemplateAttrs(),
91361
+ texttemplate: texttemplateAttrs({
91362
+ arrayOk: false,
91363
+ editType: 'plot'
91364
+ }, {
91365
+ keys: ['x', 'y', 'z', 'text']
91366
+ }),
91367
+ textfont: fontAttrs({
91368
+ editType: 'plot',
91369
+ autoSize: true,
91370
+ autoColor: true,
91371
+ colorEditType: 'style',
91372
+ }),
91373
+
91010
91374
  showlegend: extendFlat({}, baseAttrs.showlegend, {dflt: false})
91011
91375
  }, {
91012
91376
  transforms: undefined
@@ -91014,7 +91378,7 @@ module.exports = extendFlat({
91014
91378
  colorScaleAttrs('', {cLetter: 'z', autoColorDflt: false})
91015
91379
  );
91016
91380
 
91017
- },{"../../components/colorscale/attributes":164,"../../lib/extend":281,"../../plots/attributes":330,"../../plots/cartesian/axis_format_attributes":337,"../../plots/template_attributes":373,"../scatter/attributes":499}],440:[function(_dereq_,module,exports){
91381
+ },{"../../components/colorscale/attributes":164,"../../lib/extend":281,"../../plots/attributes":330,"../../plots/cartesian/axis_format_attributes":337,"../../plots/font_attributes":365,"../../plots/template_attributes":373,"../scatter/attributes":500}],440:[function(_dereq_,module,exports){
91018
91382
  'use strict';
91019
91383
 
91020
91384
  var Registry = _dereq_('../../registry');
@@ -91215,7 +91579,7 @@ function dropZonBreaks(x, y, z) {
91215
91579
  return newZ;
91216
91580
  }
91217
91581
 
91218
- },{"../../components/colorscale/calc":165,"../../constants/numerical":267,"../../lib":287,"../../plots/cartesian/align_period":331,"../../plots/cartesian/axes":334,"../../registry":378,"../histogram2d/calc":468,"./clean_2d_array":441,"./convert_column_xyz":443,"./find_empties":445,"./interp2d":448,"./make_bound_array":449}],441:[function(_dereq_,module,exports){
91582
+ },{"../../components/colorscale/calc":165,"../../constants/numerical":267,"../../lib":287,"../../plots/cartesian/align_period":331,"../../plots/cartesian/axes":334,"../../registry":378,"../histogram2d/calc":469,"./clean_2d_array":441,"./convert_column_xyz":443,"./find_empties":445,"./interp2d":448,"./make_bound_array":450}],441:[function(_dereq_,module,exports){
91219
91583
  'use strict';
91220
91584
 
91221
91585
  var isNumeric = _dereq_('fast-isnumeric');
@@ -91379,6 +91743,7 @@ module.exports = function convertColumnData(trace, ax1, ax2, var1Name, var2Name,
91379
91743
  var Lib = _dereq_('../../lib');
91380
91744
 
91381
91745
  var handleXYZDefaults = _dereq_('./xyz_defaults');
91746
+ var handleHeatmapLabelDefaults = _dereq_('./label_defaults');
91382
91747
  var handlePeriodDefaults = _dereq_('../scatter/period_defaults');
91383
91748
  var handleStyleDefaults = _dereq_('./style_defaults');
91384
91749
  var colorscaleDefaults = _dereq_('../../components/colorscale/defaults');
@@ -91404,6 +91769,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
91404
91769
  coerce('hovertext');
91405
91770
  coerce('hovertemplate');
91406
91771
 
91772
+ handleHeatmapLabelDefaults(coerce, layout);
91407
91773
  handleStyleDefaults(traceIn, traceOut, coerce, layout);
91408
91774
 
91409
91775
  coerce('hoverongaps');
@@ -91412,7 +91778,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
91412
91778
  colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'});
91413
91779
  };
91414
91780
 
91415
- },{"../../components/colorscale/defaults":167,"../../lib":287,"../scatter/period_defaults":519,"./attributes":439,"./style_defaults":452,"./xyz_defaults":453}],445:[function(_dereq_,module,exports){
91781
+ },{"../../components/colorscale/defaults":167,"../../lib":287,"../scatter/period_defaults":520,"./attributes":439,"./label_defaults":449,"./style_defaults":453,"./xyz_defaults":454}],445:[function(_dereq_,module,exports){
91416
91782
  'use strict';
91417
91783
 
91418
91784
  var maxRowLength = _dereq_('../../lib').maxRowLength;
@@ -91662,7 +92028,7 @@ module.exports = {
91662
92028
  }
91663
92029
  };
91664
92030
 
91665
- },{"../../plots/cartesian":348,"./attributes":439,"./calc":440,"./colorbar":442,"./defaults":444,"./hover":446,"./plot":450,"./style":451}],448:[function(_dereq_,module,exports){
92031
+ },{"../../plots/cartesian":348,"./attributes":439,"./calc":440,"./colorbar":442,"./defaults":444,"./hover":446,"./plot":451,"./style":452}],448:[function(_dereq_,module,exports){
91666
92032
  'use strict';
91667
92033
 
91668
92034
  var Lib = _dereq_('../../lib');
@@ -91790,6 +92156,21 @@ function iterateInterp2d(z, emptyPoints, overshoot) {
91790
92156
  },{"../../lib":287}],449:[function(_dereq_,module,exports){
91791
92157
  'use strict';
91792
92158
 
92159
+ var Lib = _dereq_('../../lib');
92160
+
92161
+ module.exports = function handleHeatmapLabelDefaults(coerce, layout) {
92162
+ coerce('texttemplate');
92163
+
92164
+ var fontDflt = Lib.extendFlat({}, layout.font, {
92165
+ color: 'auto',
92166
+ size: 'auto'
92167
+ });
92168
+ Lib.coerceFont(coerce, 'textfont', fontDflt);
92169
+ };
92170
+
92171
+ },{"../../lib":287}],450:[function(_dereq_,module,exports){
92172
+ 'use strict';
92173
+
91793
92174
  var Registry = _dereq_('../../registry');
91794
92175
  var isArrayOrTypedArray = _dereq_('../../lib').isArrayOrTypedArray;
91795
92176
 
@@ -91867,16 +92248,34 @@ module.exports = function makeBoundArray(trace, arrayIn, v0In, dvIn, numbricks,
91867
92248
  return arrayOut;
91868
92249
  };
91869
92250
 
91870
- },{"../../lib":287,"../../registry":378}],450:[function(_dereq_,module,exports){
92251
+ },{"../../lib":287,"../../registry":378}],451:[function(_dereq_,module,exports){
91871
92252
  'use strict';
91872
92253
 
91873
92254
  var d3 = _dereq_('@plotly/d3');
91874
92255
  var tinycolor = _dereq_('tinycolor2');
91875
92256
 
91876
92257
  var Registry = _dereq_('../../registry');
92258
+ var Drawing = _dereq_('../../components/drawing');
92259
+ var Axes = _dereq_('../../plots/cartesian/axes');
91877
92260
  var Lib = _dereq_('../../lib');
92261
+ var svgTextUtils = _dereq_('../../lib/svg_text_utils');
92262
+ var formatLabels = _dereq_('../scatter/format_labels');
92263
+ var Color = _dereq_('../../components/color');
92264
+ var extractOpts = _dereq_('../../components/colorscale').extractOpts;
91878
92265
  var makeColorScaleFuncFromTrace = _dereq_('../../components/colorscale').makeColorScaleFuncFromTrace;
91879
92266
  var xmlnsNamespaces = _dereq_('../../constants/xmlns_namespaces');
92267
+ var alignmentConstants = _dereq_('../../constants/alignment');
92268
+ var LINE_SPACING = alignmentConstants.LINE_SPACING;
92269
+
92270
+ var labelClass = 'heatmap-label';
92271
+
92272
+ function selectLabels(plotGroup) {
92273
+ return plotGroup.selectAll('g.' + labelClass);
92274
+ }
92275
+
92276
+ function removeLabels(plotGroup) {
92277
+ selectLabels(plotGroup).remove();
92278
+ }
91880
92279
 
91881
92280
  module.exports = function(gd, plotinfo, cdheatmaps, heatmapLayer) {
91882
92281
  var xa = plotinfo.xaxis;
@@ -91886,6 +92285,8 @@ module.exports = function(gd, plotinfo, cdheatmaps, heatmapLayer) {
91886
92285
  var plotGroup = d3.select(this);
91887
92286
  var cd0 = cd[0];
91888
92287
  var trace = cd0.trace;
92288
+ var xGap = trace.xgap || 0;
92289
+ var yGap = trace.ygap || 0;
91889
92290
 
91890
92291
  var z = cd0.z;
91891
92292
  var x = cd0.x;
@@ -91901,7 +92302,7 @@ module.exports = function(gd, plotinfo, cdheatmaps, heatmapLayer) {
91901
92302
  var xrev = false;
91902
92303
  var yrev = false;
91903
92304
 
91904
- var left, right, temp, top, bottom, i;
92305
+ var left, right, temp, top, bottom, i, j, k;
91905
92306
 
91906
92307
  // TODO: if there are multiple overlapping categorical heatmaps,
91907
92308
  // or if we allow category sorting, then the categories may not be
@@ -91982,6 +92383,8 @@ module.exports = function(gd, plotinfo, cdheatmaps, heatmapLayer) {
91982
92383
  if(isOffScreen) {
91983
92384
  var noImage = plotGroup.selectAll('image').data([]);
91984
92385
  noImage.exit().remove();
92386
+
92387
+ removeLabels(plotGroup);
91985
92388
  return;
91986
92389
  }
91987
92390
 
@@ -92037,7 +92440,7 @@ module.exports = function(gd, plotinfo, cdheatmaps, heatmapLayer) {
92037
92440
  var gcount = 0;
92038
92441
  var bcount = 0;
92039
92442
 
92040
- var xb, j, xi, v, row, c;
92443
+ var xb, xi, v, row, c;
92041
92444
 
92042
92445
  function setColor(v, pixsize) {
92043
92446
  if(v !== undefined) {
@@ -92148,8 +92551,6 @@ module.exports = function(gd, plotinfo, cdheatmaps, heatmapLayer) {
92148
92551
  } else { // zsmooth = false -> filling potentially large bricks works fastest with fillRect
92149
92552
  // gaps do not need to be exact integers, but if they *are* we will get
92150
92553
  // cleaner edges by rounding at least one edge
92151
- var xGap = trace.xgap;
92152
- var yGap = trace.ygap;
92153
92554
  var xGapLeft = Math.floor(xGap / 2);
92154
92555
  var yGapTop = Math.floor(yGap / 2);
92155
92556
 
@@ -92202,6 +92603,187 @@ module.exports = function(gd, plotinfo, cdheatmaps, heatmapLayer) {
92202
92603
  y: top,
92203
92604
  'xlink:href': canvas.toDataURL('image/png')
92204
92605
  });
92606
+
92607
+ removeLabels(plotGroup);
92608
+
92609
+ var texttemplate = trace.texttemplate;
92610
+ if(texttemplate) {
92611
+ // dummy axis for formatting the z value
92612
+ var cOpts = extractOpts(trace);
92613
+ var dummyAx = {
92614
+ type: 'linear',
92615
+ range: [cOpts.min, cOpts.max],
92616
+ _separators: xa._separators,
92617
+ _numFormat: xa._numFormat
92618
+ };
92619
+
92620
+ var aHistogram2dContour = trace.type === 'histogram2dcontour';
92621
+ var aContour = trace.type === 'contour';
92622
+ var iStart = aContour ? 1 : 0;
92623
+ var iStop = aContour ? m - 1 : m;
92624
+ var jStart = aContour ? 1 : 0;
92625
+ var jStop = aContour ? n - 1 : n;
92626
+
92627
+ var textData = [];
92628
+ for(i = iStart; i < iStop; i++) {
92629
+ var yVal;
92630
+ if(aContour) {
92631
+ yVal = cd0.y[i];
92632
+ } else if(aHistogram2dContour) {
92633
+ if(i === 0 || i === m - 1) continue;
92634
+ yVal = cd0.y[i];
92635
+ } else if(cd0.yCenter) {
92636
+ yVal = cd0.yCenter[i];
92637
+ } else {
92638
+ if(i + 1 === m && cd0.y[i + 1] === undefined) continue;
92639
+ yVal = (cd0.y[i] + cd0.y[i + 1]) / 2;
92640
+ }
92641
+
92642
+ var _y = Math.round(ya.c2p(yVal));
92643
+ if(0 > _y || _y > ya._length) continue;
92644
+
92645
+ for(j = jStart; j < jStop; j++) {
92646
+ var xVal;
92647
+ if(aContour) {
92648
+ xVal = cd0.x[j];
92649
+ } else if(aHistogram2dContour) {
92650
+ if(j === 0 || j === n - 1) continue;
92651
+ xVal = cd0.x[j];
92652
+ } else if(cd0.xCenter) {
92653
+ xVal = cd0.xCenter[j];
92654
+ } else {
92655
+ if(j + 1 === n && cd0.x[j + 1] === undefined) continue;
92656
+ xVal = (cd0.x[j] + cd0.x[j + 1]) / 2;
92657
+ }
92658
+
92659
+ var _x = Math.round(xa.c2p(xVal));
92660
+ if(0 > _x || _x > xa._length) continue;
92661
+
92662
+ var obj = formatLabels({
92663
+ x: xVal,
92664
+ y: yVal
92665
+ }, trace, gd._fullLayout);
92666
+
92667
+ obj.x = xVal;
92668
+ obj.y = yVal;
92669
+
92670
+ var zVal = cd0.z[i][j];
92671
+ if(zVal === undefined) {
92672
+ obj.z = '';
92673
+ obj.zLabel = '';
92674
+ } else {
92675
+ obj.z = zVal;
92676
+ obj.zLabel = Axes.tickText(dummyAx, zVal, 'hover').text;
92677
+ }
92678
+
92679
+ var theText = cd0.text && cd0.text[i] && cd0.text[i][j];
92680
+ if(theText === undefined || theText === false) theText = '';
92681
+ obj.text = theText;
92682
+
92683
+ var _t = Lib.texttemplateString(texttemplate, obj, gd._fullLayout._d3locale, obj, trace._meta || {});
92684
+ if(!_t) continue;
92685
+
92686
+ var lines = _t.split('<br>');
92687
+ var nL = lines.length;
92688
+ var nC = 0;
92689
+ for(k = 0; k < nL; k++) {
92690
+ nC = Math.max(nC, lines[k].length);
92691
+ }
92692
+
92693
+ textData.push({
92694
+ l: nL, // number of lines
92695
+ c: nC, // maximum number of chars in a line
92696
+ t: _t, // text
92697
+ x: _x,
92698
+ y: _y,
92699
+ z: zVal
92700
+ });
92701
+ }
92702
+ }
92703
+
92704
+ var font = trace.textfont;
92705
+ var fontFamily = font.family;
92706
+ var fontSize = font.size;
92707
+ var globalFontSize = gd._fullLayout.font.size;
92708
+
92709
+ if(!fontSize || fontSize === 'auto') {
92710
+ var minW = Infinity;
92711
+ var minH = Infinity;
92712
+ var maxL = 0;
92713
+ var maxC = 0;
92714
+
92715
+ for(k = 0; k < textData.length; k++) {
92716
+ var d = textData[k];
92717
+ maxL = Math.max(maxL, d.l);
92718
+ maxC = Math.max(maxC, d.c);
92719
+
92720
+ if(k < textData.length - 1) {
92721
+ var nextD = textData[k + 1];
92722
+ var dx = Math.abs(nextD.x - d.x);
92723
+ var dy = Math.abs(nextD.y - d.y);
92724
+
92725
+ if(dx) minW = Math.min(minW, dx);
92726
+ if(dy) minH = Math.min(minH, dy);
92727
+ }
92728
+ }
92729
+
92730
+ if(
92731
+ !isFinite(minW) ||
92732
+ !isFinite(minH)
92733
+ ) {
92734
+ fontSize = globalFontSize;
92735
+ } else {
92736
+ minW -= xGap;
92737
+ minH -= yGap;
92738
+
92739
+ minW /= maxC;
92740
+ minH /= maxL;
92741
+
92742
+ minW /= LINE_SPACING / 2;
92743
+ minH /= LINE_SPACING;
92744
+
92745
+ fontSize = Math.min(
92746
+ Math.floor(minW),
92747
+ Math.floor(minH),
92748
+ globalFontSize
92749
+ );
92750
+ }
92751
+ }
92752
+ if(fontSize <= 0 || !isFinite(fontSize)) return;
92753
+
92754
+ var xFn = function(d) { return d.x; };
92755
+ var yFn = function(d) {
92756
+ return d.y - fontSize * ((d.l * LINE_SPACING) / 2 - 1);
92757
+ };
92758
+
92759
+ var labels = selectLabels(plotGroup).data(textData);
92760
+
92761
+ labels
92762
+ .enter()
92763
+ .append('g')
92764
+ .classed(labelClass, 1)
92765
+ .append('text')
92766
+ .attr('text-anchor', 'middle')
92767
+ .each(function(d) {
92768
+ var thisLabel = d3.select(this);
92769
+
92770
+ var fontColor = font.color;
92771
+ if(!fontColor || fontColor === 'auto') {
92772
+ fontColor = Color.contrast(
92773
+ 'rgba(' +
92774
+ sclFunc(d.z).join() +
92775
+ ')'
92776
+ );
92777
+ }
92778
+
92779
+ thisLabel
92780
+ .attr('data-notex', 1)
92781
+ .call(svgTextUtils.positionText, xFn(d), yFn(d))
92782
+ .call(Drawing.font, fontFamily, fontSize, fontColor)
92783
+ .text(d.t)
92784
+ .call(svgTextUtils.convertToTspans, gd);
92785
+ });
92786
+ }
92205
92787
  });
92206
92788
  };
92207
92789
 
@@ -92263,7 +92845,7 @@ function putColor(pixels, pxIndex, c) {
92263
92845
  pixels[pxIndex + 3] = Math.round(c[3] * 255);
92264
92846
  }
92265
92847
 
92266
- },{"../../components/colorscale":169,"../../constants/xmlns_namespaces":268,"../../lib":287,"../../registry":378,"@plotly/d3":20,"tinycolor2":121}],451:[function(_dereq_,module,exports){
92848
+ },{"../../components/color":157,"../../components/colorscale":169,"../../components/drawing":179,"../../constants/alignment":262,"../../constants/xmlns_namespaces":268,"../../lib":287,"../../lib/svg_text_utils":310,"../../plots/cartesian/axes":334,"../../registry":378,"../scatter/format_labels":509,"@plotly/d3":20,"tinycolor2":121}],452:[function(_dereq_,module,exports){
92267
92849
  'use strict';
92268
92850
 
92269
92851
  var d3 = _dereq_('@plotly/d3');
@@ -92275,7 +92857,7 @@ module.exports = function style(gd) {
92275
92857
  });
92276
92858
  };
92277
92859
 
92278
- },{"@plotly/d3":20}],452:[function(_dereq_,module,exports){
92860
+ },{"@plotly/d3":20}],453:[function(_dereq_,module,exports){
92279
92861
  'use strict';
92280
92862
 
92281
92863
  module.exports = function handleStyleDefaults(traceIn, traceOut, coerce) {
@@ -92289,7 +92871,7 @@ module.exports = function handleStyleDefaults(traceIn, traceOut, coerce) {
92289
92871
  coerce('zhoverformat');
92290
92872
  };
92291
92873
 
92292
- },{}],453:[function(_dereq_,module,exports){
92874
+ },{}],454:[function(_dereq_,module,exports){
92293
92875
  'use strict';
92294
92876
 
92295
92877
  var isNumeric = _dereq_('fast-isnumeric');
@@ -92380,12 +92962,14 @@ function isValidZ(z) {
92380
92962
  return (allRowsAreArrays && oneRowIsFilled && hasOneNumber);
92381
92963
  }
92382
92964
 
92383
- },{"../../lib":287,"../../registry":378,"fast-isnumeric":33}],454:[function(_dereq_,module,exports){
92965
+ },{"../../lib":287,"../../registry":378,"fast-isnumeric":33}],455:[function(_dereq_,module,exports){
92384
92966
  'use strict';
92385
92967
 
92386
92968
  var barAttrs = _dereq_('../bar/attributes');
92387
92969
  var axisHoverFormat = _dereq_('../../plots/cartesian/axis_format_attributes').axisHoverFormat;
92388
92970
  var hovertemplateAttrs = _dereq_('../../plots/template_attributes').hovertemplateAttrs;
92971
+ var texttemplateAttrs = _dereq_('../../plots/template_attributes').texttemplateAttrs;
92972
+ var fontAttrs = _dereq_('../../plots/font_attributes');
92389
92973
  var makeBinAttrs = _dereq_('./bin_attributes');
92390
92974
  var constants = _dereq_('./constants');
92391
92975
  var extendFlat = _dereq_('../../lib/extend').extendFlat;
@@ -92480,6 +93064,41 @@ module.exports = {
92480
93064
  keys: constants.eventDataKeys
92481
93065
  }),
92482
93066
 
93067
+ texttemplate: texttemplateAttrs({
93068
+ arrayOk: false,
93069
+ editType: 'plot'
93070
+ }, {
93071
+ keys: ['label', 'value']
93072
+ }),
93073
+
93074
+ textposition: extendFlat({}, barAttrs.textposition, {
93075
+ arrayOk: false
93076
+ }),
93077
+
93078
+ textfont: fontAttrs({
93079
+ arrayOk: false,
93080
+ editType: 'plot',
93081
+ colorEditType: 'style',
93082
+ }),
93083
+
93084
+ outsidetextfont: fontAttrs({
93085
+ arrayOk: false,
93086
+ editType: 'plot',
93087
+ colorEditType: 'style',
93088
+ }),
93089
+
93090
+ insidetextfont: fontAttrs({
93091
+ arrayOk: false,
93092
+ editType: 'plot',
93093
+ colorEditType: 'style',
93094
+ }),
93095
+
93096
+ insidetextanchor: barAttrs.insidetextanchor,
93097
+
93098
+ textangle: barAttrs.textangle,
93099
+ cliponaxis: barAttrs.cliponaxis,
93100
+ constraintext: barAttrs.constraintext,
93101
+
92483
93102
  marker: barAttrs.marker,
92484
93103
 
92485
93104
  offsetgroup: barAttrs.offsetgroup,
@@ -92493,7 +93112,7 @@ module.exports = {
92493
93112
  }
92494
93113
  };
92495
93114
 
92496
- },{"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../../plots/template_attributes":373,"../bar/attributes":388,"./bin_attributes":456,"./constants":460}],455:[function(_dereq_,module,exports){
93115
+ },{"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../../plots/font_attributes":365,"../../plots/template_attributes":373,"../bar/attributes":388,"./bin_attributes":457,"./constants":461}],456:[function(_dereq_,module,exports){
92497
93116
  'use strict';
92498
93117
 
92499
93118
 
@@ -92509,7 +93128,7 @@ module.exports = function doAvg(size, counts) {
92509
93128
  return total;
92510
93129
  };
92511
93130
 
92512
- },{}],456:[function(_dereq_,module,exports){
93131
+ },{}],457:[function(_dereq_,module,exports){
92513
93132
  'use strict';
92514
93133
 
92515
93134
  module.exports = function makeBinAttrs(axLetter, match) {
@@ -92530,7 +93149,7 @@ module.exports = function makeBinAttrs(axLetter, match) {
92530
93149
  };
92531
93150
  };
92532
93151
 
92533
- },{}],457:[function(_dereq_,module,exports){
93152
+ },{}],458:[function(_dereq_,module,exports){
92534
93153
  'use strict';
92535
93154
 
92536
93155
  var isNumeric = _dereq_('fast-isnumeric');
@@ -92595,7 +93214,7 @@ module.exports = {
92595
93214
  }
92596
93215
  };
92597
93216
 
92598
- },{"fast-isnumeric":33}],458:[function(_dereq_,module,exports){
93217
+ },{"fast-isnumeric":33}],459:[function(_dereq_,module,exports){
92599
93218
  'use strict';
92600
93219
 
92601
93220
  var numConstants = _dereq_('../../constants/numerical');
@@ -92762,7 +93381,7 @@ function dateParts(v, pa, calendar) {
92762
93381
  return parts;
92763
93382
  }
92764
93383
 
92765
- },{"../../constants/numerical":267,"../../plots/cartesian/axes":334}],459:[function(_dereq_,module,exports){
93384
+ },{"../../constants/numerical":267,"../../plots/cartesian/axes":334}],460:[function(_dereq_,module,exports){
92766
93385
  'use strict';
92767
93386
 
92768
93387
  var isNumeric = _dereq_('fast-isnumeric');
@@ -93333,14 +93952,14 @@ module.exports = {
93333
93952
  calcAllAutoBins: calcAllAutoBins
93334
93953
  };
93335
93954
 
93336
- },{"../../lib":287,"../../plots/cartesian/axes":334,"../../registry":378,"../bar/arrays_to_calcdata":387,"./average":455,"./bin_functions":457,"./bin_label_vals":458,"./norm_functions":466,"fast-isnumeric":33}],460:[function(_dereq_,module,exports){
93955
+ },{"../../lib":287,"../../plots/cartesian/axes":334,"../../registry":378,"../bar/arrays_to_calcdata":387,"./average":456,"./bin_functions":458,"./bin_label_vals":459,"./norm_functions":467,"fast-isnumeric":33}],461:[function(_dereq_,module,exports){
93337
93956
  'use strict';
93338
93957
 
93339
93958
  module.exports = {
93340
93959
  eventDataKeys: ['binNumber']
93341
93960
  };
93342
93961
 
93343
- },{}],461:[function(_dereq_,module,exports){
93962
+ },{}],462:[function(_dereq_,module,exports){
93344
93963
  'use strict';
93345
93964
 
93346
93965
  var Lib = _dereq_('../../lib');
@@ -93609,13 +94228,14 @@ module.exports = function crossTraceDefaults(fullData, fullLayout) {
93609
94228
  }
93610
94229
  };
93611
94230
 
93612
- },{"../../lib":287,"../../plots/cartesian/axis_ids":338,"../../plots/cartesian/constraints":342,"../../registry":378,"../bar/defaults":392}],462:[function(_dereq_,module,exports){
94231
+ },{"../../lib":287,"../../plots/cartesian/axis_ids":338,"../../plots/cartesian/constraints":342,"../../registry":378,"../bar/defaults":392}],463:[function(_dereq_,module,exports){
93613
94232
  'use strict';
93614
94233
 
93615
94234
  var Registry = _dereq_('../../registry');
93616
94235
  var Lib = _dereq_('../../lib');
93617
94236
  var Color = _dereq_('../../components/color');
93618
94237
 
94238
+ var handleText = _dereq_('../bar/defaults').handleText;
93619
94239
  var handleStyleDefaults = _dereq_('../bar/style_defaults');
93620
94240
  var attributes = _dereq_('./attributes');
93621
94241
 
@@ -93634,6 +94254,16 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
93634
94254
  }
93635
94255
 
93636
94256
  coerce('text');
94257
+ var textposition = coerce('textposition');
94258
+ handleText(traceIn, traceOut, layout, coerce, textposition, {
94259
+ moduleHasSelected: true,
94260
+ moduleHasUnselected: true,
94261
+ moduleHasConstrain: true,
94262
+ moduleHasCliponaxis: true,
94263
+ moduleHasTextangle: true,
94264
+ moduleHasInsideanchor: true
94265
+ });
94266
+
93637
94267
  coerce('hovertext');
93638
94268
  coerce('hovertemplate');
93639
94269
  coerce('xhoverformat');
@@ -93677,7 +94307,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
93677
94307
  errorBarsSupplyDefaults(traceIn, traceOut, lineColor || Color.defaultLine, {axis: 'x', inherit: 'y'});
93678
94308
  };
93679
94309
 
93680
- },{"../../components/color":157,"../../lib":287,"../../registry":378,"../bar/style_defaults":403,"./attributes":454}],463:[function(_dereq_,module,exports){
94310
+ },{"../../components/color":157,"../../lib":287,"../../registry":378,"../bar/defaults":392,"../bar/style_defaults":403,"./attributes":455}],464:[function(_dereq_,module,exports){
93681
94311
  'use strict';
93682
94312
 
93683
94313
  module.exports = function eventData(out, pt, trace, cd, pointNumber) {
@@ -93718,7 +94348,7 @@ module.exports = function eventData(out, pt, trace, cd, pointNumber) {
93718
94348
  return out;
93719
94349
  };
93720
94350
 
93721
- },{}],464:[function(_dereq_,module,exports){
94351
+ },{}],465:[function(_dereq_,module,exports){
93722
94352
  'use strict';
93723
94353
 
93724
94354
  var barHover = _dereq_('../bar/hover').hoverPoints;
@@ -93742,7 +94372,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode, opts) {
93742
94372
  return pts;
93743
94373
  };
93744
94374
 
93745
- },{"../../plots/cartesian/axes":334,"../bar/hover":395}],465:[function(_dereq_,module,exports){
94375
+ },{"../../plots/cartesian/axes":334,"../bar/hover":395}],466:[function(_dereq_,module,exports){
93746
94376
  'use strict';
93747
94377
 
93748
94378
  /**
@@ -93783,7 +94413,7 @@ module.exports = {
93783
94413
  }
93784
94414
  };
93785
94415
 
93786
- },{"../../plots/cartesian":348,"../bar/cross_trace_calc":391,"../bar/layout_attributes":397,"../bar/layout_defaults":398,"../bar/plot":399,"../bar/select":400,"../bar/style":402,"../scatter/marker_colorbar":517,"./attributes":454,"./calc":459,"./cross_trace_defaults":461,"./defaults":462,"./event_data":463,"./hover":464}],466:[function(_dereq_,module,exports){
94416
+ },{"../../plots/cartesian":348,"../bar/cross_trace_calc":391,"../bar/layout_attributes":397,"../bar/layout_defaults":398,"../bar/plot":399,"../bar/select":400,"../bar/style":402,"../scatter/marker_colorbar":518,"./attributes":455,"./calc":460,"./cross_trace_defaults":462,"./defaults":463,"./event_data":464,"./hover":465}],467:[function(_dereq_,module,exports){
93787
94417
  'use strict';
93788
94418
 
93789
94419
 
@@ -93809,7 +94439,7 @@ module.exports = {
93809
94439
  }
93810
94440
  };
93811
94441
 
93812
- },{}],467:[function(_dereq_,module,exports){
94442
+ },{}],468:[function(_dereq_,module,exports){
93813
94443
  'use strict';
93814
94444
 
93815
94445
  var histogramAttrs = _dereq_('../histogram/attributes');
@@ -93818,6 +94448,7 @@ var heatmapAttrs = _dereq_('../heatmap/attributes');
93818
94448
  var baseAttrs = _dereq_('../../plots/attributes');
93819
94449
  var axisHoverFormat = _dereq_('../../plots/cartesian/axis_format_attributes').axisHoverFormat;
93820
94450
  var hovertemplateAttrs = _dereq_('../../plots/template_attributes').hovertemplateAttrs;
94451
+ var texttemplateAttrs = _dereq_('../../plots/template_attributes').texttemplateAttrs;
93821
94452
  var colorScaleAttrs = _dereq_('../../components/colorscale/attributes');
93822
94453
 
93823
94454
  var extendFlat = _dereq_('../../lib/extend').extendFlat;
@@ -93862,12 +94493,19 @@ module.exports = extendFlat(
93862
94493
  yhoverformat: axisHoverFormat('y'),
93863
94494
  zhoverformat: axisHoverFormat('z', 1),
93864
94495
  hovertemplate: hovertemplateAttrs({}, {keys: 'z'}),
94496
+ texttemplate: texttemplateAttrs({
94497
+ arrayOk: false,
94498
+ editType: 'plot'
94499
+ }, {
94500
+ keys: 'z'
94501
+ }),
94502
+ textfont: heatmapAttrs.textfont,
93865
94503
  showlegend: extendFlat({}, baseAttrs.showlegend, {dflt: false})
93866
94504
  },
93867
94505
  colorScaleAttrs('', {cLetter: 'z', autoColorDflt: false})
93868
94506
  );
93869
94507
 
93870
- },{"../../components/colorscale/attributes":164,"../../lib/extend":281,"../../plots/attributes":330,"../../plots/cartesian/axis_format_attributes":337,"../../plots/template_attributes":373,"../heatmap/attributes":439,"../histogram/attributes":454,"../histogram/bin_attributes":456}],468:[function(_dereq_,module,exports){
94508
+ },{"../../components/colorscale/attributes":164,"../../lib/extend":281,"../../plots/attributes":330,"../../plots/cartesian/axis_format_attributes":337,"../../plots/template_attributes":373,"../heatmap/attributes":439,"../histogram/attributes":455,"../histogram/bin_attributes":457}],469:[function(_dereq_,module,exports){
93871
94509
  'use strict';
93872
94510
 
93873
94511
  var Lib = _dereq_('../../lib');
@@ -94078,7 +94716,7 @@ function getRanges(edges, uniqueVals, gapLow, gapHigh, ax, calendar) {
94078
94716
  return out;
94079
94717
  }
94080
94718
 
94081
- },{"../../lib":287,"../../plots/cartesian/axes":334,"../histogram/average":455,"../histogram/bin_functions":457,"../histogram/bin_label_vals":458,"../histogram/calc":459,"../histogram/norm_functions":466}],469:[function(_dereq_,module,exports){
94719
+ },{"../../lib":287,"../../plots/cartesian/axes":334,"../histogram/average":456,"../histogram/bin_functions":458,"../histogram/bin_label_vals":459,"../histogram/calc":460,"../histogram/norm_functions":467}],470:[function(_dereq_,module,exports){
94082
94720
  'use strict';
94083
94721
 
94084
94722
  var Lib = _dereq_('../../lib');
@@ -94086,6 +94724,7 @@ var Lib = _dereq_('../../lib');
94086
94724
  var handleSampleDefaults = _dereq_('./sample_defaults');
94087
94725
  var handleStyleDefaults = _dereq_('../heatmap/style_defaults');
94088
94726
  var colorscaleDefaults = _dereq_('../../components/colorscale/defaults');
94727
+ var handleHeatmapLabelDefaults = _dereq_('../heatmap/label_defaults');
94089
94728
  var attributes = _dereq_('./attributes');
94090
94729
 
94091
94730
 
@@ -94100,11 +94739,14 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
94100
94739
  handleStyleDefaults(traceIn, traceOut, coerce, layout);
94101
94740
  colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'});
94102
94741
  coerce('hovertemplate');
94742
+
94743
+ handleHeatmapLabelDefaults(coerce, layout);
94744
+
94103
94745
  coerce('xhoverformat');
94104
94746
  coerce('yhoverformat');
94105
94747
  };
94106
94748
 
94107
- },{"../../components/colorscale/defaults":167,"../../lib":287,"../heatmap/style_defaults":452,"./attributes":467,"./sample_defaults":472}],470:[function(_dereq_,module,exports){
94749
+ },{"../../components/colorscale/defaults":167,"../../lib":287,"../heatmap/label_defaults":449,"../heatmap/style_defaults":453,"./attributes":468,"./sample_defaults":473}],471:[function(_dereq_,module,exports){
94108
94750
  'use strict';
94109
94751
 
94110
94752
  var heatmapHover = _dereq_('../heatmap/hover');
@@ -94130,7 +94772,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode, opts) {
94130
94772
  return pts;
94131
94773
  };
94132
94774
 
94133
- },{"../../plots/cartesian/axes":334,"../heatmap/hover":446}],471:[function(_dereq_,module,exports){
94775
+ },{"../../plots/cartesian/axes":334,"../heatmap/hover":446}],472:[function(_dereq_,module,exports){
94134
94776
  'use strict';
94135
94777
 
94136
94778
  module.exports = {
@@ -94153,7 +94795,7 @@ module.exports = {
94153
94795
  }
94154
94796
  };
94155
94797
 
94156
- },{"../../plots/cartesian":348,"../heatmap/calc":440,"../heatmap/colorbar":442,"../heatmap/plot":450,"../heatmap/style":451,"../histogram/cross_trace_defaults":461,"../histogram/event_data":463,"./attributes":467,"./defaults":469,"./hover":470}],472:[function(_dereq_,module,exports){
94798
+ },{"../../plots/cartesian":348,"../heatmap/calc":440,"../heatmap/colorbar":442,"../heatmap/plot":451,"../heatmap/style":452,"../histogram/cross_trace_defaults":462,"../histogram/event_data":464,"./attributes":468,"./defaults":470,"./hover":471}],473:[function(_dereq_,module,exports){
94157
94799
  'use strict';
94158
94800
 
94159
94801
  var Registry = _dereq_('../../registry');
@@ -94190,7 +94832,7 @@ module.exports = function handleSampleDefaults(traceIn, traceOut, coerce, layout
94190
94832
  coerce('autobiny');
94191
94833
  };
94192
94834
 
94193
- },{"../../lib":287,"../../registry":378}],473:[function(_dereq_,module,exports){
94835
+ },{"../../lib":287,"../../registry":378}],474:[function(_dereq_,module,exports){
94194
94836
  'use strict';
94195
94837
 
94196
94838
  var histogram2dAttrs = _dereq_('../histogram2d/attributes');
@@ -94234,7 +94876,9 @@ module.exports = extendFlat({
94234
94876
  xhoverformat: axisHoverFormat('x'),
94235
94877
  yhoverformat: axisHoverFormat('y'),
94236
94878
  zhoverformat: axisHoverFormat('z', 1),
94237
- hovertemplate: histogram2dAttrs.hovertemplate
94879
+ hovertemplate: histogram2dAttrs.hovertemplate,
94880
+ texttemplate: contourAttrs.texttemplate,
94881
+ textfont: contourAttrs.textfont
94238
94882
  },
94239
94883
  colorScaleAttrs('', {
94240
94884
  cLetter: 'z',
@@ -94242,7 +94886,7 @@ module.exports = extendFlat({
94242
94886
  })
94243
94887
  );
94244
94888
 
94245
- },{"../../components/colorscale/attributes":164,"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../contour/attributes":417,"../histogram2d/attributes":467}],474:[function(_dereq_,module,exports){
94889
+ },{"../../components/colorscale/attributes":164,"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../contour/attributes":417,"../histogram2d/attributes":468}],475:[function(_dereq_,module,exports){
94246
94890
  'use strict';
94247
94891
 
94248
94892
  var Lib = _dereq_('../../lib');
@@ -94250,6 +94894,7 @@ var Lib = _dereq_('../../lib');
94250
94894
  var handleSampleDefaults = _dereq_('../histogram2d/sample_defaults');
94251
94895
  var handleContoursDefaults = _dereq_('../contour/contours_defaults');
94252
94896
  var handleStyleDefaults = _dereq_('../contour/style_defaults');
94897
+ var handleHeatmapLabelDefaults = _dereq_('../heatmap/label_defaults');
94253
94898
  var attributes = _dereq_('./attributes');
94254
94899
 
94255
94900
 
@@ -94267,12 +94912,18 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
94267
94912
 
94268
94913
  handleContoursDefaults(traceIn, traceOut, coerce, coerce2);
94269
94914
  handleStyleDefaults(traceIn, traceOut, coerce, layout);
94270
- coerce('hovertemplate');
94271
94915
  coerce('xhoverformat');
94272
94916
  coerce('yhoverformat');
94917
+ coerce('hovertemplate');
94918
+ if(
94919
+ traceOut.contours &&
94920
+ traceOut.contours.coloring === 'heatmap'
94921
+ ) {
94922
+ handleHeatmapLabelDefaults(coerce, layout);
94923
+ }
94273
94924
  };
94274
94925
 
94275
- },{"../../lib":287,"../contour/contours_defaults":424,"../contour/style_defaults":438,"../histogram2d/sample_defaults":472,"./attributes":473}],475:[function(_dereq_,module,exports){
94926
+ },{"../../lib":287,"../contour/contours_defaults":424,"../contour/style_defaults":438,"../heatmap/label_defaults":449,"../histogram2d/sample_defaults":473,"./attributes":474}],476:[function(_dereq_,module,exports){
94276
94927
  'use strict';
94277
94928
 
94278
94929
  module.exports = {
@@ -94294,7 +94945,7 @@ module.exports = {
94294
94945
  }
94295
94946
  };
94296
94947
 
94297
- },{"../../plots/cartesian":348,"../contour/calc":418,"../contour/colorbar":420,"../contour/hover":430,"../contour/plot":435,"../contour/style":437,"../histogram/cross_trace_defaults":461,"./attributes":473,"./defaults":474}],476:[function(_dereq_,module,exports){
94948
+ },{"../../plots/cartesian":348,"../contour/calc":418,"../contour/colorbar":420,"../contour/hover":430,"../contour/plot":435,"../contour/style":437,"../histogram/cross_trace_defaults":462,"./attributes":474,"./defaults":475}],477:[function(_dereq_,module,exports){
94298
94949
  'use strict';
94299
94950
 
94300
94951
  var baseAttrs = _dereq_('../../plots/attributes');
@@ -94390,7 +95041,7 @@ module.exports = extendFlat({
94390
95041
  transforms: undefined
94391
95042
  });
94392
95043
 
94393
- },{"../../lib/extend":281,"../../plots/attributes":330,"../../plots/template_attributes":373,"./constants":478}],477:[function(_dereq_,module,exports){
95044
+ },{"../../lib/extend":281,"../../plots/attributes":330,"../../plots/template_attributes":373,"./constants":479}],478:[function(_dereq_,module,exports){
94394
95045
  'use strict';
94395
95046
 
94396
95047
  var Lib = _dereq_('../../lib');
@@ -94480,7 +95131,7 @@ function makeScaler(trace) {
94480
95131
  };
94481
95132
  }
94482
95133
 
94483
- },{"../../lib":287,"../../plots/cartesian/axes":334,"./constants":478,"./helpers":481,"fast-isnumeric":33}],478:[function(_dereq_,module,exports){
95134
+ },{"../../lib":287,"../../plots/cartesian/axes":334,"./constants":479,"./helpers":482,"fast-isnumeric":33}],479:[function(_dereq_,module,exports){
94484
95135
  'use strict';
94485
95136
 
94486
95137
  module.exports = {
@@ -94546,7 +95197,7 @@ module.exports = {
94546
95197
  ].join('; ')
94547
95198
  };
94548
95199
 
94549
- },{}],479:[function(_dereq_,module,exports){
95200
+ },{}],480:[function(_dereq_,module,exports){
94550
95201
  'use strict';
94551
95202
 
94552
95203
  var Lib = _dereq_('../../lib');
@@ -94596,7 +95247,7 @@ module.exports = function supplyDefaults(traceIn, traceOut) {
94596
95247
  traceOut._length = null;
94597
95248
  };
94598
95249
 
94599
- },{"../../lib":287,"../../snapshot/helpers":382,"./attributes":476,"./constants":478}],480:[function(_dereq_,module,exports){
95250
+ },{"../../lib":287,"../../snapshot/helpers":382,"./attributes":477,"./constants":479}],481:[function(_dereq_,module,exports){
94600
95251
  'use strict';
94601
95252
 
94602
95253
  module.exports = function eventData(out, pt) {
@@ -94610,7 +95261,7 @@ module.exports = function eventData(out, pt) {
94610
95261
  return out;
94611
95262
  };
94612
95263
 
94613
- },{}],481:[function(_dereq_,module,exports){
95264
+ },{}],482:[function(_dereq_,module,exports){
94614
95265
  'use strict';
94615
95266
 
94616
95267
  var probeSync = _dereq_('probe-image-size/sync');
@@ -94623,7 +95274,7 @@ exports.getImageSize = function(src) {
94623
95274
  return probeSync(buff);
94624
95275
  };
94625
95276
 
94626
- },{"../../snapshot/helpers":382,"buffer/":28,"probe-image-size/sync":97}],482:[function(_dereq_,module,exports){
95277
+ },{"../../snapshot/helpers":382,"buffer/":28,"probe-image-size/sync":97}],483:[function(_dereq_,module,exports){
94627
95278
  'use strict';
94628
95279
 
94629
95280
  var Fx = _dereq_('../../components/fx');
@@ -94715,7 +95366,7 @@ module.exports = function hoverPoints(pointData, xval, yval) {
94715
95366
  })];
94716
95367
  };
94717
95368
 
94718
- },{"../../components/fx":197,"../../lib":287,"./constants":478}],483:[function(_dereq_,module,exports){
95369
+ },{"../../components/fx":197,"../../lib":287,"./constants":479}],484:[function(_dereq_,module,exports){
94719
95370
  'use strict';
94720
95371
 
94721
95372
  module.exports = {
@@ -94736,7 +95387,7 @@ module.exports = {
94736
95387
  }
94737
95388
  };
94738
95389
 
94739
- },{"../../plots/cartesian":348,"./attributes":476,"./calc":477,"./defaults":479,"./event_data":480,"./hover":482,"./plot":484,"./style":485}],484:[function(_dereq_,module,exports){
95390
+ },{"../../plots/cartesian":348,"./attributes":477,"./calc":478,"./defaults":480,"./event_data":481,"./hover":483,"./plot":485,"./style":486}],485:[function(_dereq_,module,exports){
94740
95391
  'use strict';
94741
95392
 
94742
95393
  var d3 = _dereq_('@plotly/d3');
@@ -94959,7 +95610,7 @@ module.exports = function plot(gd, plotinfo, cdimage, imageLayer) {
94959
95610
  });
94960
95611
  };
94961
95612
 
94962
- },{"../../constants/xmlns_namespaces":268,"../../lib":287,"./constants":478,"@plotly/d3":20}],485:[function(_dereq_,module,exports){
95613
+ },{"../../constants/xmlns_namespaces":268,"../../lib":287,"./constants":479,"@plotly/d3":20}],486:[function(_dereq_,module,exports){
94963
95614
  'use strict';
94964
95615
 
94965
95616
  var d3 = _dereq_('@plotly/d3');
@@ -94971,7 +95622,7 @@ module.exports = function style(gd) {
94971
95622
  });
94972
95623
  };
94973
95624
 
94974
- },{"@plotly/d3":20}],486:[function(_dereq_,module,exports){
95625
+ },{"@plotly/d3":20}],487:[function(_dereq_,module,exports){
94975
95626
  'use strict';
94976
95627
 
94977
95628
  var baseAttrs = _dereq_('../../plots/attributes');
@@ -95186,7 +95837,7 @@ module.exports = {
95186
95837
  }
95187
95838
  };
95188
95839
 
95189
- },{"../../components/color/attributes":156,"../../lib/extend":281,"../../plots/attributes":330,"../../plots/domain":364,"../../plots/font_attributes":365,"../../plots/template_attributes":373}],487:[function(_dereq_,module,exports){
95840
+ },{"../../components/color/attributes":156,"../../lib/extend":281,"../../plots/attributes":330,"../../plots/domain":364,"../../plots/font_attributes":365,"../../plots/template_attributes":373}],488:[function(_dereq_,module,exports){
95190
95841
  'use strict';
95191
95842
 
95192
95843
  var plots = _dereq_('../../plots/plots');
@@ -95201,7 +95852,7 @@ exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout)
95201
95852
  plots.cleanBasePlot(exports.name, newFullData, newFullLayout, oldFullData, oldFullLayout);
95202
95853
  };
95203
95854
 
95204
- },{"../../plots/plots":371}],488:[function(_dereq_,module,exports){
95855
+ },{"../../plots/plots":371}],489:[function(_dereq_,module,exports){
95205
95856
  'use strict';
95206
95857
 
95207
95858
  var isNumeric = _dereq_('fast-isnumeric');
@@ -95243,7 +95894,6 @@ function calc(gd, trace) {
95243
95894
  v = vals[i];
95244
95895
  if(!isNumeric(v)) continue;
95245
95896
  v = +v;
95246
- if(v < 0) continue;
95247
95897
  } else v = 1;
95248
95898
 
95249
95899
  label = labels[i];
@@ -95280,6 +95930,9 @@ function calc(gd, trace) {
95280
95930
  }
95281
95931
  }
95282
95932
 
95933
+ // Drop aggregate sums of value 0 or less
95934
+ cd = cd.filter(function(elem) { return elem.v >= 0; });
95935
+
95283
95936
  var shouldSort = (trace.type === 'funnelarea') ? isAggregated : trace.sort;
95284
95937
  if(shouldSort) cd.sort(function(a, b) { return b.v - a.v; });
95285
95938
 
@@ -95376,7 +96029,7 @@ module.exports = {
95376
96029
  generateExtendedColors: generateExtendedColors
95377
96030
  };
95378
96031
 
95379
- },{"../../components/color":157,"fast-isnumeric":33,"tinycolor2":121}],489:[function(_dereq_,module,exports){
96032
+ },{"../../components/color":157,"fast-isnumeric":33,"tinycolor2":121}],490:[function(_dereq_,module,exports){
95380
96033
  'use strict';
95381
96034
 
95382
96035
  var isNumeric = _dereq_('fast-isnumeric');
@@ -95499,7 +96152,7 @@ module.exports = {
95499
96152
  supplyDefaults: supplyDefaults
95500
96153
  };
95501
96154
 
95502
- },{"../../lib":287,"../../plots/domain":364,"../bar/defaults":392,"./attributes":486,"fast-isnumeric":33}],490:[function(_dereq_,module,exports){
96155
+ },{"../../lib":287,"../../plots/domain":364,"../bar/defaults":392,"./attributes":487,"fast-isnumeric":33}],491:[function(_dereq_,module,exports){
95503
96156
  'use strict';
95504
96157
 
95505
96158
  var appendArrayMultiPointValues = _dereq_('../../components/fx/helpers').appendArrayMultiPointValues;
@@ -95541,7 +96194,7 @@ module.exports = function eventData(pt, trace) {
95541
96194
  return out;
95542
96195
  };
95543
96196
 
95544
- },{"../../components/fx/helpers":193}],491:[function(_dereq_,module,exports){
96197
+ },{"../../components/fx/helpers":193}],492:[function(_dereq_,module,exports){
95545
96198
  'use strict';
95546
96199
 
95547
96200
  var Lib = _dereq_('../../lib');
@@ -95581,7 +96234,7 @@ exports.getRotationAngle = function(rotation) {
95581
96234
  return (rotation === 'auto' ? 0 : rotation) * Math.PI / 180;
95582
96235
  };
95583
96236
 
95584
- },{"../../lib":287}],492:[function(_dereq_,module,exports){
96237
+ },{"../../lib":287}],493:[function(_dereq_,module,exports){
95585
96238
  'use strict';
95586
96239
 
95587
96240
  module.exports = {
@@ -95605,7 +96258,7 @@ module.exports = {
95605
96258
  }
95606
96259
  };
95607
96260
 
95608
- },{"./attributes":486,"./base_plot":487,"./calc":488,"./defaults":489,"./layout_attributes":493,"./layout_defaults":494,"./plot":495,"./style":496,"./style_one":497}],493:[function(_dereq_,module,exports){
96261
+ },{"./attributes":487,"./base_plot":488,"./calc":489,"./defaults":490,"./layout_attributes":494,"./layout_defaults":495,"./plot":496,"./style":497,"./style_one":498}],494:[function(_dereq_,module,exports){
95609
96262
  'use strict';
95610
96263
 
95611
96264
  module.exports = {
@@ -95624,7 +96277,7 @@ module.exports = {
95624
96277
  }
95625
96278
  };
95626
96279
 
95627
- },{}],494:[function(_dereq_,module,exports){
96280
+ },{}],495:[function(_dereq_,module,exports){
95628
96281
  'use strict';
95629
96282
 
95630
96283
  var Lib = _dereq_('../../lib');
@@ -95641,7 +96294,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) {
95641
96294
  coerce('extendpiecolors');
95642
96295
  };
95643
96296
 
95644
- },{"../../lib":287,"./layout_attributes":493}],495:[function(_dereq_,module,exports){
96297
+ },{"../../lib":287,"./layout_attributes":494}],496:[function(_dereq_,module,exports){
95645
96298
  'use strict';
95646
96299
 
95647
96300
  var d3 = _dereq_('@plotly/d3');
@@ -96821,7 +97474,7 @@ module.exports = {
96821
97474
  computeTransform: computeTransform
96822
97475
  };
96823
97476
 
96824
- },{"../../components/color":157,"../../components/drawing":179,"../../components/fx":197,"../../lib":287,"../../lib/svg_text_utils":310,"../../plots/plots":371,"../bar/constants":390,"../bar/uniform_text":404,"./event_data":490,"./helpers":491,"@plotly/d3":20}],496:[function(_dereq_,module,exports){
97477
+ },{"../../components/color":157,"../../components/drawing":179,"../../components/fx":197,"../../lib":287,"../../lib/svg_text_utils":310,"../../plots/plots":371,"../bar/constants":390,"../bar/uniform_text":404,"./event_data":491,"./helpers":492,"@plotly/d3":20}],497:[function(_dereq_,module,exports){
96825
97478
  'use strict';
96826
97479
 
96827
97480
  var d3 = _dereq_('@plotly/d3');
@@ -96846,7 +97499,7 @@ module.exports = function style(gd) {
96846
97499
  });
96847
97500
  };
96848
97501
 
96849
- },{"../bar/uniform_text":404,"./style_one":497,"@plotly/d3":20}],497:[function(_dereq_,module,exports){
97502
+ },{"../bar/uniform_text":404,"./style_one":498,"@plotly/d3":20}],498:[function(_dereq_,module,exports){
96850
97503
  'use strict';
96851
97504
 
96852
97505
  var Color = _dereq_('../../components/color');
@@ -96862,7 +97515,7 @@ module.exports = function styleOne(s, pt, trace) {
96862
97515
  .call(Color.stroke, lineColor);
96863
97516
  };
96864
97517
 
96865
- },{"../../components/color":157,"./helpers":491}],498:[function(_dereq_,module,exports){
97518
+ },{"../../components/color":157,"./helpers":492}],499:[function(_dereq_,module,exports){
96866
97519
  'use strict';
96867
97520
 
96868
97521
  var Lib = _dereq_('../../lib');
@@ -96905,7 +97558,7 @@ module.exports = function arraysToCalcdata(cd, trace) {
96905
97558
  }
96906
97559
  };
96907
97560
 
96908
- },{"../../lib":287}],499:[function(_dereq_,module,exports){
97561
+ },{"../../lib":287}],500:[function(_dereq_,module,exports){
96909
97562
  'use strict';
96910
97563
 
96911
97564
  var axisHoverFormat = _dereq_('../../plots/cartesian/axis_format_attributes').axisHoverFormat;
@@ -97255,7 +97908,7 @@ module.exports = {
97255
97908
  }),
97256
97909
  };
97257
97910
 
97258
- },{"../../components/colorscale/attributes":164,"../../components/drawing":179,"../../components/drawing/attributes":178,"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../../plots/font_attributes":365,"../../plots/template_attributes":373,"./constants":503}],500:[function(_dereq_,module,exports){
97911
+ },{"../../components/colorscale/attributes":164,"../../components/drawing":179,"../../components/drawing/attributes":178,"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../../plots/font_attributes":365,"../../plots/template_attributes":373,"./constants":504}],501:[function(_dereq_,module,exports){
97259
97912
  'use strict';
97260
97913
 
97261
97914
  var isNumeric = _dereq_('fast-isnumeric');
@@ -97552,7 +98205,7 @@ module.exports = {
97552
98205
  getStackOpts: getStackOpts
97553
98206
  };
97554
98207
 
97555
- },{"../../constants/numerical":267,"../../lib":287,"../../plots/cartesian/align_period":331,"../../plots/cartesian/axes":334,"./arrays_to_calcdata":498,"./calc_selection":501,"./colorscale_calc":502,"./subtypes":524,"fast-isnumeric":33}],501:[function(_dereq_,module,exports){
98208
+ },{"../../constants/numerical":267,"../../lib":287,"../../plots/cartesian/align_period":331,"../../plots/cartesian/axes":334,"./arrays_to_calcdata":499,"./calc_selection":502,"./colorscale_calc":503,"./subtypes":525,"fast-isnumeric":33}],502:[function(_dereq_,module,exports){
97556
98209
  'use strict';
97557
98210
 
97558
98211
  var Lib = _dereq_('../../lib');
@@ -97563,7 +98216,7 @@ module.exports = function calcSelection(cd, trace) {
97563
98216
  }
97564
98217
  };
97565
98218
 
97566
- },{"../../lib":287}],502:[function(_dereq_,module,exports){
98219
+ },{"../../lib":287}],503:[function(_dereq_,module,exports){
97567
98220
  'use strict';
97568
98221
 
97569
98222
  var hasColorscale = _dereq_('../../components/colorscale/helpers').hasColorscale;
@@ -97598,7 +98251,7 @@ module.exports = function calcMarkerColorscale(gd, trace) {
97598
98251
  }
97599
98252
  };
97600
98253
 
97601
- },{"../../components/colorscale/calc":165,"../../components/colorscale/helpers":168,"./subtypes":524}],503:[function(_dereq_,module,exports){
98254
+ },{"../../components/colorscale/calc":165,"../../components/colorscale/helpers":168,"./subtypes":525}],504:[function(_dereq_,module,exports){
97602
98255
  'use strict';
97603
98256
 
97604
98257
  module.exports = {
@@ -97618,7 +98271,7 @@ module.exports = {
97618
98271
  eventDataKeys: []
97619
98272
  };
97620
98273
 
97621
- },{}],504:[function(_dereq_,module,exports){
98274
+ },{}],505:[function(_dereq_,module,exports){
97622
98275
  'use strict';
97623
98276
 
97624
98277
  var calc = _dereq_('./calc');
@@ -97790,7 +98443,7 @@ function getInterp(calcTrace, index, position, posAttr) {
97790
98443
  return pt0.s + (pt1.s - pt0.s) * (position - pt0[posAttr]) / (pt1[posAttr] - pt0[posAttr]);
97791
98444
  }
97792
98445
 
97793
- },{"./calc":500}],505:[function(_dereq_,module,exports){
98446
+ },{"./calc":501}],506:[function(_dereq_,module,exports){
97794
98447
  'use strict';
97795
98448
 
97796
98449
 
@@ -97820,7 +98473,7 @@ module.exports = function crossTraceDefaults(fullData) {
97820
98473
  }
97821
98474
  };
97822
98475
 
97823
- },{}],506:[function(_dereq_,module,exports){
98476
+ },{}],507:[function(_dereq_,module,exports){
97824
98477
  'use strict';
97825
98478
 
97826
98479
  var Lib = _dereq_('../../lib');
@@ -97907,7 +98560,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
97907
98560
  Lib.coerceSelectionMarkerOpacity(traceOut, coerce);
97908
98561
  };
97909
98562
 
97910
- },{"../../lib":287,"../../registry":378,"./attributes":499,"./constants":503,"./fillcolor_defaults":507,"./line_defaults":512,"./line_shape_defaults":514,"./marker_defaults":518,"./period_defaults":519,"./stack_defaults":522,"./subtypes":524,"./text_defaults":525,"./xy_defaults":526}],507:[function(_dereq_,module,exports){
98563
+ },{"../../lib":287,"../../registry":378,"./attributes":500,"./constants":504,"./fillcolor_defaults":508,"./line_defaults":513,"./line_shape_defaults":515,"./marker_defaults":519,"./period_defaults":520,"./stack_defaults":523,"./subtypes":525,"./text_defaults":526,"./xy_defaults":527}],508:[function(_dereq_,module,exports){
97911
98564
  'use strict';
97912
98565
 
97913
98566
  var Color = _dereq_('../../components/color');
@@ -97935,7 +98588,7 @@ module.exports = function fillColorDefaults(traceIn, traceOut, defaultColor, coe
97935
98588
  ));
97936
98589
  };
97937
98590
 
97938
- },{"../../components/color":157,"../../lib":287}],508:[function(_dereq_,module,exports){
98591
+ },{"../../components/color":157,"../../lib":287}],509:[function(_dereq_,module,exports){
97939
98592
  'use strict';
97940
98593
 
97941
98594
  var Axes = _dereq_('../../plots/cartesian/axes');
@@ -97953,7 +98606,7 @@ module.exports = function formatLabels(cdi, trace, fullLayout) {
97953
98606
  return labels;
97954
98607
  };
97955
98608
 
97956
- },{"../../plots/cartesian/axes":334}],509:[function(_dereq_,module,exports){
98609
+ },{"../../plots/cartesian/axes":334}],510:[function(_dereq_,module,exports){
97957
98610
  'use strict';
97958
98611
 
97959
98612
  var Color = _dereq_('../../components/color');
@@ -97993,7 +98646,7 @@ module.exports = function getTraceColor(trace, di) {
97993
98646
  }
97994
98647
  };
97995
98648
 
97996
- },{"../../components/color":157,"./subtypes":524}],510:[function(_dereq_,module,exports){
98649
+ },{"../../components/color":157,"./subtypes":525}],511:[function(_dereq_,module,exports){
97997
98650
  'use strict';
97998
98651
 
97999
98652
  var Lib = _dereq_('../../lib');
@@ -98204,7 +98857,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) {
98204
98857
  }
98205
98858
  };
98206
98859
 
98207
- },{"../../components/color":157,"../../components/fx":197,"../../lib":287,"../../registry":378,"./get_trace_color":509}],511:[function(_dereq_,module,exports){
98860
+ },{"../../components/color":157,"../../components/fx":197,"../../lib":287,"../../registry":378,"./get_trace_color":510}],512:[function(_dereq_,module,exports){
98208
98861
  'use strict';
98209
98862
 
98210
98863
  var subtypes = _dereq_('./subtypes');
@@ -98241,7 +98894,7 @@ module.exports = {
98241
98894
  }
98242
98895
  };
98243
98896
 
98244
- },{"../../plots/cartesian":348,"./arrays_to_calcdata":498,"./attributes":499,"./calc":500,"./cross_trace_calc":504,"./cross_trace_defaults":505,"./defaults":506,"./format_labels":508,"./hover":510,"./marker_colorbar":517,"./plot":520,"./select":521,"./style":523,"./subtypes":524}],512:[function(_dereq_,module,exports){
98897
+ },{"../../plots/cartesian":348,"./arrays_to_calcdata":499,"./attributes":500,"./calc":501,"./cross_trace_calc":505,"./cross_trace_defaults":506,"./defaults":507,"./format_labels":509,"./hover":511,"./marker_colorbar":518,"./plot":521,"./select":522,"./style":524,"./subtypes":525}],513:[function(_dereq_,module,exports){
98245
98898
  'use strict';
98246
98899
 
98247
98900
  var isArrayOrTypedArray = _dereq_('../../lib').isArrayOrTypedArray;
@@ -98264,7 +98917,7 @@ module.exports = function lineDefaults(traceIn, traceOut, defaultColor, layout,
98264
98917
  if(!(opts || {}).noDash) coerce('line.dash');
98265
98918
  };
98266
98919
 
98267
- },{"../../components/colorscale/defaults":167,"../../components/colorscale/helpers":168,"../../lib":287}],513:[function(_dereq_,module,exports){
98920
+ },{"../../components/colorscale/defaults":167,"../../components/colorscale/helpers":168,"../../lib":287}],514:[function(_dereq_,module,exports){
98268
98921
  'use strict';
98269
98922
 
98270
98923
  var numConstants = _dereq_('../../constants/numerical');
@@ -98716,7 +99369,7 @@ module.exports = function linePoints(d, opts) {
98716
99369
  return segments;
98717
99370
  };
98718
99371
 
98719
- },{"../../constants/numerical":267,"../../lib":287,"./constants":503}],514:[function(_dereq_,module,exports){
99372
+ },{"../../constants/numerical":267,"../../lib":287,"./constants":504}],515:[function(_dereq_,module,exports){
98720
99373
  'use strict';
98721
99374
 
98722
99375
 
@@ -98726,7 +99379,7 @@ module.exports = function handleLineShapeDefaults(traceIn, traceOut, coerce) {
98726
99379
  if(shape === 'spline') coerce('line.smoothing');
98727
99380
  };
98728
99381
 
98729
- },{}],515:[function(_dereq_,module,exports){
99382
+ },{}],516:[function(_dereq_,module,exports){
98730
99383
  'use strict';
98731
99384
 
98732
99385
  var LINKEDFILLS = {tonextx: 1, tonexty: 1, tonext: 1};
@@ -98808,7 +99461,7 @@ module.exports = function linkTraces(gd, plotinfo, cdscatter) {
98808
99461
  return cdscatterSorted;
98809
99462
  };
98810
99463
 
98811
- },{}],516:[function(_dereq_,module,exports){
99464
+ },{}],517:[function(_dereq_,module,exports){
98812
99465
  'use strict';
98813
99466
 
98814
99467
  var isNumeric = _dereq_('fast-isnumeric');
@@ -98844,7 +99497,7 @@ module.exports = function makeBubbleSizeFn(trace, factor) {
98844
99497
  };
98845
99498
  };
98846
99499
 
98847
- },{"fast-isnumeric":33}],517:[function(_dereq_,module,exports){
99500
+ },{"fast-isnumeric":33}],518:[function(_dereq_,module,exports){
98848
99501
  'use strict';
98849
99502
 
98850
99503
  module.exports = {
@@ -98853,7 +99506,7 @@ module.exports = {
98853
99506
  max: 'cmax'
98854
99507
  };
98855
99508
 
98856
- },{}],518:[function(_dereq_,module,exports){
99509
+ },{}],519:[function(_dereq_,module,exports){
98857
99510
  'use strict';
98858
99511
 
98859
99512
  var Color = _dereq_('../../components/color');
@@ -98926,7 +99579,7 @@ module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout
98926
99579
  }
98927
99580
  };
98928
99581
 
98929
- },{"../../components/color":157,"../../components/colorscale/defaults":167,"../../components/colorscale/helpers":168,"./subtypes":524}],519:[function(_dereq_,module,exports){
99582
+ },{"../../components/color":157,"../../components/colorscale/defaults":167,"../../components/colorscale/helpers":168,"./subtypes":525}],520:[function(_dereq_,module,exports){
98930
99583
  'use strict';
98931
99584
 
98932
99585
  var dateTick0 = _dereq_('../../lib').dateTick0;
@@ -98965,7 +99618,7 @@ module.exports = function handlePeriodDefaults(traceIn, traceOut, layout, coerce
98965
99618
  }
98966
99619
  };
98967
99620
 
98968
- },{"../../constants/numerical":267,"../../lib":287}],520:[function(_dereq_,module,exports){
99621
+ },{"../../constants/numerical":267,"../../lib":287}],521:[function(_dereq_,module,exports){
98969
99622
  'use strict';
98970
99623
 
98971
99624
  var d3 = _dereq_('@plotly/d3');
@@ -99517,7 +100170,7 @@ function selectMarkers(gd, idx, plotinfo, cdscatter, cdscatterAll) {
99517
100170
  });
99518
100171
  }
99519
100172
 
99520
- },{"../../components/drawing":179,"../../lib":287,"../../lib/polygon":299,"../../registry":378,"./line_points":513,"./link_traces":515,"./subtypes":524,"@plotly/d3":20}],521:[function(_dereq_,module,exports){
100173
+ },{"../../components/drawing":179,"../../lib":287,"../../lib/polygon":299,"../../registry":378,"./line_points":514,"./link_traces":516,"./subtypes":525,"@plotly/d3":20}],522:[function(_dereq_,module,exports){
99521
100174
  'use strict';
99522
100175
 
99523
100176
  var subtypes = _dereq_('./subtypes');
@@ -99562,7 +100215,7 @@ module.exports = function selectPoints(searchInfo, selectionTester) {
99562
100215
  return selection;
99563
100216
  };
99564
100217
 
99565
- },{"./subtypes":524}],522:[function(_dereq_,module,exports){
100218
+ },{"./subtypes":525}],523:[function(_dereq_,module,exports){
99566
100219
  'use strict';
99567
100220
 
99568
100221
  var perStackAttrs = ['orientation', 'groupnorm', 'stackgaps'];
@@ -99659,7 +100312,7 @@ module.exports = function handleStackDefaults(traceIn, traceOut, layout, coerce)
99659
100312
  }
99660
100313
  };
99661
100314
 
99662
- },{}],523:[function(_dereq_,module,exports){
100315
+ },{}],524:[function(_dereq_,module,exports){
99663
100316
  'use strict';
99664
100317
 
99665
100318
  var d3 = _dereq_('@plotly/d3');
@@ -99721,7 +100374,7 @@ module.exports = {
99721
100374
  styleOnSelect: styleOnSelect
99722
100375
  };
99723
100376
 
99724
- },{"../../components/drawing":179,"../../registry":378,"@plotly/d3":20}],524:[function(_dereq_,module,exports){
100377
+ },{"../../components/drawing":179,"../../registry":378,"@plotly/d3":20}],525:[function(_dereq_,module,exports){
99725
100378
  'use strict';
99726
100379
 
99727
100380
  var Lib = _dereq_('../../lib');
@@ -99751,7 +100404,7 @@ module.exports = {
99751
100404
  }
99752
100405
  };
99753
100406
 
99754
- },{"../../lib":287}],525:[function(_dereq_,module,exports){
100407
+ },{"../../lib":287}],526:[function(_dereq_,module,exports){
99755
100408
  'use strict';
99756
100409
 
99757
100410
  var Lib = _dereq_('../../lib');
@@ -99772,7 +100425,7 @@ module.exports = function(traceIn, traceOut, layout, coerce, opts) {
99772
100425
  }
99773
100426
  };
99774
100427
 
99775
- },{"../../lib":287}],526:[function(_dereq_,module,exports){
100428
+ },{"../../lib":287}],527:[function(_dereq_,module,exports){
99776
100429
  'use strict';
99777
100430
 
99778
100431
  var Lib = _dereq_('../../lib');
@@ -99808,7 +100461,7 @@ module.exports = function handleXYDefaults(traceIn, traceOut, layout, coerce) {
99808
100461
  return len;
99809
100462
  };
99810
100463
 
99811
- },{"../../lib":287,"../../registry":378}],527:[function(_dereq_,module,exports){
100464
+ },{"../../lib":287,"../../registry":378}],528:[function(_dereq_,module,exports){
99812
100465
  'use strict';
99813
100466
 
99814
100467
  var hovertemplateAttrs = _dereq_('../../plots/template_attributes').hovertemplateAttrs;
@@ -99900,7 +100553,7 @@ module.exports = {
99900
100553
  hovertemplate: hovertemplateAttrs(),
99901
100554
  };
99902
100555
 
99903
- },{"../../components/colorscale/attributes":164,"../../components/drawing/attributes":178,"../../lib/extend":281,"../../plots/attributes":330,"../../plots/template_attributes":373,"../scatter/attributes":499}],528:[function(_dereq_,module,exports){
100556
+ },{"../../components/colorscale/attributes":164,"../../components/drawing/attributes":178,"../../lib/extend":281,"../../plots/attributes":330,"../../plots/template_attributes":373,"../scatter/attributes":500}],529:[function(_dereq_,module,exports){
99904
100557
  'use strict';
99905
100558
 
99906
100559
  var isNumeric = _dereq_('fast-isnumeric');
@@ -99972,7 +100625,7 @@ module.exports = function calc(gd, trace) {
99972
100625
  return cd;
99973
100626
  };
99974
100627
 
99975
- },{"../scatter/arrays_to_calcdata":498,"../scatter/calc":500,"../scatter/calc_selection":501,"../scatter/colorscale_calc":502,"fast-isnumeric":33}],529:[function(_dereq_,module,exports){
100628
+ },{"../scatter/arrays_to_calcdata":499,"../scatter/calc":501,"../scatter/calc_selection":502,"../scatter/colorscale_calc":503,"fast-isnumeric":33}],530:[function(_dereq_,module,exports){
99976
100629
  'use strict';
99977
100630
 
99978
100631
  var Lib = _dereq_('../../lib');
@@ -100067,7 +100720,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
100067
100720
  Lib.coerceSelectionMarkerOpacity(traceOut, coerce);
100068
100721
  };
100069
100722
 
100070
- },{"../../lib":287,"../scatter/constants":503,"../scatter/fillcolor_defaults":507,"../scatter/line_defaults":512,"../scatter/line_shape_defaults":514,"../scatter/marker_defaults":518,"../scatter/subtypes":524,"../scatter/text_defaults":525,"./attributes":527}],530:[function(_dereq_,module,exports){
100723
+ },{"../../lib":287,"../scatter/constants":504,"../scatter/fillcolor_defaults":508,"../scatter/line_defaults":513,"../scatter/line_shape_defaults":515,"../scatter/marker_defaults":519,"../scatter/subtypes":525,"../scatter/text_defaults":526,"./attributes":528}],531:[function(_dereq_,module,exports){
100071
100724
  'use strict';
100072
100725
 
100073
100726
  module.exports = function eventData(out, pt, trace, cd, pointNumber) {
@@ -100091,7 +100744,7 @@ module.exports = function eventData(out, pt, trace, cd, pointNumber) {
100091
100744
  return out;
100092
100745
  };
100093
100746
 
100094
- },{}],531:[function(_dereq_,module,exports){
100747
+ },{}],532:[function(_dereq_,module,exports){
100095
100748
  'use strict';
100096
100749
 
100097
100750
  var Axes = _dereq_('../../plots/cartesian/axes');
@@ -100107,7 +100760,7 @@ module.exports = function formatLabels(cdi, trace, fullLayout) {
100107
100760
  return labels;
100108
100761
  };
100109
100762
 
100110
- },{"../../plots/cartesian/axes":334}],532:[function(_dereq_,module,exports){
100763
+ },{"../../plots/cartesian/axes":334}],533:[function(_dereq_,module,exports){
100111
100764
  'use strict';
100112
100765
 
100113
100766
  var scatterHover = _dereq_('../scatter/hover');
@@ -100173,7 +100826,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode) {
100173
100826
  return scatterPointData;
100174
100827
  };
100175
100828
 
100176
- },{"../scatter/hover":510}],533:[function(_dereq_,module,exports){
100829
+ },{"../scatter/hover":511}],534:[function(_dereq_,module,exports){
100177
100830
  'use strict';
100178
100831
 
100179
100832
  module.exports = {
@@ -100197,7 +100850,7 @@ module.exports = {
100197
100850
  }
100198
100851
  };
100199
100852
 
100200
- },{"../../plots/ternary":374,"../scatter/marker_colorbar":517,"../scatter/select":521,"../scatter/style":523,"./attributes":527,"./calc":528,"./defaults":529,"./event_data":530,"./format_labels":531,"./hover":532,"./plot":534}],534:[function(_dereq_,module,exports){
100853
+ },{"../../plots/ternary":374,"../scatter/marker_colorbar":518,"../scatter/select":522,"../scatter/style":524,"./attributes":528,"./calc":529,"./defaults":530,"./event_data":531,"./format_labels":532,"./hover":533,"./plot":535}],535:[function(_dereq_,module,exports){
100201
100854
  'use strict';
100202
100855
 
100203
100856
  var scatterPlot = _dereq_('../scatter/plot');
@@ -100221,7 +100874,7 @@ module.exports = function plot(gd, ternary, moduleCalcData) {
100221
100874
  scatterPlot(gd, plotinfo, moduleCalcData, scatterLayer);
100222
100875
  };
100223
100876
 
100224
- },{"../scatter/plot":520}],535:[function(_dereq_,module,exports){
100877
+ },{"../scatter/plot":521}],536:[function(_dereq_,module,exports){
100225
100878
  'use strict';
100226
100879
 
100227
100880
  var boxAttrs = _dereq_('../box/attributes');
@@ -100377,7 +101030,7 @@ module.exports = {
100377
101030
  }
100378
101031
  };
100379
101032
 
100380
- },{"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../box/attributes":405}],536:[function(_dereq_,module,exports){
101033
+ },{"../../lib/extend":281,"../../plots/cartesian/axis_format_attributes":337,"../box/attributes":405}],537:[function(_dereq_,module,exports){
100381
101034
  'use strict';
100382
101035
 
100383
101036
  var Lib = _dereq_('../../lib');
@@ -100545,7 +101198,7 @@ function calcSpan(trace, cdi, valAxis, bandwidth) {
100545
101198
  return spanOut;
100546
101199
  }
100547
101200
 
100548
- },{"../../constants/numerical":267,"../../lib":287,"../../plots/cartesian/axes":334,"../box/calc":406,"./helpers":539}],537:[function(_dereq_,module,exports){
101201
+ },{"../../constants/numerical":267,"../../lib":287,"../../plots/cartesian/axes":334,"../box/calc":406,"./helpers":540}],538:[function(_dereq_,module,exports){
100549
101202
  'use strict';
100550
101203
 
100551
101204
  var setPositionOffset = _dereq_('../box/cross_trace_calc').setPositionOffset;
@@ -100580,7 +101233,7 @@ module.exports = function crossTraceCalc(gd, plotinfo) {
100580
101233
  }
100581
101234
  };
100582
101235
 
100583
- },{"../box/cross_trace_calc":407}],538:[function(_dereq_,module,exports){
101236
+ },{"../box/cross_trace_calc":407}],539:[function(_dereq_,module,exports){
100584
101237
  'use strict';
100585
101238
 
100586
101239
  var Lib = _dereq_('../../lib');
@@ -100633,7 +101286,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
100633
101286
  if(!meanLineVisible) traceOut.meanline = {visible: false};
100634
101287
  };
100635
101288
 
100636
- },{"../../components/color":157,"../../lib":287,"../box/defaults":408,"./attributes":535}],539:[function(_dereq_,module,exports){
101289
+ },{"../../components/color":157,"../../lib":287,"../box/defaults":408,"./attributes":536}],540:[function(_dereq_,module,exports){
100637
101290
  'use strict';
100638
101291
 
100639
101292
  var Lib = _dereq_('../../lib');
@@ -100698,7 +101351,7 @@ exports.getKdeValue = function(calcItem, trace, valueDist) {
100698
101351
 
100699
101352
  exports.extractVal = function(o) { return o.v; };
100700
101353
 
100701
- },{"../../lib":287}],540:[function(_dereq_,module,exports){
101354
+ },{"../../lib":287}],541:[function(_dereq_,module,exports){
100702
101355
  'use strict';
100703
101356
 
100704
101357
  var Lib = _dereq_('../../lib');
@@ -100805,7 +101458,7 @@ module.exports = function hoverPoints(pointData, xval, yval, hovermode, opts) {
100805
101458
  return closeData;
100806
101459
  };
100807
101460
 
100808
- },{"../../lib":287,"../../plots/cartesian/axes":334,"../box/hover":410,"./helpers":539}],541:[function(_dereq_,module,exports){
101461
+ },{"../../lib":287,"../../plots/cartesian/axes":334,"../box/hover":410,"./helpers":540}],542:[function(_dereq_,module,exports){
100809
101462
  'use strict';
100810
101463
 
100811
101464
  module.exports = {
@@ -100830,7 +101483,7 @@ module.exports = {
100830
101483
  }
100831
101484
  };
100832
101485
 
100833
- },{"../../plots/cartesian":348,"../box/defaults":408,"../box/select":415,"../scatter/style":523,"./attributes":535,"./calc":536,"./cross_trace_calc":537,"./defaults":538,"./hover":540,"./layout_attributes":542,"./layout_defaults":543,"./plot":544,"./style":545}],542:[function(_dereq_,module,exports){
101486
+ },{"../../plots/cartesian":348,"../box/defaults":408,"../box/select":415,"../scatter/style":524,"./attributes":536,"./calc":537,"./cross_trace_calc":538,"./defaults":539,"./hover":541,"./layout_attributes":543,"./layout_defaults":544,"./plot":545,"./style":546}],543:[function(_dereq_,module,exports){
100834
101487
  'use strict';
100835
101488
 
100836
101489
  var boxLayoutAttrs = _dereq_('../box/layout_attributes');
@@ -100845,7 +101498,7 @@ module.exports = {
100845
101498
  })
100846
101499
  };
100847
101500
 
100848
- },{"../../lib":287,"../box/layout_attributes":412}],543:[function(_dereq_,module,exports){
101501
+ },{"../../lib":287,"../box/layout_attributes":412}],544:[function(_dereq_,module,exports){
100849
101502
  'use strict';
100850
101503
 
100851
101504
  var Lib = _dereq_('../../lib');
@@ -100859,7 +101512,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
100859
101512
  boxLayoutDefaults._supply(layoutIn, layoutOut, fullData, coerce, 'violin');
100860
101513
  };
100861
101514
 
100862
- },{"../../lib":287,"../box/layout_defaults":413,"./layout_attributes":542}],544:[function(_dereq_,module,exports){
101515
+ },{"../../lib":287,"../box/layout_defaults":413,"./layout_attributes":543}],545:[function(_dereq_,module,exports){
100863
101516
  'use strict';
100864
101517
 
100865
101518
  var d3 = _dereq_('@plotly/d3');
@@ -101041,7 +101694,7 @@ module.exports = function plot(gd, plotinfo, cdViolins, violinLayer) {
101041
101694
  });
101042
101695
  };
101043
101696
 
101044
- },{"../../components/drawing":179,"../../lib":287,"../box/plot":414,"../scatter/line_points":513,"./helpers":539,"@plotly/d3":20}],545:[function(_dereq_,module,exports){
101697
+ },{"../../components/drawing":179,"../../lib":287,"../box/plot":414,"../scatter/line_points":514,"./helpers":540,"@plotly/d3":20}],546:[function(_dereq_,module,exports){
101045
101698
  'use strict';
101046
101699
 
101047
101700
  var d3 = _dereq_('@plotly/d3');
@@ -101088,7 +101741,7 @@ module.exports = function style(gd) {
101088
101741
  });
101089
101742
  };
101090
101743
 
101091
- },{"../../components/color":157,"../scatter/style":523,"@plotly/d3":20}],546:[function(_dereq_,module,exports){
101744
+ },{"../../components/color":157,"../scatter/style":524,"@plotly/d3":20}],547:[function(_dereq_,module,exports){
101092
101745
  'use strict';
101093
101746
 
101094
101747
  var Axes = _dereq_('../plots/cartesian/axes');
@@ -101492,7 +102145,7 @@ function last(array, indices) {
101492
102145
  return array[indices[indices.length - 1]];
101493
102146
  }
101494
102147
 
101495
- },{"../constants/numerical":267,"../lib":287,"../plot_api/plot_schema":322,"../plots/cartesian/axes":334,"./helpers":549}],547:[function(_dereq_,module,exports){
102148
+ },{"../constants/numerical":267,"../lib":287,"../plot_api/plot_schema":322,"../plots/cartesian/axes":334,"./helpers":550}],548:[function(_dereq_,module,exports){
101496
102149
  'use strict';
101497
102150
 
101498
102151
  var Lib = _dereq_('../lib');
@@ -101752,7 +102405,7 @@ function getFilterFunc(opts, d2c, targetCalendar) {
101752
102405
  }
101753
102406
  }
101754
102407
 
101755
- },{"../constants/filter_ops":265,"../lib":287,"../plots/cartesian/axes":334,"../registry":378,"./helpers":549}],548:[function(_dereq_,module,exports){
102408
+ },{"../constants/filter_ops":265,"../lib":287,"../plots/cartesian/axes":334,"../registry":378,"./helpers":550}],549:[function(_dereq_,module,exports){
101756
102409
  'use strict';
101757
102410
 
101758
102411
  var Lib = _dereq_('../lib');
@@ -101996,7 +102649,7 @@ function transformOne(trace, state) {
101996
102649
  return newData;
101997
102650
  }
101998
102651
 
101999
- },{"../lib":287,"../plot_api/plot_schema":322,"../plots/plots":371,"./helpers":549}],549:[function(_dereq_,module,exports){
102652
+ },{"../lib":287,"../plot_api/plot_schema":322,"../plots/plots":371,"./helpers":550}],550:[function(_dereq_,module,exports){
102000
102653
  'use strict';
102001
102654
 
102002
102655
  exports.pointsAccessorFunction = function(transforms, opts) {
@@ -102014,7 +102667,7 @@ exports.pointsAccessorFunction = function(transforms, opts) {
102014
102667
  return originalPointsAccessor;
102015
102668
  };
102016
102669
 
102017
- },{}],550:[function(_dereq_,module,exports){
102670
+ },{}],551:[function(_dereq_,module,exports){
102018
102671
  'use strict';
102019
102672
 
102020
102673
  var Lib = _dereq_('../lib');
@@ -102152,11 +102805,11 @@ function getSortFunc(opts, d2c) {
102152
102805
  }
102153
102806
  }
102154
102807
 
102155
- },{"../constants/numerical":267,"../lib":287,"../plots/cartesian/axes":334,"./helpers":549}],551:[function(_dereq_,module,exports){
102808
+ },{"../constants/numerical":267,"../lib":287,"../plots/cartesian/axes":334,"./helpers":550}],552:[function(_dereq_,module,exports){
102156
102809
  'use strict';
102157
102810
 
102158
102811
  // package version injected by `npm run preprocess`
102159
- exports.version = '2.6.3';
102812
+ exports.version = '2.8.1';
102160
102813
 
102161
102814
  },{}]},{},[15])(15)
102162
102815
  });