@esfaenza/es-charts 11.2.36 → 11.2.38

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.
@@ -665,8 +665,9 @@
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
667
  * @param {boolean} stacked Override della proprietà **Stacked** del grafico, specifico per ogni serie
668
+ * @param {boolean} hidden Indica se la serie deve partire nascosta di default
668
669
  */
669
- function LineSerie(name, values, interval, color, uom, fill, stacked) {
670
+ function LineSerie(name, values, interval, color, uom, fill, stacked, hidden) {
670
671
  this.name = name;
671
672
  this.values = values;
672
673
  this.interval = interval;
@@ -674,6 +675,7 @@
674
675
  this.uom = uom;
675
676
  this.fill = fill;
676
677
  this.stacked = stacked;
678
+ this.hidden = hidden;
677
679
  }
678
680
  return LineSerie;
679
681
  }());
@@ -1563,6 +1565,8 @@
1563
1565
  /** @ignore */
1564
1566
  this.OpacityOnSelected = 0.3;
1565
1567
  /** @ignore */
1568
+ this.OpacityOnFill = 0.75;
1569
+ /** @ignore */
1566
1570
  this.singleDataSet = false;
1567
1571
  //******************** Funzione di throttling per non spammare richieste in caso di animazioni attivate
1568
1572
  //TODO: spostarla in un metodo di utilità (esfaenza/extensions)
@@ -1720,8 +1724,9 @@
1720
1724
  series.tooltip.pointerOrientation = "vertical";
1721
1725
  series.tooltip.background.fillOpacity = 0.5;
1722
1726
  series.tooltip.label.padding(12, 12, 12, 12);
1723
- series.fillOpacity = fill ? 1 : 0.0001;
1727
+ series.fillOpacity = fill ? _this.OpacityOnFill : 0.0001;
1724
1728
  series.stacked = stacked;
1729
+ series.hidden = s.hidden;
1725
1730
  //Dataset singolo, i dati sono registrati a livello di chart, creo il tooltip che permette di vederli tutti insieme
1726
1731
  //altrimenti assegno i dati della serie direttamente alla serie
1727
1732
  if (_this.singleDataSet) {
@@ -1877,8 +1882,8 @@
1877
1882
  /** @ignore */
1878
1883
  LineChartService.prototype.processOver = function (hoveredSeries) {
1879
1884
  var _this = this;
1880
- hoveredSeries.toFront();
1881
- var fill = hoveredSeries.fillOpacity == 1;
1885
+ hoveredSeries.zIndex = 999;
1886
+ var fill = hoveredSeries.fillOpacity == this.OpacityOnFill;
1882
1887
  hoveredSeries.segments.each(function (segment) {
1883
1888
  segment.setState("hover");
1884
1889
  if (!fill)
@@ -1888,7 +1893,7 @@
1888
1893
  hoveredSeries.legendDataItem.marker.children.getIndex(1).fillOpacity = this.OpacityOnSelected;
1889
1894
  this.ChartInstance.series.each(function (series) {
1890
1895
  if (series != hoveredSeries) {
1891
- var fill_1 = series.fillOpacity == 1;
1896
+ var fill_1 = series.fillOpacity == _this.OpacityOnFill;
1892
1897
  series.segments.each(function (segment) {
1893
1898
  segment.setState("dimmed");
1894
1899
  if (!fill_1)
@@ -1899,8 +1904,10 @@
1899
1904
  };
1900
1905
  /** @ignore */
1901
1906
  LineChartService.prototype.processOut = function () {
1902
- this.ChartInstance.series.each(function (series) {
1903
- var fill = series.fillOpacity == 1;
1907
+ var _this = this;
1908
+ this.ChartInstance.series.each(function (series, i) {
1909
+ series.zIndex = i;
1910
+ var fill = series.fillOpacity == _this.OpacityOnFill;
1904
1911
  series.segments.each(function (segment) {
1905
1912
  segment.setState("default");
1906
1913
  if (!fill)