axidio-styleguide-library1-v2 0.0.935 → 0.0.936
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.
|
@@ -8854,16 +8854,17 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8854
8854
|
return '';
|
|
8855
8855
|
}
|
|
8856
8856
|
// If label looks like a date (contains digits and - or /)
|
|
8857
|
-
|
|
8858
|
-
|
|
8859
|
-
|
|
8857
|
+
const isDateLabel = /\d{2,4}[-\/]/.test(d);
|
|
8858
|
+
// Only split date/week labels if there are many grouped bars and header is not visible
|
|
8859
|
+
if (isDateLabel) {
|
|
8860
|
+
if (!self.isHeaderVisible && data.length > 8 && d.indexOf(' ') > -1) {
|
|
8860
8861
|
var first = d.substring(0, d.indexOf(' '));
|
|
8861
8862
|
var second = d.substring(d.indexOf(' ') + 1).trim();
|
|
8862
|
-
// Use tspan for line break if supported, else join with \n
|
|
8863
|
-
// If SVG tspan is supported, this will be split into two lines by the .each below
|
|
8864
8863
|
return first + '\n' + second;
|
|
8865
8864
|
}
|
|
8866
|
-
|
|
8865
|
+
else {
|
|
8866
|
+
return d;
|
|
8867
|
+
}
|
|
8867
8868
|
}
|
|
8868
8869
|
if (d.trim().indexOf(' ') > -1) {
|
|
8869
8870
|
return d.trim().substring(0, d.indexOf(' ')).toLowerCase();
|