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 (cartesian) v2.16.2
2
+ * plotly.js (cartesian) v2.16.4
3
3
  * Copyright 2012-2022, Plotly, Inc.
4
4
  * All rights reserved.
5
5
  * Licensed under the MIT license
@@ -32701,7 +32701,7 @@ module.exports = {
32701
32701
  calc: _dereq_('./calc'),
32702
32702
 
32703
32703
  // ./scales.js is required in lib/coerce.js ;
32704
- // it needs to be a separate module to avoid circular a dependency
32704
+ // it needs to be a separate module to avoid a circular dependency
32705
32705
  scales: scales.scales,
32706
32706
  defaultScale: scales.defaultScale,
32707
32707
  getScale: scales.get,
@@ -37889,7 +37889,17 @@ function createHoverText(hoverData, opts) {
37889
37889
  var xa = c0.xa;
37890
37890
  var ya = c0.ya;
37891
37891
  var axLetter = hovermode.charAt(0);
37892
- var t0 = c0[axLetter + 'Label'];
37892
+ var axLabel = axLetter + 'Label';
37893
+ var t0 = c0[axLabel];
37894
+
37895
+ // search in array for the label
37896
+ if(t0 === undefined && xa.type === 'multicategory') {
37897
+ for(var q = 0; q < hoverData.length; q++) {
37898
+ t0 = hoverData[q][axLabel];
37899
+ if(t0 !== undefined) break;
37900
+ }
37901
+ }
37902
+
37893
37903
  var outerContainerBB = getBoundingClientRect(gd, outerContainer);
37894
37904
  var outerTop = outerContainerBB.top;
37895
37905
  var outerWidth = outerContainerBB.width;
@@ -39068,7 +39078,7 @@ function getCoord(axLetter, winningPoint, fullLayout) {
39068
39078
 
39069
39079
  var cd0 = winningPoint.cd[0];
39070
39080
 
39071
- if(ax.type === 'category') val = ax._categoriesMap[val];
39081
+ if(ax.type === 'category' || ax.type === 'multicategory') val = ax._categoriesMap[val];
39072
39082
  else if(ax.type === 'date') {
39073
39083
  var periodalignment = winningPoint.trace[axLetter + 'periodalignment'];
39074
39084
  if(periodalignment) {
@@ -105651,7 +105661,7 @@ function getSortFunc(opts, d2c) {
105651
105661
  'use strict';
105652
105662
 
105653
105663
  // package version injected by `npm run preprocess`
105654
- exports.version = '2.16.2';
105664
+ exports.version = '2.16.4';
105655
105665
 
105656
105666
  },{}]},{},[15])(15)
105657
105667
  });