plotly.js 2.16.2 → 2.16.4

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 (gl2d) v2.16.2
2
+ * plotly.js (gl2d) v2.16.4
3
3
  * Copyright 2012-2022, Plotly, Inc.
4
4
  * All rights reserved.
5
5
  * Licensed under the MIT license
@@ -36999,7 +36999,7 @@ module.exports = {
36999
36999
  calc: _dereq_('./calc'),
37000
37000
 
37001
37001
  // ./scales.js is required in lib/coerce.js ;
37002
- // it needs to be a separate module to avoid circular a dependency
37002
+ // it needs to be a separate module to avoid a circular dependency
37003
37003
  scales: scales.scales,
37004
37004
  defaultScale: scales.defaultScale,
37005
37005
  getScale: scales.get,
@@ -42187,7 +42187,17 @@ function createHoverText(hoverData, opts) {
42187
42187
  var xa = c0.xa;
42188
42188
  var ya = c0.ya;
42189
42189
  var axLetter = hovermode.charAt(0);
42190
- var t0 = c0[axLetter + 'Label'];
42190
+ var axLabel = axLetter + 'Label';
42191
+ var t0 = c0[axLabel];
42192
+
42193
+ // search in array for the label
42194
+ if(t0 === undefined && xa.type === 'multicategory') {
42195
+ for(var q = 0; q < hoverData.length; q++) {
42196
+ t0 = hoverData[q][axLabel];
42197
+ if(t0 !== undefined) break;
42198
+ }
42199
+ }
42200
+
42191
42201
  var outerContainerBB = getBoundingClientRect(gd, outerContainer);
42192
42202
  var outerTop = outerContainerBB.top;
42193
42203
  var outerWidth = outerContainerBB.width;
@@ -43366,7 +43376,7 @@ function getCoord(axLetter, winningPoint, fullLayout) {
43366
43376
 
43367
43377
  var cd0 = winningPoint.cd[0];
43368
43378
 
43369
- if(ax.type === 'category') val = ax._categoriesMap[val];
43379
+ if(ax.type === 'category' || ax.type === 'multicategory') val = ax._categoriesMap[val];
43370
43380
  else if(ax.type === 'date') {
43371
43381
  var periodalignment = winningPoint.trace[axLetter + 'periodalignment'];
43372
43382
  if(periodalignment) {
@@ -103786,7 +103796,7 @@ function getSortFunc(opts, d2c) {
103786
103796
  'use strict';
103787
103797
 
103788
103798
  // package version injected by `npm run preprocess`
103789
- exports.version = '2.16.2';
103799
+ exports.version = '2.16.4';
103790
103800
 
103791
103801
  },{}],600:[function(_dereq_,module,exports){
103792
103802
  (function (global){(function (){