axidio-styleguide-library1-v2 0.0.956 → 0.0.958
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.
|
@@ -9325,13 +9325,16 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9325
9325
|
.on('mouseout', handleMouseOut)
|
|
9326
9326
|
.on('mouseover', handleMouseOver);
|
|
9327
9327
|
}
|
|
9328
|
-
if (this.chartConfiguration.displayTitleOnTop
|
|
9328
|
+
if (this.chartConfiguration.displayTitleOnTop ||
|
|
9329
|
+
(this.chartConfiguration.textsOnBar == undefined &&
|
|
9330
|
+
this.chartConfiguration.displayTitleOnTop == undefined)) {
|
|
9329
9331
|
state
|
|
9330
9332
|
.selectAll('rect')
|
|
9331
9333
|
.on('mouseout', handleMouseOut)
|
|
9332
9334
|
.on('mouseover', handleMouseOver);
|
|
9333
9335
|
}
|
|
9334
9336
|
function handleMouseOver(d, i) {
|
|
9337
|
+
svg.selectAll('.lib-verticalstack-title-ontop').remove();
|
|
9335
9338
|
svg
|
|
9336
9339
|
.append('foreignObject')
|
|
9337
9340
|
.attr('x', function () {
|
|
@@ -9443,97 +9446,6 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9443
9446
|
}
|
|
9444
9447
|
svg.selectAll('.lib-verticalstack-title-ontop').remove();
|
|
9445
9448
|
}
|
|
9446
|
-
/**
|
|
9447
|
-
* display data values on mouse over
|
|
9448
|
-
* used by dashboard charts
|
|
9449
|
-
*/
|
|
9450
|
-
if (this.chartConfiguration.textsOnBar == undefined &&
|
|
9451
|
-
this.chartConfiguration.displayTitleOnTop == undefined) {
|
|
9452
|
-
state
|
|
9453
|
-
.selectAll('rect')
|
|
9454
|
-
.on('mouseout', function (d) {
|
|
9455
|
-
state.selectAll('.lib-verticalstack-title-ontop').remove();
|
|
9456
|
-
})
|
|
9457
|
-
.on('mouseover', function (d1) {
|
|
9458
|
-
// Calculate positioning scale
|
|
9459
|
-
let tempScale;
|
|
9460
|
-
data.map((indiv) => {
|
|
9461
|
-
if (indiv.name == d1.name) {
|
|
9462
|
-
let keys = Object.keys(indiv).filter((temp, i) => i != 0);
|
|
9463
|
-
tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
|
|
9464
|
-
if (x.bandwidth() > 100) {
|
|
9465
|
-
if (self.chartData.data.length == 1) {
|
|
9466
|
-
if (Object.keys(self.chartData.data[0]).length == 2) {
|
|
9467
|
-
tempScale.range([
|
|
9468
|
-
0 + (x.bandwidth() - 200) / 2,
|
|
9469
|
-
x.bandwidth() - (x.bandwidth() - 200) / 2,
|
|
9470
|
-
]);
|
|
9471
|
-
}
|
|
9472
|
-
else {
|
|
9473
|
-
tempScale.range([
|
|
9474
|
-
0 + (x.bandwidth() - 300) / 2,
|
|
9475
|
-
x.bandwidth() - (x.bandwidth() - 300) / 2,
|
|
9476
|
-
]);
|
|
9477
|
-
}
|
|
9478
|
-
}
|
|
9479
|
-
else {
|
|
9480
|
-
tempScale.range([
|
|
9481
|
-
0 + (x.bandwidth() - 125) / 2,
|
|
9482
|
-
x.bandwidth() - (x.bandwidth() - 125) / 2,
|
|
9483
|
-
]);
|
|
9484
|
-
}
|
|
9485
|
-
}
|
|
9486
|
-
}
|
|
9487
|
-
});
|
|
9488
|
-
state
|
|
9489
|
-
.append('foreignObject')
|
|
9490
|
-
.attr('class', 'lib-verticalstack-title-ontop')
|
|
9491
|
-
.attr('x', function () {
|
|
9492
|
-
if (metaData.hasDrillDown) {
|
|
9493
|
-
if (tempScale.bandwidth() + leftAndRightSpaces * 2 > 180) {
|
|
9494
|
-
return (xSubgroup(d1.key) + tempScale.bandwidth() / 2 - 90);
|
|
9495
|
-
}
|
|
9496
|
-
return (xSubgroup(d1.key) -
|
|
9497
|
-
(tempScale.bandwidth() + leftAndRightSpaces * 2) / 2 +
|
|
9498
|
-
tempScale.bandwidth() / 2);
|
|
9499
|
-
}
|
|
9500
|
-
else {
|
|
9501
|
-
return xSubgroup(d1.key) - (tempScale.bandwidth() + leftAndRightSpaces * 2) / 2 + tempScale.bandwidth() / 2;
|
|
9502
|
-
}
|
|
9503
|
-
})
|
|
9504
|
-
.attr('y', function () {
|
|
9505
|
-
return y(d1.value) - 3 - 40 - 10;
|
|
9506
|
-
})
|
|
9507
|
-
.attr('width', function () {
|
|
9508
|
-
if (metaData.hasDrillDown) {
|
|
9509
|
-
if (tempScale.bandwidth() + leftAndRightSpaces * 2 > 180) {
|
|
9510
|
-
return '180px';
|
|
9511
|
-
}
|
|
9512
|
-
return tempScale.bandwidth() + leftAndRightSpaces * 2;
|
|
9513
|
-
}
|
|
9514
|
-
else {
|
|
9515
|
-
return tempScale.bandwidth() + leftAndRightSpaces * 2;
|
|
9516
|
-
}
|
|
9517
|
-
})
|
|
9518
|
-
.attr('height', 40)
|
|
9519
|
-
.append('xhtml:div')
|
|
9520
|
-
.attr('class', 'title')
|
|
9521
|
-
.style('z-index', 99)
|
|
9522
|
-
.html(function () {
|
|
9523
|
-
let barLabel = d1.key;
|
|
9524
|
-
let dataType = metaData.dataType ? metaData.dataType : '';
|
|
9525
|
-
let value = d1.value;
|
|
9526
|
-
let desiredText = '<span class="title-bar-name">' + barLabel + '</span>';
|
|
9527
|
-
desiredText +=
|
|
9528
|
-
'<span class="title-bar-value"><span>' +
|
|
9529
|
-
value +
|
|
9530
|
-
'</span>' +
|
|
9531
|
-
dataType +
|
|
9532
|
-
'</span>';
|
|
9533
|
-
return desiredText;
|
|
9534
|
-
});
|
|
9535
|
-
});
|
|
9536
|
-
}
|
|
9537
9449
|
svg
|
|
9538
9450
|
.append('g')
|
|
9539
9451
|
.attr('class', 'x2 axis2')
|