axidio-styleguide-library1-v2 0.0.988 → 0.0.990
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.
|
@@ -8838,6 +8838,15 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8838
8838
|
if (isValueToBeIgnored) {
|
|
8839
8839
|
return '';
|
|
8840
8840
|
}
|
|
8841
|
+
// If label is two dates separated by a hyphen, ensure space before and after hyphen
|
|
8842
|
+
const dateRangeRegex = /^(\d{2,4}[-\/]\d{2}[-\/]\d{2,4})\s*-\s*(\d{2,4}[-\/]\d{2}[-\/]\d{2,4})$/;
|
|
8843
|
+
if (dateRangeRegex.test(d.trim())) {
|
|
8844
|
+
// Normalize to 'date1 - date2' with spaces
|
|
8845
|
+
const match = d.trim().match(dateRangeRegex);
|
|
8846
|
+
if (match) {
|
|
8847
|
+
return `${match[1]} - ${match[2]}`;
|
|
8848
|
+
}
|
|
8849
|
+
}
|
|
8841
8850
|
// If label looks like a date (contains digits and - or /)
|
|
8842
8851
|
const isDateLabel = /\d{2,4}[-\/]/.test(d);
|
|
8843
8852
|
// Only split date/week labels if there are many grouped bars and header is not visible
|
|
@@ -9022,8 +9031,8 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9022
9031
|
xSubgroup.range([0, x.bandwidth()]);
|
|
9023
9032
|
}
|
|
9024
9033
|
else if (subgroups.length === 1 && !this.isZoomedOut) {
|
|
9025
|
-
// For single-bar (non-grouped) charts in zoom-in view, set bar width to 80
|
|
9026
|
-
xSubgroup.range([0,
|
|
9034
|
+
// For single-bar (non-grouped) charts in zoom-in view, set bar width to 100 (increased from 80)
|
|
9035
|
+
xSubgroup.range([0, 100]);
|
|
9027
9036
|
}
|
|
9028
9037
|
else if (this.chartConfiguration.isMultiChartGridLine == undefined) {
|
|
9029
9038
|
xSubgroup.range([0, x.bandwidth()]);
|