axidio-styleguide-library1-v2 0.0.982 → 0.0.984

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.
@@ -7392,14 +7392,14 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7392
7392
  ])
7393
7393
  .domain(data.map(function (d) {
7394
7394
  return d.name;
7395
- }).reverse())
7395
+ }))
7396
7396
  .padding(isMobile ? 0.2 : 0.5);
7397
7397
  var xScaleFromOrigin = d3
7398
7398
  .scaleBand()
7399
7399
  .rangeRound([width - rightSvgWidth, 0])
7400
7400
  .domain(data.map(function (d) {
7401
7401
  return d.name;
7402
- }).reverse());
7402
+ }));
7403
7403
  // ...existing code...
7404
7404
  /**
7405
7405
  * draw second x axis on top
@@ -8642,7 +8642,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8642
8642
  .append('svg')
8643
8643
  // .attr('id', self.uniqueId)
8644
8644
  .attr('width', width - rightSvgWidth)
8645
- .attr('height', height + margin.top + margin.bottom + 30)
8645
+ .attr('height', height + margin.top + margin.bottom + 60)
8646
8646
  // .call(ChartHelper.responsivefy)
8647
8647
  .append('g')
8648
8648
  .attr('transform', 'translate(' + 0 + ',' + margin.top + ')');
@@ -8778,7 +8778,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8778
8778
  });
8779
8779
  }
8780
8780
  if (self.chartConfiguration.xLabelsOnSameLine) {
8781
- svg
8781
+ const xAxisLabels = svg
8782
8782
  .selectAll('g.x1.axis1 g.tick text')
8783
8783
  .attr('class', 'lib-xaxis-labels-texts-drilldown')
8784
8784
  .style('font-size', this.isHeaderVisible ? '18px' : '14px')
@@ -8856,6 +8856,13 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8856
8856
  }
8857
8857
  return d.toLowerCase();
8858
8858
  });
8859
+ // Now apply writing-mode: sideways-lr for grouped charts with date labels in zoomed-out view and many bars
8860
+ xAxisLabels.each(function (d) {
8861
+ const isDateLabel = /\d{2,4}[-\/]/.test(d);
8862
+ if (subgroups.length > 1 && self.isZoomedOut && data.length > 8 && isDateLabel) {
8863
+ d3.select(this).style('writing-mode', 'sideways-lr');
8864
+ }
8865
+ });
8859
8866
  if (!isMobile) {
8860
8867
  svg
8861
8868
  .selectAll('g.x1.axis1 g.tick')
@@ -9010,7 +9017,11 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9010
9017
  var xSubgroup = d3.scaleBand().domain(subgroups);
9011
9018
  if (subgroups.length > 1 && !this.isZoomedOut) {
9012
9019
  // For grouped bar charts in zoom-in view, reduce padding between bars
9013
- xSubgroup.range([0, x.bandwidth()]).padding(0.05);
9020
+ xSubgroup.range([0, x.bandwidth()]);
9021
+ }
9022
+ else if (subgroups.length === 1 && !this.isZoomedOut) {
9023
+ // For single-bar (non-grouped) charts in zoom-in view, set bar width to 80
9024
+ xSubgroup.range([0, 80]);
9014
9025
  }
9015
9026
  else if (this.chartConfiguration.isMultiChartGridLine == undefined) {
9016
9027
  xSubgroup.range([0, x.bandwidth()]);
@@ -9156,13 +9167,13 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9156
9167
  return self.isZoomedOut
9157
9168
  ? tempScale.bandwidth()
9158
9169
  : self.chartData.data.length && self.chartData.data.length > 8
9159
- ? tempScale.bandwidth() * 0.5
9170
+ ? tempScale.bandwidth()
9160
9171
  : tempScale.bandwidth();
9161
9172
  }
9162
9173
  return self.isZoomedOut
9163
9174
  ? tempScale.bandwidth()
9164
9175
  : self.chartData.data.length && self.chartData.data.length > 8
9165
- ? tempScale.bandwidth() * 0.5
9176
+ ? tempScale.bandwidth()
9166
9177
  : tempScale.bandwidth();
9167
9178
  })
9168
9179
  .attr('height', function (d) {
@@ -9651,7 +9662,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9651
9662
  }
9652
9663
  const xLabelText = metaData.xLabel;
9653
9664
  const isAcr = isAcronym(xLabelText.replace(/[^A-Za-z]/g, ''));
9654
- const xPosition = isria ? (height + margin.top + margin.bottom) : (height + margin.top + margin.bottom + 10);
9665
+ const xPosition = isria ? (height + margin.top + margin.bottom) : (height + margin.top + margin.bottom + 30);
9655
9666
  svg
9656
9667
  .append('text')
9657
9668
  .attr('class', function () {