@bizy/core 21.5.7 → 21.5.9

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.
@@ -10396,13 +10396,11 @@ class BizyBarLineChartComponent {
10396
10396
  const color = _line.getYAxisColor() ? _line.getYAxisColor() : yAxisType === BIZY_BAR_LINE_CHART_AXIS_TYPE.DEPENDENT && _line.getColor() ? _line.getColor() : defaultYAxisColor;
10397
10397
  if (lineYAxis.group && yAxisType === BIZY_BAR_LINE_CHART_AXIS_TYPE.DEPENDENT) {
10398
10398
  const _axisIndex = this.#chartGroups.get(lineYAxis.group);
10399
- if (_axisIndex) {
10399
+ if (typeof _axisIndex !== 'undefined') {
10400
10400
  axisIndex = _axisIndex;
10401
10401
  }
10402
10402
  else {
10403
- const index = this.#getRandomFourDigitsNumber();
10404
- this.#chartGroups.set(lineYAxis.group, index);
10405
- axisIndex = index;
10403
+ this.#chartGroups.set(lineYAxis.group, axisIndex);
10406
10404
  }
10407
10405
  }
10408
10406
  yAxis.push({
@@ -10454,13 +10452,11 @@ class BizyBarLineChartComponent {
10454
10452
  const color = _line.getXAxisColor() ? _line.getXAxisColor() : xAxisType === BIZY_BAR_LINE_CHART_AXIS_TYPE.DEPENDENT && _line.getColor() ? _line.getColor() : defaultXAxisColor;
10455
10453
  if (lineXAxis.group && xAxisType === BIZY_BAR_LINE_CHART_AXIS_TYPE.DEPENDENT) {
10456
10454
  const _axisIndex = this.#chartGroups.get(lineXAxis.group);
10457
- if (_axisIndex) {
10455
+ if (typeof _axisIndex !== 'undefined') {
10458
10456
  axisIndex = _axisIndex;
10459
10457
  }
10460
10458
  else {
10461
- const index = this.#getRandomFourDigitsNumber();
10462
- this.#chartGroups.set(lineXAxis.group, index);
10463
- axisIndex = index;
10459
+ this.#chartGroups.set(lineXAxis.group, axisIndex);
10464
10460
  }
10465
10461
  }
10466
10462
  xAxis.push({
@@ -10547,13 +10543,11 @@ class BizyBarLineChartComponent {
10547
10543
  const color = _bar.getYAxisColor() ? _bar.getYAxisColor() : yAxisType === BIZY_BAR_LINE_CHART_AXIS_TYPE.DEPENDENT && _bar.getColor() ? _bar.getColor() : defaultYAxisColor;
10548
10544
  if (barYAxis.group && yAxisType === BIZY_BAR_LINE_CHART_AXIS_TYPE.DEPENDENT) {
10549
10545
  const _axisIndex = this.#chartGroups.get(barYAxis.group);
10550
- if (_axisIndex) {
10546
+ if (typeof _axisIndex !== 'undefined') {
10551
10547
  axisIndex = _axisIndex;
10552
10548
  }
10553
10549
  else {
10554
- const index = this.#getRandomFourDigitsNumber();
10555
- this.#chartGroups.set(barYAxis.group, index);
10556
- axisIndex = index;
10550
+ this.#chartGroups.set(barYAxis.group, axisIndex);
10557
10551
  }
10558
10552
  }
10559
10553
  yAxis.push({
@@ -10606,13 +10600,11 @@ class BizyBarLineChartComponent {
10606
10600
  const color = _bar.getXAxisColor() ? _bar.getXAxisColor() : xAxisType === BIZY_BAR_LINE_CHART_AXIS_TYPE.DEPENDENT && _bar.getColor() ? _bar.getColor() : defaultXAxisColor;
10607
10601
  if (barXAxis.group && xAxisType === BIZY_BAR_LINE_CHART_AXIS_TYPE.DEPENDENT) {
10608
10602
  const _axisIndex = this.#chartGroups.get(barXAxis.group);
10609
- if (_axisIndex) {
10603
+ if (typeof _axisIndex !== 'undefined') {
10610
10604
  axisIndex = _axisIndex;
10611
10605
  }
10612
10606
  else {
10613
- const index = this.#getRandomFourDigitsNumber();
10614
- this.#chartGroups.set(barXAxis.group, index);
10615
- axisIndex = index;
10607
+ this.#chartGroups.set(barXAxis.group, axisIndex);
10616
10608
  }
10617
10609
  }
10618
10610
  xAxis.push({
@@ -10654,7 +10646,7 @@ class BizyBarLineChartComponent {
10654
10646
  }
10655
10647
  }
10656
10648
  }
10657
- if (axisIndex !== _i + this.lineCharts.length) {
10649
+ if (axisIndex !== (_i + this.lineCharts.length)) {
10658
10650
  if (_bar.stack) {
10659
10651
  const _stack = this.#chartStacks.find(_stack => _stack === _bar.stack);
10660
10652
  if (_stack) {
@@ -10839,7 +10831,6 @@ class BizyBarLineChartComponent {
10839
10831
  const rootValue = getComputedStyle(document.documentElement).getPropertyValue(cssVariable).trim();
10840
10832
  return rootValue || null;
10841
10833
  };
10842
- #getRandomFourDigitsNumber = () => Math.floor(1000 + Math.random() * 9000);
10843
10834
  ngOnDestroy() {
10844
10835
  this.#resizeSubscription.unsubscribe();
10845
10836
  this.#barChartsSubscription.unsubscribe();