plotly.js 2.7.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +3 -3
  3. package/dist/README.md +26 -26
  4. package/dist/plot-schema.json +898 -407
  5. package/dist/plotly-basic.js +489 -185
  6. package/dist/plotly-basic.min.js +4 -4
  7. package/dist/plotly-cartesian.js +894 -326
  8. package/dist/plotly-cartesian.min.js +3 -3
  9. package/dist/plotly-finance.js +489 -185
  10. package/dist/plotly-finance.min.js +4 -4
  11. package/dist/plotly-geo-assets.js +2 -2
  12. package/dist/plotly-geo.js +486 -184
  13. package/dist/plotly-geo.min.js +4 -4
  14. package/dist/plotly-gl2d.js +502 -185
  15. package/dist/plotly-gl2d.min.js +2 -2
  16. package/dist/plotly-gl3d.js +486 -184
  17. package/dist/plotly-gl3d.min.js +2 -2
  18. package/dist/plotly-mapbox.js +486 -184
  19. package/dist/plotly-mapbox.min.js +2 -2
  20. package/dist/plotly-strict.js +1112 -544
  21. package/dist/plotly-strict.min.js +3 -3
  22. package/dist/plotly-with-meta.js +1201 -606
  23. package/dist/plotly.js +1166 -598
  24. package/dist/plotly.min.js +10 -10
  25. package/package.json +4 -4
  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/fx/hover.js +5 -2
  30. package/src/components/fx/hoverlabel_defaults.js +4 -2
  31. package/src/components/fx/layout_attributes.js +14 -4
  32. package/src/components/fx/layout_defaults.js +2 -0
  33. package/src/components/legend/attributes.js +7 -0
  34. package/src/components/legend/defaults.js +24 -7
  35. package/src/components/titles/index.js +8 -2
  36. package/src/plot_api/plot_api.js +1 -1
  37. package/src/plots/font_attributes.js +3 -0
  38. package/src/plots/layout_attributes.js +1 -0
  39. package/src/plots/plots.js +7 -15
  40. package/src/traces/contour/attributes.js +12 -0
  41. package/src/traces/contour/defaults.js +9 -1
  42. package/src/traces/heatmap/attributes.js +16 -0
  43. package/src/traces/heatmap/defaults.js +2 -0
  44. package/src/traces/heatmap/label_defaults.js +13 -0
  45. package/src/traces/heatmap/plot.js +203 -4
  46. package/src/traces/histogram2d/attributes.js +8 -0
  47. package/src/traces/histogram2d/defaults.js +4 -0
  48. package/src/traces/histogram2dcontour/attributes.js +3 -1
  49. package/src/traces/histogram2dcontour/defaults.js +8 -1
  50. package/src/traces/pie/calc.js +3 -1
  51. package/src/version.js +1 -1
  52. package/tasks/test_mock.js +1 -0
@@ -5,6 +5,7 @@ var Lib = require('../../lib');
5
5
  var handleSampleDefaults = require('./sample_defaults');
6
6
  var handleStyleDefaults = require('../heatmap/style_defaults');
7
7
  var colorscaleDefaults = require('../../components/colorscale/defaults');
8
+ var handleHeatmapLabelDefaults = require('../heatmap/label_defaults');
8
9
  var attributes = require('./attributes');
9
10
 
10
11
 
@@ -19,6 +20,9 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
19
20
  handleStyleDefaults(traceIn, traceOut, coerce, layout);
20
21
  colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'});
21
22
  coerce('hovertemplate');
23
+
24
+ handleHeatmapLabelDefaults(coerce, layout);
25
+
22
26
  coerce('xhoverformat');
23
27
  coerce('yhoverformat');
24
28
  };
@@ -42,7 +42,9 @@ module.exports = extendFlat({
42
42
  xhoverformat: axisHoverFormat('x'),
43
43
  yhoverformat: axisHoverFormat('y'),
44
44
  zhoverformat: axisHoverFormat('z', 1),
45
- hovertemplate: histogram2dAttrs.hovertemplate
45
+ hovertemplate: histogram2dAttrs.hovertemplate,
46
+ texttemplate: contourAttrs.texttemplate,
47
+ textfont: contourAttrs.textfont
46
48
  },
47
49
  colorScaleAttrs('', {
48
50
  cLetter: 'z',
@@ -5,6 +5,7 @@ var Lib = require('../../lib');
5
5
  var handleSampleDefaults = require('../histogram2d/sample_defaults');
6
6
  var handleContoursDefaults = require('../contour/contours_defaults');
7
7
  var handleStyleDefaults = require('../contour/style_defaults');
8
+ var handleHeatmapLabelDefaults = require('../heatmap/label_defaults');
8
9
  var attributes = require('./attributes');
9
10
 
10
11
 
@@ -22,7 +23,13 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
22
23
 
23
24
  handleContoursDefaults(traceIn, traceOut, coerce, coerce2);
24
25
  handleStyleDefaults(traceIn, traceOut, coerce, layout);
25
- coerce('hovertemplate');
26
26
  coerce('xhoverformat');
27
27
  coerce('yhoverformat');
28
+ coerce('hovertemplate');
29
+ if(
30
+ traceOut.contours &&
31
+ traceOut.contours.coloring === 'heatmap'
32
+ ) {
33
+ handleHeatmapLabelDefaults(coerce, layout);
34
+ }
28
35
  };
@@ -39,7 +39,6 @@ function calc(gd, trace) {
39
39
  v = vals[i];
40
40
  if(!isNumeric(v)) continue;
41
41
  v = +v;
42
- if(v < 0) continue;
43
42
  } else v = 1;
44
43
 
45
44
  label = labels[i];
@@ -76,6 +75,9 @@ function calc(gd, trace) {
76
75
  }
77
76
  }
78
77
 
78
+ // Drop aggregate sums of value 0 or less
79
+ cd = cd.filter(function(elem) { return elem.v >= 0; });
80
+
79
81
  var shouldSort = (trace.type === 'funnelarea') ? isAggregated : trace.sort;
80
82
  if(shouldSort) cd.sort(function(a, b) { return b.v - a.v; });
81
83
 
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use strict';
2
2
 
3
3
  // package version injected by `npm run preprocess`
4
- exports.version = '2.7.0';
4
+ exports.version = '2.8.0';
@@ -85,6 +85,7 @@ function notBlackListed(name) {
85
85
 
86
86
  // has contourcarpet See https://github.com/plotly/plotly.js/issues/5669
87
87
  'airfoil',
88
+ 'h-colorbar_airfoil',
88
89
  'cheater',
89
90
  'cheater_constraint_greater_than',
90
91
  'cheater_constraint_greater_than_with_hill',