plotly.js 2.8.1 → 2.8.2

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * plotly.js v2.8.1
2
+ * plotly.js v2.8.2
3
3
  * Copyright 2012-2021, Plotly, Inc.
4
4
  * All rights reserved.
5
5
  * Licensed under the MIT license
@@ -176120,10 +176120,11 @@ function calcTexttemplate(fullLayout, cd, index, xa, ya) {
176120
176120
  if(!texttemplate) return '';
176121
176121
  var isWaterfall = (trace.type === 'waterfall');
176122
176122
  var isFunnel = (trace.type === 'funnel');
176123
+ var isHorizontal = trace.orientation === 'h';
176123
176124
 
176124
176125
  var pLetter, pAxis;
176125
176126
  var vLetter, vAxis;
176126
- if(trace.orientation === 'h') {
176127
+ if(isHorizontal) {
176127
176128
  pLetter = 'y';
176128
176129
  pAxis = ya;
176129
176130
  vLetter = 'x';
@@ -176158,6 +176159,11 @@ function calcTexttemplate(fullLayout, cd, index, xa, ya) {
176158
176159
  var pt = {};
176159
176160
  appendArrayPointValue(pt, trace, cdi.i);
176160
176161
 
176162
+ if(pt.x === undefined) pt.x = isHorizontal ? obj.value : obj.label;
176163
+ if(pt.y === undefined) pt.y = isHorizontal ? obj.label : obj.value;
176164
+ if(pt.xLabel === undefined) pt.xLabel = isHorizontal ? obj.valueLabel : obj.labelLabel;
176165
+ if(pt.yLabel === undefined) pt.yLabel = isHorizontal ? obj.labelLabel : obj.valueLabel;
176166
+
176161
176167
  if(isWaterfall) {
176162
176168
  obj.delta = +cdi.rawS || cdi.s;
176163
176169
  obj.deltaLabel = formatNumber(obj.delta);
@@ -192006,8 +192012,9 @@ var getBinSpanLabelRound = _dereq_('./bin_label_vals');
192006
192012
  function calc(gd, trace) {
192007
192013
  var pos = [];
192008
192014
  var size = [];
192009
- var pa = Axes.getFromId(gd, trace.orientation === 'h' ? trace.yaxis : trace.xaxis);
192010
- var mainData = trace.orientation === 'h' ? 'y' : 'x';
192015
+ var isHorizontal = trace.orientation === 'h';
192016
+ var pa = Axes.getFromId(gd, isHorizontal ? trace.yaxis : trace.xaxis);
192017
+ var mainData = isHorizontal ? 'y' : 'x';
192011
192018
  var counterData = {x: 'y', y: 'x'}[mainData];
192012
192019
  var calendar = trace[mainData + 'calendar'];
192013
192020
  var cumulativeSpec = trace.cumulative;
@@ -230512,7 +230519,7 @@ function getSortFunc(opts, d2c) {
230512
230519
  'use strict';
230513
230520
 
230514
230521
  // package version injected by `npm run preprocess`
230515
- exports.version = '2.8.1';
230522
+ exports.version = '2.8.2';
230516
230523
 
230517
230524
  },{}],1120:[function(_dereq_,module,exports){
230518
230525
  (function (global){(function (){
package/dist/plotly.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * plotly.js v2.8.1
2
+ * plotly.js v2.8.2
3
3
  * Copyright 2012-2021, Plotly, Inc.
4
4
  * All rights reserved.
5
5
  * Licensed under the MIT license
@@ -173023,10 +173023,11 @@ function calcTexttemplate(fullLayout, cd, index, xa, ya) {
173023
173023
  if(!texttemplate) return '';
173024
173024
  var isWaterfall = (trace.type === 'waterfall');
173025
173025
  var isFunnel = (trace.type === 'funnel');
173026
+ var isHorizontal = trace.orientation === 'h';
173026
173027
 
173027
173028
  var pLetter, pAxis;
173028
173029
  var vLetter, vAxis;
173029
- if(trace.orientation === 'h') {
173030
+ if(isHorizontal) {
173030
173031
  pLetter = 'y';
173031
173032
  pAxis = ya;
173032
173033
  vLetter = 'x';
@@ -173061,6 +173062,11 @@ function calcTexttemplate(fullLayout, cd, index, xa, ya) {
173061
173062
  var pt = {};
173062
173063
  appendArrayPointValue(pt, trace, cdi.i);
173063
173064
 
173065
+ if(pt.x === undefined) pt.x = isHorizontal ? obj.value : obj.label;
173066
+ if(pt.y === undefined) pt.y = isHorizontal ? obj.label : obj.value;
173067
+ if(pt.xLabel === undefined) pt.xLabel = isHorizontal ? obj.valueLabel : obj.labelLabel;
173068
+ if(pt.yLabel === undefined) pt.yLabel = isHorizontal ? obj.labelLabel : obj.valueLabel;
173069
+
173064
173070
  if(isWaterfall) {
173065
173071
  obj.delta = +cdi.rawS || cdi.s;
173066
173072
  obj.deltaLabel = formatNumber(obj.delta);
@@ -187828,8 +187834,9 @@ var getBinSpanLabelRound = _dereq_('./bin_label_vals');
187828
187834
  function calc(gd, trace) {
187829
187835
  var pos = [];
187830
187836
  var size = [];
187831
- var pa = Axes.getFromId(gd, trace.orientation === 'h' ? trace.yaxis : trace.xaxis);
187832
- var mainData = trace.orientation === 'h' ? 'y' : 'x';
187837
+ var isHorizontal = trace.orientation === 'h';
187838
+ var pa = Axes.getFromId(gd, isHorizontal ? trace.yaxis : trace.xaxis);
187839
+ var mainData = isHorizontal ? 'y' : 'x';
187833
187840
  var counterData = {x: 'y', y: 'x'}[mainData];
187834
187841
  var calendar = trace[mainData + 'calendar'];
187835
187842
  var cumulativeSpec = trace.cumulative;
@@ -224083,7 +224090,7 @@ function getSortFunc(opts, d2c) {
224083
224090
  'use strict';
224084
224091
 
224085
224092
  // package version injected by `npm run preprocess`
224086
- exports.version = '2.8.1';
224093
+ exports.version = '2.8.2';
224087
224094
 
224088
224095
  },{}],1120:[function(_dereq_,module,exports){
224089
224096
  (function (global){(function (){