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 (mapbox) v2.16.2
2
+ * plotly.js (mapbox) v2.16.3
3
3
  * Copyright 2012-2022, Plotly, Inc.
4
4
  * All rights reserved.
5
5
  * Licensed under the MIT license
@@ -75982,7 +75982,17 @@ function createHoverText(hoverData, opts) {
75982
75982
  var xa = c0.xa;
75983
75983
  var ya = c0.ya;
75984
75984
  var axLetter = hovermode.charAt(0);
75985
- var t0 = c0[axLetter + 'Label'];
75985
+ var axLabel = axLetter + 'Label';
75986
+ var t0 = c0[axLabel];
75987
+
75988
+ // search in array for the label
75989
+ if(t0 === undefined && xa.type === 'multicategory') {
75990
+ for(var q = 0; q < hoverData.length; q++) {
75991
+ t0 = hoverData[q][axLabel];
75992
+ if(t0 !== undefined) break;
75993
+ }
75994
+ }
75995
+
75986
75996
  var outerContainerBB = getBoundingClientRect(gd, outerContainer);
75987
75997
  var outerTop = outerContainerBB.top;
75988
75998
  var outerWidth = outerContainerBB.width;
@@ -77161,7 +77171,7 @@ function getCoord(axLetter, winningPoint, fullLayout) {
77161
77171
 
77162
77172
  var cd0 = winningPoint.cd[0];
77163
77173
 
77164
- if(ax.type === 'category') val = ax._categoriesMap[val];
77174
+ if(ax.type === 'category' || ax.type === 'multicategory') val = ax._categoriesMap[val];
77165
77175
  else if(ax.type === 'date') {
77166
77176
  var periodalignment = winningPoint.trace[axLetter + 'periodalignment'];
77167
77177
  if(periodalignment) {
@@ -132810,7 +132820,7 @@ function getSortFunc(opts, d2c) {
132810
132820
  'use strict';
132811
132821
 
132812
132822
  // package version injected by `npm run preprocess`
132813
- exports.version = '2.16.2';
132823
+ exports.version = '2.16.3';
132814
132824
 
132815
132825
  },{}]},{},[9])(9)
132816
132826
  });