axidio-styleguide-library1-v2 0.7.44 → 0.7.45
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,14 +7109,7 @@ 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
|
-
|
|
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 };
|
|
7112
|
+
return { svg, svgYAxisLeft, svgYAxisRight, innerContainer, bottomLabelContainer };
|
|
7120
7113
|
}
|
|
7121
7114
|
createScales(data, layers, lineData, dimensions) {
|
|
7122
7115
|
const { width, height, barWidth, barPadding } = dimensions;
|
|
@@ -7294,12 +7287,28 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7294
7287
|
}
|
|
7295
7288
|
return metaData.hoverColor || metaData.colors[d.key];
|
|
7296
7289
|
}
|
|
7297
|
-
displayTooltip(d,
|
|
7290
|
+
displayTooltip(d, svg, metaData, scales) {
|
|
7291
|
+
const { xScale, yScale } = scales;
|
|
7298
7292
|
const value = d[1] - d[0];
|
|
7299
7293
|
if (isNaN(value))
|
|
7300
7294
|
return;
|
|
7301
|
-
|
|
7302
|
-
|
|
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)
|
|
7303
7312
|
.html(this.generateTooltipHtml(d, metaData, value));
|
|
7304
7313
|
}
|
|
7305
7314
|
calculateTooltipX(d, xScale, width) {
|