axidio-styleguide-library1-v2 0.0.784 → 0.0.786
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.
|
@@ -8419,7 +8419,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8419
8419
|
isDisplayBarDetailsAtBottom: undefined,
|
|
8420
8420
|
howmanyBarDetailsToDisplay: 0,
|
|
8421
8421
|
barVauleColor: undefined,
|
|
8422
|
-
defaultBarHeight:
|
|
8422
|
+
defaultBarHeight: 4,
|
|
8423
8423
|
};
|
|
8424
8424
|
this.uniqueId = this.getUniqueId();
|
|
8425
8425
|
this.isZoomedOut = false;
|
|
@@ -8453,7 +8453,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8453
8453
|
return false;
|
|
8454
8454
|
}
|
|
8455
8455
|
get isAlertEnabled() {
|
|
8456
|
-
return this.chartConfiguration?.headerMenuOptions?.some(option => option.id === 'editAlert');
|
|
8456
|
+
return this.chartConfiguration?.headerMenuOptions?.some((option) => option.id === 'editAlert');
|
|
8457
8457
|
}
|
|
8458
8458
|
initializegroupChart() {
|
|
8459
8459
|
var self = this;
|
|
@@ -8594,7 +8594,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8594
8594
|
var svgYAxisLeft = outerContainer
|
|
8595
8595
|
.append('svg')
|
|
8596
8596
|
.attr('width', '100')
|
|
8597
|
-
.attr('height',
|
|
8597
|
+
.attr('height', height + margin.top + margin.bottom + 10)
|
|
8598
8598
|
.style('position', 'absolute')
|
|
8599
8599
|
.style('left', '0')
|
|
8600
8600
|
.style('z-index', 1)
|
|
@@ -8603,7 +8603,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8603
8603
|
var svgYAxisRight = outerContainer
|
|
8604
8604
|
.append('svg')
|
|
8605
8605
|
.attr('width', rightSvgWidth)
|
|
8606
|
-
.attr('height',
|
|
8606
|
+
.attr('height', height + margin.top + margin.bottom + 10)
|
|
8607
8607
|
.style('position', 'absolute')
|
|
8608
8608
|
.style('right', '12px')
|
|
8609
8609
|
.style('z-index', 1)
|
|
@@ -8618,7 +8618,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8618
8618
|
.append('svg')
|
|
8619
8619
|
// .attr('id', self.uniqueId)
|
|
8620
8620
|
.attr('width', width - rightSvgWidth)
|
|
8621
|
-
.attr('height',
|
|
8621
|
+
.attr('height', height + margin.top + margin.bottom + 30)
|
|
8622
8622
|
// .call(ChartHelper.responsivefy)
|
|
8623
8623
|
.append('g')
|
|
8624
8624
|
.attr('transform', 'translate(' + 0 + ',' + margin.top + ')');
|
|
@@ -8676,7 +8676,8 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8676
8676
|
.call(d3.axisBottom(x))
|
|
8677
8677
|
.call((g) => g.select('.domain').remove());
|
|
8678
8678
|
svg.selectAll('g.x1.axis1 g.tick line').remove();
|
|
8679
|
-
svg
|
|
8679
|
+
svg
|
|
8680
|
+
.selectAll('g.x1.axis1 g.tick text')
|
|
8680
8681
|
.attr('class', 'lib-xaxis-labels-texts-drilldown')
|
|
8681
8682
|
.style('fill', 'var(--chart-text-color)');
|
|
8682
8683
|
// .attr('y', function () {
|
|
@@ -8765,16 +8766,18 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8765
8766
|
});
|
|
8766
8767
|
svg
|
|
8767
8768
|
.selectAll('g.x1.axis1 g.tick')
|
|
8768
|
-
.
|
|
8769
|
-
// Only
|
|
8770
|
-
|
|
8771
|
-
|
|
8772
|
-
|
|
8773
|
-
|
|
8774
|
-
|
|
8775
|
-
|
|
8776
|
-
|
|
8769
|
+
.filter(function (d) {
|
|
8770
|
+
return !/\d{2,4}[-\/]/.test(d); // Only process non-date labels
|
|
8771
|
+
})
|
|
8772
|
+
.append('text')
|
|
8773
|
+
.attr('class', 'lib-xaxis-labels-texts-drilldown')
|
|
8774
|
+
.attr('y', long_tick_length_bg)
|
|
8775
|
+
.attr('fill', 'var(--chart-text-color)')
|
|
8776
|
+
.text(function (d) {
|
|
8777
|
+
if (d.trim().indexOf(' ') > -1) {
|
|
8778
|
+
return d.trim().substring(d.indexOf(' '), d.length).toLowerCase();
|
|
8777
8779
|
}
|
|
8780
|
+
return '';
|
|
8778
8781
|
});
|
|
8779
8782
|
}
|
|
8780
8783
|
/**y scale for left y axis */
|
|
@@ -8980,10 +8983,14 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8980
8983
|
if (d.value == -1) {
|
|
8981
8984
|
return y(0);
|
|
8982
8985
|
}
|
|
8983
|
-
if (d.value
|
|
8984
|
-
|
|
8985
|
-
|
|
8986
|
-
|
|
8986
|
+
if (d.value) {
|
|
8987
|
+
// For values between 0 and 10, position bar at baseline with default height
|
|
8988
|
+
if (d.value <= 10 && d.value >= 0) {
|
|
8989
|
+
const defaultHeight = self.chartConfiguration.defaultBarHeight || 8;
|
|
8990
|
+
return y(0) - defaultHeight;
|
|
8991
|
+
}
|
|
8992
|
+
// For values greater than 10, use normal calculated position
|
|
8993
|
+
return y(d.value);
|
|
8987
8994
|
}
|
|
8988
8995
|
return y(0);
|
|
8989
8996
|
})
|
|
@@ -9027,10 +9034,13 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9027
9034
|
if (d.value == -1) {
|
|
9028
9035
|
return height - y(0);
|
|
9029
9036
|
}
|
|
9030
|
-
if (d.value
|
|
9031
|
-
|
|
9032
|
-
|
|
9033
|
-
|
|
9037
|
+
if (d.value) {
|
|
9038
|
+
// For values between 0 and 10 (inclusive), use default height
|
|
9039
|
+
if (d.value <= 10 && d.value >= 0) {
|
|
9040
|
+
return self.chartConfiguration.defaultBarHeight || 8;
|
|
9041
|
+
}
|
|
9042
|
+
// For values greater than 10, use calculated height
|
|
9043
|
+
return height - y(d.value);
|
|
9034
9044
|
}
|
|
9035
9045
|
return height - y(0);
|
|
9036
9046
|
})
|
|
@@ -9359,10 +9369,10 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9359
9369
|
.tickSize(0)
|
|
9360
9370
|
.ticks(self.chartConfiguration.numberOfYTicks)
|
|
9361
9371
|
.tickFormat(function (d) {
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
return
|
|
9372
|
+
const formatted = self.chartConfiguration.yAxisLabelFomatter
|
|
9373
|
+
? self.chartConfiguration.yAxisLabelFomatter(d)
|
|
9374
|
+
: d;
|
|
9375
|
+
return formatted >= 1000 ? formatted / 1000 + 'k' : formatted;
|
|
9366
9376
|
}))
|
|
9367
9377
|
.call((g) => {
|
|
9368
9378
|
// Style the domain line for theme support
|
|
@@ -9449,8 +9459,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9449
9459
|
text.text(null); // Clear current text
|
|
9450
9460
|
// Add each word to a new tspan
|
|
9451
9461
|
words.forEach((word, index) => {
|
|
9452
|
-
text.append('tspan')
|
|
9453
|
-
.text(word);
|
|
9462
|
+
text.append('tspan').text(word);
|
|
9454
9463
|
// .attr('x', '15')
|
|
9455
9464
|
// .attr('dy', index === 0 ? '0em' : '0.9em') // Reduced vertical spacing
|
|
9456
9465
|
// .attr('text-anchor', 'end');
|
|
@@ -9459,7 +9468,8 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9459
9468
|
.style('fill', 'var(--chart-text-color)')
|
|
9460
9469
|
.attr('transform', null); // Remove rotate if using line breaks
|
|
9461
9470
|
// Optional: Adjust bottom margin or chart layout
|
|
9462
|
-
svg
|
|
9471
|
+
svg
|
|
9472
|
+
.select('.x-axis')
|
|
9463
9473
|
.attr('transform', `translate(0, ${height - margin.bottom + 10})`);
|
|
9464
9474
|
}
|
|
9465
9475
|
/**
|
|
@@ -9471,7 +9481,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9471
9481
|
.attr('class', 'lib-axis-group-label font-size-1')
|
|
9472
9482
|
.attr('style', self.chartConfiguration.yAxisCustomlabelStyles)
|
|
9473
9483
|
.attr('transform', 'rotate(-90)')
|
|
9474
|
-
.attr('y', 0 -
|
|
9484
|
+
.attr('y', 0 - margin.left / 2 - 30)
|
|
9475
9485
|
.attr('x', 0 - height / 2)
|
|
9476
9486
|
.attr('dy', '1em')
|
|
9477
9487
|
.style('text-anchor', 'middle')
|