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 (finance) v2.16.2
2
+ * plotly.js (finance) v2.16.4
3
3
  * Copyright 2012-2022, Plotly, Inc.
4
4
  * All rights reserved.
5
5
  * Licensed under the MIT license
@@ -24751,7 +24751,7 @@ module.exports = {
24751
24751
  calc: _dereq_('./calc'),
24752
24752
 
24753
24753
  // ./scales.js is required in lib/coerce.js ;
24754
- // it needs to be a separate module to avoid circular a dependency
24754
+ // it needs to be a separate module to avoid a circular dependency
24755
24755
  scales: scales.scales,
24756
24756
  defaultScale: scales.defaultScale,
24757
24757
  getScale: scales.get,
@@ -29939,7 +29939,17 @@ function createHoverText(hoverData, opts) {
29939
29939
  var xa = c0.xa;
29940
29940
  var ya = c0.ya;
29941
29941
  var axLetter = hovermode.charAt(0);
29942
- var t0 = c0[axLetter + 'Label'];
29942
+ var axLabel = axLetter + 'Label';
29943
+ var t0 = c0[axLabel];
29944
+
29945
+ // search in array for the label
29946
+ if(t0 === undefined && xa.type === 'multicategory') {
29947
+ for(var q = 0; q < hoverData.length; q++) {
29948
+ t0 = hoverData[q][axLabel];
29949
+ if(t0 !== undefined) break;
29950
+ }
29951
+ }
29952
+
29943
29953
  var outerContainerBB = getBoundingClientRect(gd, outerContainer);
29944
29954
  var outerTop = outerContainerBB.top;
29945
29955
  var outerWidth = outerContainerBB.width;
@@ -31118,7 +31128,7 @@ function getCoord(axLetter, winningPoint, fullLayout) {
31118
31128
 
31119
31129
  var cd0 = winningPoint.cd[0];
31120
31130
 
31121
- if(ax.type === 'category') val = ax._categoriesMap[val];
31131
+ if(ax.type === 'category' || ax.type === 'multicategory') val = ax._categoriesMap[val];
31122
31132
  else if(ax.type === 'date') {
31123
31133
  var periodalignment = winningPoint.trace[axLetter + 'periodalignment'];
31124
31134
  if(periodalignment) {
@@ -93412,7 +93422,7 @@ function getSortFunc(opts, d2c) {
93412
93422
  'use strict';
93413
93423
 
93414
93424
  // package version injected by `npm run preprocess`
93415
- exports.version = '2.16.2';
93425
+ exports.version = '2.16.4';
93416
93426
 
93417
93427
  },{}]},{},[12])(12)
93418
93428
  });