plotly.js 2.16.1 → 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.1
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) {
@@ -121268,7 +121278,7 @@ proto.updateFx = function(fullLayout) {
121268
121278
  map.off('click', self.onClickInPanHandler);
121269
121279
  if(selectMode(dragMode) || drawMode(dragMode)) {
121270
121280
  map.dragPan.disable();
121271
- map.on('zoomstart', self.clearSelect);
121281
+ map.on('zoomstart', self.clearOutline);
121272
121282
 
121273
121283
  self.dragOptions.prepFn = function(e, startX, startY) {
121274
121284
  prepSelect(e, startX, startY, self.dragOptions, dragMode);
@@ -121277,7 +121287,7 @@ proto.updateFx = function(fullLayout) {
121277
121287
  dragElement.init(self.dragOptions);
121278
121288
  } else {
121279
121289
  map.dragPan.enable();
121280
- map.off('zoomstart', self.clearSelect);
121290
+ map.off('zoomstart', self.clearOutline);
121281
121291
  self.div.onmousedown = null;
121282
121292
  self.div.ontouchstart = null;
121283
121293
  self.div.removeEventListener('touchstart', self.div._ontouchstart);
@@ -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.1';
132823
+ exports.version = '2.16.3';
132814
132824
 
132815
132825
  },{}]},{},[9])(9)
132816
132826
  });