axidio-styleguide-library1-v2 0.1.20 → 0.1.21
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.
|
@@ -8844,10 +8844,15 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8844
8844
|
if (dateRangeRegex.test(d.trim())) {
|
|
8845
8845
|
return d.trim().replace(dateRangeRegex, (m, d1, d2) => `${d1} - ${d2}`);
|
|
8846
8846
|
}
|
|
8847
|
-
//
|
|
8848
|
-
// If label looks like a date (contains digits and - or /)
|
|
8847
|
+
// Split date and week labels into two lines in grouped bar zoom-in view (and minimized view)
|
|
8849
8848
|
const isDateLabel = /\d{2,4}[-\/]/.test(d);
|
|
8850
|
-
|
|
8849
|
+
const isWeekLabel = /week|wk|w\d+/i.test(d);
|
|
8850
|
+
if (subgroups.length > 1 && !self.isZoomedOut && data.length > 8 && d.indexOf(' ') > -1 && (isDateLabel || isWeekLabel)) {
|
|
8851
|
+
var first = d.substring(0, d.indexOf(' '));
|
|
8852
|
+
var second = d.substring(d.indexOf(' ') + 1).trim();
|
|
8853
|
+
return first + '\n' + second;
|
|
8854
|
+
}
|
|
8855
|
+
// Also keep previous logic for minimized view
|
|
8851
8856
|
if (isDateLabel) {
|
|
8852
8857
|
if (!self.isHeaderVisible && data.length > 8 && d.indexOf(' ') > -1) {
|
|
8853
8858
|
var first = d.substring(0, d.indexOf(' '));
|