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 (strict) v2.16.1
2
+ * plotly.js (strict) v2.16.3
3
3
  * Copyright 2012-2022, Plotly, Inc.
4
4
  * All rights reserved.
5
5
  * Licensed under the MIT license
@@ -113163,7 +113163,17 @@ function createHoverText(hoverData, opts) {
113163
113163
  var xa = c0.xa;
113164
113164
  var ya = c0.ya;
113165
113165
  var axLetter = hovermode.charAt(0);
113166
- var t0 = c0[axLetter + 'Label'];
113166
+ var axLabel = axLetter + 'Label';
113167
+ var t0 = c0[axLabel];
113168
+
113169
+ // search in array for the label
113170
+ if(t0 === undefined && xa.type === 'multicategory') {
113171
+ for(var q = 0; q < hoverData.length; q++) {
113172
+ t0 = hoverData[q][axLabel];
113173
+ if(t0 !== undefined) break;
113174
+ }
113175
+ }
113176
+
113167
113177
  var outerContainerBB = getBoundingClientRect(gd, outerContainer);
113168
113178
  var outerTop = outerContainerBB.top;
113169
113179
  var outerWidth = outerContainerBB.width;
@@ -114342,7 +114352,7 @@ function getCoord(axLetter, winningPoint, fullLayout) {
114342
114352
 
114343
114353
  var cd0 = winningPoint.cd[0];
114344
114354
 
114345
- if(ax.type === 'category') val = ax._categoriesMap[val];
114355
+ if(ax.type === 'category' || ax.type === 'multicategory') val = ax._categoriesMap[val];
114346
114356
  else if(ax.type === 'date') {
114347
114357
  var periodalignment = winningPoint.trace[axLetter + 'periodalignment'];
114348
114358
  if(periodalignment) {
@@ -187220,7 +187230,7 @@ proto.updateFx = function(fullLayout) {
187220
187230
  map.off('click', self.onClickInPanHandler);
187221
187231
  if(selectMode(dragMode) || drawMode(dragMode)) {
187222
187232
  map.dragPan.disable();
187223
- map.on('zoomstart', self.clearSelect);
187233
+ map.on('zoomstart', self.clearOutline);
187224
187234
 
187225
187235
  self.dragOptions.prepFn = function(e, startX, startY) {
187226
187236
  prepSelect(e, startX, startY, self.dragOptions, dragMode);
@@ -187229,7 +187239,7 @@ proto.updateFx = function(fullLayout) {
187229
187239
  dragElement.init(self.dragOptions);
187230
187240
  } else {
187231
187241
  map.dragPan.enable();
187232
- map.off('zoomstart', self.clearSelect);
187242
+ map.off('zoomstart', self.clearOutline);
187233
187243
  self.div.onmousedown = null;
187234
187244
  self.div.ontouchstart = null;
187235
187245
  self.div.removeEventListener('touchstart', self.div._ontouchstart);
@@ -250400,7 +250410,7 @@ function getSortFunc(opts, d2c) {
250400
250410
  'use strict';
250401
250411
 
250402
250412
  // package version injected by `npm run preprocess`
250403
- exports.version = '2.16.1';
250413
+ exports.version = '2.16.3';
250404
250414
 
250405
250415
  },{}],1151:[function(_dereq_,module,exports){
250406
250416
  (function (global){(function (){