axidio-styleguide-library1-v2 0.0.947 → 0.0.948
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.
|
@@ -8791,6 +8791,10 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8791
8791
|
.selectAll('g.x1.axis1 g.tick text')
|
|
8792
8792
|
.attr('class', 'lib-xaxis-labels-texts-weeklycharts')
|
|
8793
8793
|
.attr('y', function () {
|
|
8794
|
+
// Minimize gap in maximized (fullscreen) view for weekly charts
|
|
8795
|
+
if (self.chartConfiguration.isFullScreen) {
|
|
8796
|
+
return short_tick_length_bg;
|
|
8797
|
+
}
|
|
8794
8798
|
if (alternate_text) {
|
|
8795
8799
|
alternate_text = false;
|
|
8796
8800
|
return long_tick_length_bg;
|
|
@@ -8809,11 +8813,19 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8809
8813
|
.attr('y', function (d) {
|
|
8810
8814
|
// For grouped bar charts with many bars and xLabel present, do NOT add extra space (avoid overlap)
|
|
8811
8815
|
if (subgroups.length > 1 && data.length > 8 && metaData.xLabel) {
|
|
8816
|
+
// In maximized (fullscreen) view, keep the gap minimal
|
|
8817
|
+
if (self.chartConfiguration.isFullScreen) {
|
|
8818
|
+
return short_tick_length_bg;
|
|
8819
|
+
}
|
|
8812
8820
|
return short_tick_length_bg;
|
|
8813
8821
|
}
|
|
8814
|
-
// For grouped bar charts with many bars and NO xLabel, add space as before
|
|
8822
|
+
// For grouped bar charts with many bars and NO xLabel, add space as before, but reduce in fullscreen
|
|
8815
8823
|
if (subgroups.length > 1 && data.length > 8 && !metaData.xLabel) {
|
|
8816
8824
|
const chartHasExtraBottom = (self.chartConfiguration.margin && self.chartConfiguration.margin.bottom >= 40);
|
|
8825
|
+
if (self.chartConfiguration.isFullScreen) {
|
|
8826
|
+
// Reduce extra gap in maximized view
|
|
8827
|
+
return short_tick_length_bg + 2;
|
|
8828
|
+
}
|
|
8817
8829
|
return chartHasExtraBottom ? short_tick_length_bg : short_tick_length_bg + 10;
|
|
8818
8830
|
}
|
|
8819
8831
|
// Default/fallback logic for other cases
|
|
@@ -8826,6 +8838,10 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8826
8838
|
if (/\d{2,4}[-\/]\d{2,4}/.test(d) && d.indexOf(' ') > -1) {
|
|
8827
8839
|
baseY += 4;
|
|
8828
8840
|
}
|
|
8841
|
+
// In maximized view, reduce baseY slightly for grouped bars
|
|
8842
|
+
if (self.chartConfiguration.isFullScreen && subgroups.length > 1) {
|
|
8843
|
+
baseY = Math.max(short_tick_length_bg, baseY - 10);
|
|
8844
|
+
}
|
|
8829
8845
|
return baseY;
|
|
8830
8846
|
})
|
|
8831
8847
|
.attr('x', function (d) {
|
|
@@ -9297,10 +9313,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9297
9313
|
.on('mouseout', handleMouseOut)
|
|
9298
9314
|
.on('mouseover', handleMouseOver);
|
|
9299
9315
|
}
|
|
9300
|
-
|
|
9301
|
-
(this.chartConfiguration.textsOnBar === undefined &&
|
|
9302
|
-
this.chartConfiguration.displayTitleOnTop === undefined);
|
|
9303
|
-
if (shouldBindMouseEvents) {
|
|
9316
|
+
if (this.chartConfiguration.displayTitleOnTop) {
|
|
9304
9317
|
state
|
|
9305
9318
|
.selectAll('rect')
|
|
9306
9319
|
.on('mouseout', handleMouseOut)
|
|
@@ -9422,6 +9435,49 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9422
9435
|
* display data values on mouse over
|
|
9423
9436
|
* used by dashboard charts
|
|
9424
9437
|
*/
|
|
9438
|
+
if (this.chartConfiguration.textsOnBar == undefined &&
|
|
9439
|
+
this.chartConfiguration.displayTitleOnTop == undefined) {
|
|
9440
|
+
state
|
|
9441
|
+
.selectAll('rect')
|
|
9442
|
+
.on('mouseout', function (d) {
|
|
9443
|
+
state.selectAll('.barstext').remove();
|
|
9444
|
+
})
|
|
9445
|
+
.on('mouseover', function (d1) {
|
|
9446
|
+
state
|
|
9447
|
+
.selectAll('text')
|
|
9448
|
+
.data(function (d) {
|
|
9449
|
+
let newList = [];
|
|
9450
|
+
subgroups.map(function (key) {
|
|
9451
|
+
if (key !== 'name' &&
|
|
9452
|
+
d1.key == key &&
|
|
9453
|
+
d1.value == d[key] &&
|
|
9454
|
+
d1.name == d.name) {
|
|
9455
|
+
let obj = { key: key, value: d[key], name: d.name };
|
|
9456
|
+
newList.push(obj);
|
|
9457
|
+
}
|
|
9458
|
+
});
|
|
9459
|
+
return newList;
|
|
9460
|
+
})
|
|
9461
|
+
.enter()
|
|
9462
|
+
.append('text')
|
|
9463
|
+
.attr('fill', 'var(--chart-text-color)')
|
|
9464
|
+
.attr('class', 'barstext')
|
|
9465
|
+
.attr('x', function (d) {
|
|
9466
|
+
return xSubgroup(d.key);
|
|
9467
|
+
})
|
|
9468
|
+
.attr('y', function (d) {
|
|
9469
|
+
return y(d.value);
|
|
9470
|
+
})
|
|
9471
|
+
.attr('style', 'font-size: ' + '.85em' + ';' + ' font-weight:' + 'bold' + ';')
|
|
9472
|
+
.style('fill', function (d) {
|
|
9473
|
+
return metaData.colors[d.key];
|
|
9474
|
+
})
|
|
9475
|
+
.attr('width', self.isZoomedOut ? xSubgroup.bandwidth() : xSubgroup.bandwidth())
|
|
9476
|
+
.text(function (d) {
|
|
9477
|
+
return d.value;
|
|
9478
|
+
});
|
|
9479
|
+
});
|
|
9480
|
+
}
|
|
9425
9481
|
svg
|
|
9426
9482
|
.append('g')
|
|
9427
9483
|
.attr('class', 'x2 axis2')
|