axidio-styleguide-library1-v2 0.2.69 → 0.2.70

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.
@@ -9131,46 +9131,16 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9131
9131
  applyXLabelsOnSameLine(svg, subgroups, data, metaData, self, shortTickLengthBg, isMobile, isria) {
9132
9132
  const xAxisLabels = svg.selectAll('g.x1.axis1 g.tick text')
9133
9133
  .attr('class', 'lib-xaxis-labels-texts-drilldown')
9134
- .style('font-size', () => {
9135
- if (isMobile)
9136
- return '12px'; // Smaller font on mobile
9137
- return this.isHeaderVisible ? '18px' : '14px';
9138
- })
9134
+ .style('font-size', this.isHeaderVisible ? '18px' : '14px')
9139
9135
  .attr('text-anchor', 'middle')
9140
- .attr('y', (d) => {
9141
- if (isMobile) {
9142
- return 20; // Fixed position for mobile
9143
- }
9144
- return this.calculateXLabelYPosition(d, subgroups, data, metaData, self, shortTickLengthBg);
9145
- })
9146
- .attr('x', (d) => {
9147
- if (isMobile && self.isZoomedOut) {
9148
- return 0; // Center align on mobile
9149
- }
9150
- return (self.chartData.data.length > 8 && !self.isZoomedOut) ? 1 : 0;
9151
- })
9152
- .text((d) => {
9153
- if (isMobile) {
9154
- // For mobile, use shorter format
9155
- const text = d.toString().trim();
9156
- if (text.length > 8) {
9157
- // If it's a date, keep first part before space or first 8 chars
9158
- const dateMatch = text.match(/^(\d{2,4}[-\/]\d{2}[-\/]\d{2,4})/);
9159
- if (dateMatch) {
9160
- return dateMatch[1];
9161
- }
9162
- // For other text, keep first 8 chars with ellipsis
9163
- return text.substring(0, 8) + '...';
9164
- }
9165
- return text;
9166
- }
9167
- return this.formatXLabelText(d, data, metaData, subgroups, self, isMobile);
9168
- });
9169
- // Apply writing-mode for grouped charts with date labels in zoomed-out view (non-mobile only)
9136
+ .attr('y', (d) => this.calculateXLabelYPosition(d, subgroups, data, metaData, self, shortTickLengthBg))
9137
+ .attr('x', (d) => (self.chartData.data.length > 8 && !self.isZoomedOut) ? 1 : 0)
9138
+ .text((d) => this.formatXLabelText(d, data, metaData, subgroups, self, isMobile));
9139
+ // Apply writing-mode for grouped charts with date labels in zoomed-out view
9170
9140
  xAxisLabels.each(function (d) {
9171
9141
  const isDateLabel = /^(\d{2,4}[-\/])?\d{2,4}[-\/]\d{2,4}$/.test(d.trim());
9172
9142
  const isWeekLabel = /week|wk|w\d+/i.test(d);
9173
- if (!isMobile && subgroups.length > 1 && self.isZoomedOut && data.length > 8 && isDateLabel && !isWeekLabel) {
9143
+ if (subgroups.length > 1 && self.isZoomedOut && data.length > 8 && isDateLabel && !isWeekLabel) {
9174
9144
  d3.select(this).style('writing-mode', 'sideways-lr');
9175
9145
  }
9176
9146
  });