plotly.js 2.16.2 → 2.16.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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * plotly.js v2.16.2
2
+ * plotly.js v2.16.3
3
3
  * Copyright 2012-2022, Plotly, Inc.
4
4
  * All rights reserved.
5
5
  * Licensed under the MIT license
@@ -113680,7 +113680,17 @@ function createHoverText(hoverData, opts) {
113680
113680
  var xa = c0.xa;
113681
113681
  var ya = c0.ya;
113682
113682
  var axLetter = hovermode.charAt(0);
113683
- var t0 = c0[axLetter + 'Label'];
113683
+ var axLabel = axLetter + 'Label';
113684
+ var t0 = c0[axLabel];
113685
+
113686
+ // search in array for the label
113687
+ if(t0 === undefined && xa.type === 'multicategory') {
113688
+ for(var q = 0; q < hoverData.length; q++) {
113689
+ t0 = hoverData[q][axLabel];
113690
+ if(t0 !== undefined) break;
113691
+ }
113692
+ }
113693
+
113684
113694
  var outerContainerBB = getBoundingClientRect(gd, outerContainer);
113685
113695
  var outerTop = outerContainerBB.top;
113686
113696
  var outerWidth = outerContainerBB.width;
@@ -114859,7 +114869,7 @@ function getCoord(axLetter, winningPoint, fullLayout) {
114859
114869
 
114860
114870
  var cd0 = winningPoint.cd[0];
114861
114871
 
114862
- if(ax.type === 'category') val = ax._categoriesMap[val];
114872
+ if(ax.type === 'category' || ax.type === 'multicategory') val = ax._categoriesMap[val];
114863
114873
  else if(ax.type === 'date') {
114864
114874
  var periodalignment = winningPoint.trace[axLetter + 'periodalignment'];
114865
114875
  if(periodalignment) {
@@ -233914,7 +233924,7 @@ function getSortFunc(opts, d2c) {
233914
233924
  'use strict';
233915
233925
 
233916
233926
  // package version injected by `npm run preprocess`
233917
- exports.version = '2.16.2';
233927
+ exports.version = '2.16.3';
233918
233928
 
233919
233929
  },{}],1133:[function(_dereq_,module,exports){
233920
233930
  (function (global){(function (){
package/dist/plotly.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * plotly.js v2.16.2
2
+ * plotly.js v2.16.3
3
3
  * Copyright 2012-2022, Plotly, Inc.
4
4
  * All rights reserved.
5
5
  * Licensed under the MIT license
@@ -113183,7 +113183,17 @@ function createHoverText(hoverData, opts) {
113183
113183
  var xa = c0.xa;
113184
113184
  var ya = c0.ya;
113185
113185
  var axLetter = hovermode.charAt(0);
113186
- var t0 = c0[axLetter + 'Label'];
113186
+ var axLabel = axLetter + 'Label';
113187
+ var t0 = c0[axLabel];
113188
+
113189
+ // search in array for the label
113190
+ if(t0 === undefined && xa.type === 'multicategory') {
113191
+ for(var q = 0; q < hoverData.length; q++) {
113192
+ t0 = hoverData[q][axLabel];
113193
+ if(t0 !== undefined) break;
113194
+ }
113195
+ }
113196
+
113187
113197
  var outerContainerBB = getBoundingClientRect(gd, outerContainer);
113188
113198
  var outerTop = outerContainerBB.top;
113189
113199
  var outerWidth = outerContainerBB.width;
@@ -114362,7 +114372,7 @@ function getCoord(axLetter, winningPoint, fullLayout) {
114362
114372
 
114363
114373
  var cd0 = winningPoint.cd[0];
114364
114374
 
114365
- if(ax.type === 'category') val = ax._categoriesMap[val];
114375
+ if(ax.type === 'category' || ax.type === 'multicategory') val = ax._categoriesMap[val];
114366
114376
  else if(ax.type === 'date') {
114367
114377
  var periodalignment = winningPoint.trace[axLetter + 'periodalignment'];
114368
114378
  if(periodalignment) {
@@ -227364,7 +227374,7 @@ function getSortFunc(opts, d2c) {
227364
227374
  'use strict';
227365
227375
 
227366
227376
  // package version injected by `npm run preprocess`
227367
- exports.version = '2.16.2';
227377
+ exports.version = '2.16.3';
227368
227378
 
227369
227379
  },{}],1133:[function(_dereq_,module,exports){
227370
227380
  (function (global){(function (){