plotly.js 2.8.2 → 2.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plotly.js",
3
- "version": "2.8.2",
3
+ "version": "2.8.3",
4
4
  "description": "The open source javascript graphing library that powers plotly",
5
5
  "license": "MIT",
6
6
  "main": "./lib/index.js",
@@ -629,6 +629,7 @@ function calcTexttemplate(fullLayout, cd, index, xa, ya) {
629
629
  var trace = cd[0].trace;
630
630
  var texttemplate = Lib.castOption(trace, index, 'texttemplate');
631
631
  if(!texttemplate) return '';
632
+ var isHistogram = (trace.type === 'histogram');
632
633
  var isWaterfall = (trace.type === 'waterfall');
633
634
  var isFunnel = (trace.type === 'funnel');
634
635
  var isHorizontal = trace.orientation === 'h';
@@ -670,10 +671,10 @@ function calcTexttemplate(fullLayout, cd, index, xa, ya) {
670
671
  var pt = {};
671
672
  appendArrayPointValue(pt, trace, cdi.i);
672
673
 
673
- if(pt.x === undefined) pt.x = isHorizontal ? obj.value : obj.label;
674
- if(pt.y === undefined) pt.y = isHorizontal ? obj.label : obj.value;
675
- if(pt.xLabel === undefined) pt.xLabel = isHorizontal ? obj.valueLabel : obj.labelLabel;
676
- if(pt.yLabel === undefined) pt.yLabel = isHorizontal ? obj.labelLabel : obj.valueLabel;
674
+ if(isHistogram || pt.x === undefined) pt.x = isHorizontal ? obj.value : obj.label;
675
+ if(isHistogram || pt.y === undefined) pt.y = isHorizontal ? obj.label : obj.value;
676
+ if(isHistogram || pt.xLabel === undefined) pt.xLabel = isHorizontal ? obj.valueLabel : obj.labelLabel;
677
+ if(isHistogram || pt.yLabel === undefined) pt.yLabel = isHorizontal ? obj.labelLabel : obj.valueLabel;
677
678
 
678
679
  if(isWaterfall) {
679
680
  obj.delta = +cdi.rawS || cdi.s;
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.8.2';
4
+ exports.version = '2.8.3';