axidio-styleguide-library1-v2 0.1.10 → 0.1.12
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,21 +8844,26 @@ 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
|
-
|
|
8849
|
-
|
|
8850
|
-
|
|
8851
|
-
|
|
8852
|
-
if (
|
|
8853
|
-
|
|
8854
|
-
|
|
8855
|
-
|
|
8856
|
-
let day = yearFirst ? match[3] : match[2];
|
|
8857
|
-
return `${month}/${day}`;
|
|
8847
|
+
// Show the date label as it is, do not trim or hide the year
|
|
8848
|
+
// If label looks like a date (contains digits and - or /)
|
|
8849
|
+
const isDateLabel = /\d{2,4}[-\/]/.test(d);
|
|
8850
|
+
// Only split date/week labels if there are many grouped bars and header is not visible
|
|
8851
|
+
if (isDateLabel) {
|
|
8852
|
+
if (!self.isHeaderVisible && data.length > 8 && d.indexOf(' ') > -1) {
|
|
8853
|
+
var first = d.substring(0, d.indexOf(' '));
|
|
8854
|
+
var second = d.substring(d.indexOf(' ') + 1).trim();
|
|
8855
|
+
return first + '\n' + second;
|
|
8858
8856
|
}
|
|
8857
|
+
else {
|
|
8858
|
+
return d;
|
|
8859
|
+
}
|
|
8860
|
+
}
|
|
8861
|
+
if (d.trim().indexOf(' ') > -1) {
|
|
8862
|
+
return d.trim().substring(0, d.indexOf(' ')).toLowerCase();
|
|
8859
8863
|
}
|
|
8864
|
+
return d.toLowerCase();
|
|
8860
8865
|
// If label looks like a date (contains digits and - or /)
|
|
8861
|
-
const
|
|
8866
|
+
const isDateLabel2 = /\d{2,4}[-\/]/.test(d);
|
|
8862
8867
|
// Only split date/week labels if there are many grouped bars and header is not visible
|
|
8863
8868
|
if (isDateLabel) {
|
|
8864
8869
|
if (!self.isHeaderVisible && data.length > 8 && d.indexOf(' ') > -1) {
|