@esfaenza/es-charts 11.2.34 → 11.2.36

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.
@@ -664,14 +664,16 @@
664
664
  * @param {string} color Colore della serie, verrà usato sia per la linea base che eventualmente per il riempimento (in caso si utilizzi l'Input **Fill** nel grafico)
665
665
  * @param {string} uom Unità di misura da presentare nell'asse delle Y
666
666
  * @param {boolean} fill Override della proprietà **Fill** del grafico, specifico per ogni serie
667
+ * @param {boolean} stacked Override della proprietà **Stacked** del grafico, specifico per ogni serie
667
668
  */
668
- function LineSerie(name, values, interval, color, uom, fill) {
669
+ function LineSerie(name, values, interval, color, uom, fill, stacked) {
669
670
  this.name = name;
670
671
  this.values = values;
671
672
  this.interval = interval;
672
673
  this.color = color;
673
674
  this.uom = uom;
674
675
  this.fill = fill;
676
+ this.stacked = stacked;
675
677
  }
676
678
  return LineSerie;
677
679
  }());
@@ -1703,14 +1705,15 @@
1703
1705
  dateAxis.cursorTooltipEnabled = false;
1704
1706
  }
1705
1707
  dataConverted.series.forEach(function (s, index) {
1706
- var _a, _b, _c;
1707
- var fill = s.fill != null && s.fill != undefined ? s.fill : ((_a = settings === null || settings === void 0 ? void 0 : settings.Fill) !== null && _a !== void 0 ? _a : false);
1708
+ var _a, _b, _c, _d;
1709
+ var stacked = s.stacked != null && s.stacked != undefined ? s.stacked : ((_a = settings === null || settings === void 0 ? void 0 : settings.Stacked) !== null && _a !== void 0 ? _a : false);
1710
+ var fill = stacked || (s.fill != null && s.fill != undefined ? s.fill : ((_b = settings === null || settings === void 0 ? void 0 : settings.Fill) !== null && _b !== void 0 ? _b : false));
1708
1711
  var series = (settings === null || settings === void 0 ? void 0 : settings.Step) ? new am4charts__namespace.StepLineSeries() : new am4charts__namespace.LineSeries();
1709
1712
  series.dataFields.valueY = "v" + (_this.singleDataSet ? index : "");
1710
1713
  series.dataFields.dateX = "d";
1711
1714
  series.measureUnit = s.uom;
1712
1715
  series.name = s.name;
1713
- series.strokeWidth = (_b = settings === null || settings === void 0 ? void 0 : settings.StrokeSize) !== null && _b !== void 0 ? _b : 1;
1716
+ series.strokeWidth = (_c = settings === null || settings === void 0 ? void 0 : settings.StrokeSize) !== null && _c !== void 0 ? _c : 1;
1714
1717
  series.connect = !gapsAllowed;
1715
1718
  series.minBulletDistance = 10;
1716
1719
  series.tooltipText = _this.singleDataSet ? "" : s.name ? "{name}: [bold]{valueY}[/]" : "[bold]{valueY}[/]";
@@ -1718,7 +1721,7 @@
1718
1721
  series.tooltip.background.fillOpacity = 0.5;
1719
1722
  series.tooltip.label.padding(12, 12, 12, 12);
1720
1723
  series.fillOpacity = fill ? 1 : 0.0001;
1721
- series.stacked = fill;
1724
+ series.stacked = stacked;
1722
1725
  //Dataset singolo, i dati sono registrati a livello di chart, creo il tooltip che permette di vederli tutti insieme
1723
1726
  //altrimenti assegno i dati della serie direttamente alla serie
1724
1727
  if (_this.singleDataSet) {
@@ -1761,7 +1764,7 @@
1761
1764
  series.data = s.values;
1762
1765
  var segment = series.segments.template;
1763
1766
  var hoverState = segment.states.create("hover");
1764
- hoverState.properties.strokeWidth = ((_c = settings === null || settings === void 0 ? void 0 : settings.StrokeSize) !== null && _c !== void 0 ? _c : 1) + 1;
1767
+ hoverState.properties.strokeWidth = ((_d = settings === null || settings === void 0 ? void 0 : settings.StrokeSize) !== null && _d !== void 0 ? _d : 1) + 1;
1765
1768
  var dimmed = segment.states.create("dimmed");
1766
1769
  dimmed.properties.stroke = am4core__namespace.color("#dadada");
1767
1770
  //Se la serie ha un colore, uso quello, altrimenti pesco dai colori di default andando in ordine
@@ -1875,7 +1878,7 @@
1875
1878
  LineChartService.prototype.processOver = function (hoveredSeries) {
1876
1879
  var _this = this;
1877
1880
  hoveredSeries.toFront();
1878
- var fill = hoveredSeries.stacked;
1881
+ var fill = hoveredSeries.fillOpacity == 1;
1879
1882
  hoveredSeries.segments.each(function (segment) {
1880
1883
  segment.setState("hover");
1881
1884
  if (!fill)
@@ -1885,7 +1888,7 @@
1885
1888
  hoveredSeries.legendDataItem.marker.children.getIndex(1).fillOpacity = this.OpacityOnSelected;
1886
1889
  this.ChartInstance.series.each(function (series) {
1887
1890
  if (series != hoveredSeries) {
1888
- var fill_1 = series.stacked;
1891
+ var fill_1 = series.fillOpacity == 1;
1889
1892
  series.segments.each(function (segment) {
1890
1893
  segment.setState("dimmed");
1891
1894
  if (!fill_1)
@@ -1897,7 +1900,7 @@
1897
1900
  /** @ignore */
1898
1901
  LineChartService.prototype.processOut = function () {
1899
1902
  this.ChartInstance.series.each(function (series) {
1900
- var fill = series.stacked;
1903
+ var fill = series.fillOpacity == 1;
1901
1904
  series.segments.each(function (segment) {
1902
1905
  segment.setState("default");
1903
1906
  if (!fill)
@@ -2777,7 +2780,7 @@
2777
2780
  * Ottiene le proprietà specifiche per questa tipologia di grafico per cui serve rigraficare
2778
2781
  */
2779
2782
  EsLineChartComponent.prototype.getSpecificPropertiesToCheck = function () {
2780
- return ["Data", "DataArray", "Step", "DataGroupBucketSize", "DataGroupingThreshold", "StrokeSize", "AllowGaps", "MergeDatasets", "FinalInstants", "Fill", "Min", "Max"];
2783
+ return ["Data", "DataArray", "Step", "DataGroupBucketSize", "DataGroupingThreshold", "StrokeSize", "Stacked", "AllowGaps", "MergeDatasets", "FinalInstants", "Fill", "Min", "Max"];
2781
2784
  };
2782
2785
  /**
2783
2786
  * Ottiene i Settings (Ereditati dalla classe base, quindi del tipo generico **BaseSettings**) castati al tipo specifico per questo grafico
@@ -2804,6 +2807,7 @@
2804
2807
  settingsCasted.Min = settingsCasted.Min != null ? settingsCasted.Min : this.Min;
2805
2808
  settingsCasted.Max = settingsCasted.Max != null ? settingsCasted.Max : this.Max;
2806
2809
  settingsCasted.Fill = settingsCasted.Fill != null ? settingsCasted.Fill : this.Fill;
2810
+ settingsCasted.Stacked = settingsCasted.Stacked != null ? settingsCasted.Stacked : this.Stacked;
2807
2811
  };
2808
2812
  /**
2809
2813
  * Effettua il rendering di questo grafico in base ai Settings
@@ -2849,7 +2853,8 @@
2849
2853
  FinalInstants: [{ type: core.Input }],
2850
2854
  Min: [{ type: core.Input }],
2851
2855
  Max: [{ type: core.Input }],
2852
- Fill: [{ type: core.Input }]
2856
+ Fill: [{ type: core.Input }],
2857
+ Stacked: [{ type: core.Input }]
2853
2858
  };
2854
2859
 
2855
2860
  /**