axidio-styleguide-library1-v2 0.7.43 → 0.7.44

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.
@@ -7109,7 +7109,14 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7109
7109
  .style('align-items', 'center')
7110
7110
  .style('background-color', 'var(--card-bg)')
7111
7111
  .style('z-index', '10');
7112
- return { svg, svgYAxisLeft, svgYAxisRight, innerContainer, bottomLabelContainer };
7112
+ const tooltip = chartWrapper
7113
+ .append('div')
7114
+ .attr('class', 'chart-tooltip')
7115
+ .style('position', 'absolute')
7116
+ .style('pointer-events', 'none')
7117
+ .style('z-index', '9999')
7118
+ .style('display', 'none');
7119
+ return { svg, svgYAxisLeft, svgYAxisRight, innerContainer, bottomLabelContainer, tooltip };
7113
7120
  }
7114
7121
  createScales(data, layers, lineData, dimensions) {
7115
7122
  const { width, height, barWidth, barPadding } = dimensions;
@@ -7287,28 +7294,12 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7287
7294
  }
7288
7295
  return metaData.hoverColor || metaData.colors[d.key];
7289
7296
  }
7290
- displayTooltip(d, svg, metaData, scales) {
7291
- const { xScale, yScale } = scales;
7297
+ displayTooltip(d, tooltip, metaData, scales) {
7292
7298
  const value = d[1] - d[0];
7293
7299
  if (isNaN(value))
7294
7300
  return;
7295
- const bandwidth = xScale.bandwidth();
7296
- // Fixed tooltip width for all resolutions
7297
- const width = /week/i.test(d.data.name) && /\d{4}-\d{2}-\d{2}/.test(d.data.name)
7298
- ? '250px'
7299
- : bandwidth + this.CONSTANTS.LEFT_RIGHT_SPACES * 2 > 180
7300
- ? '180px'
7301
- : bandwidth + this.CONSTANTS.LEFT_RIGHT_SPACES * 2;
7302
- svg
7303
- .append('foreignObject')
7304
- .attr('x', this.calculateTooltipX(d, xScale, width))
7305
- .attr('class', 'lib-verticalstack-title-ontop')
7306
- .attr('y', yScale(d[1]) - 51)
7307
- .attr('width', width)
7308
- .attr('height', 40)
7309
- .append('xhtml:div')
7310
- .attr('class', 'title')
7311
- .style('z-index', '99')
7301
+ tooltip
7302
+ .style('display', 'block')
7312
7303
  .html(this.generateTooltipHtml(d, metaData, value));
7313
7304
  }
7314
7305
  calculateTooltipX(d, xScale, width) {