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 (finance) v2.8.1
2
+ * plotly.js (finance) v2.8.2
3
3
  * Copyright 2012-2021, Plotly, Inc.
4
4
  * All rights reserved.
5
5
  * Licensed under the MIT license
@@ -77358,10 +77358,11 @@ function calcTexttemplate(fullLayout, cd, index, xa, ya) {
77358
77358
  if(!texttemplate) return '';
77359
77359
  var isWaterfall = (trace.type === 'waterfall');
77360
77360
  var isFunnel = (trace.type === 'funnel');
77361
+ var isHorizontal = trace.orientation === 'h';
77361
77362
 
77362
77363
  var pLetter, pAxis;
77363
77364
  var vLetter, vAxis;
77364
- if(trace.orientation === 'h') {
77365
+ if(isHorizontal) {
77365
77366
  pLetter = 'y';
77366
77367
  pAxis = ya;
77367
77368
  vLetter = 'x';
@@ -77396,6 +77397,11 @@ function calcTexttemplate(fullLayout, cd, index, xa, ya) {
77396
77397
  var pt = {};
77397
77398
  appendArrayPointValue(pt, trace, cdi.i);
77398
77399
 
77400
+ if(pt.x === undefined) pt.x = isHorizontal ? obj.value : obj.label;
77401
+ if(pt.y === undefined) pt.y = isHorizontal ? obj.label : obj.value;
77402
+ if(pt.xLabel === undefined) pt.xLabel = isHorizontal ? obj.valueLabel : obj.labelLabel;
77403
+ if(pt.yLabel === undefined) pt.yLabel = isHorizontal ? obj.labelLabel : obj.valueLabel;
77404
+
77399
77405
  if(isWaterfall) {
77400
77406
  obj.delta = +cdi.rawS || cdi.s;
77401
77407
  obj.deltaLabel = formatNumber(obj.delta);
@@ -80830,8 +80836,9 @@ var getBinSpanLabelRound = _dereq_('./bin_label_vals');
80830
80836
  function calc(gd, trace) {
80831
80837
  var pos = [];
80832
80838
  var size = [];
80833
- var pa = Axes.getFromId(gd, trace.orientation === 'h' ? trace.yaxis : trace.xaxis);
80834
- var mainData = trace.orientation === 'h' ? 'y' : 'x';
80839
+ var isHorizontal = trace.orientation === 'h';
80840
+ var pa = Axes.getFromId(gd, isHorizontal ? trace.yaxis : trace.xaxis);
80841
+ var mainData = isHorizontal ? 'y' : 'x';
80835
80842
  var counterData = {x: 'y', y: 'x'}[mainData];
80836
80843
  var calendar = trace[mainData + 'calendar'];
80837
80844
  var cumulativeSpec = trace.cumulative;
@@ -90610,7 +90617,7 @@ function getSortFunc(opts, d2c) {
90610
90617
  'use strict';
90611
90618
 
90612
90619
  // package version injected by `npm run preprocess`
90613
- exports.version = '2.8.1';
90620
+ exports.version = '2.8.2';
90614
90621
 
90615
90622
  },{}]},{},[12])(12)
90616
90623
  });