@esfaenza/es-charts 11.2.13 → 11.2.17

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.
@@ -84,10 +84,12 @@
84
84
  * Costruttore
85
85
  *
86
86
  * @param {LineSerie[]} series Lista di serie da graficare
87
+ * @param {{upper: lower}}
87
88
  */
88
- function LineChartData(series) {
89
+ function LineChartData(series, limit) {
89
90
  if (series === void 0) { series = []; }
90
91
  this.series = series;
92
+ this.limit = limit;
91
93
  }
92
94
  return LineChartData;
93
95
  }());
@@ -593,6 +595,22 @@
593
595
  return LegendPad;
594
596
  }());
595
597
 
598
+ /**
599
+ * Modello che identifica un limite superiore - inferiore
600
+ */
601
+ var Limit = /** @class */ (function () {
602
+ /** @ignore */
603
+ function Limit(upper, upperLabel, upperColor, lower, lowerLabel, lowerColor) {
604
+ this.upper = upper;
605
+ this.upperLabel = upperLabel;
606
+ this.upperColor = upperColor;
607
+ this.lower = lower;
608
+ this.lowerLabel = lowerLabel;
609
+ this.lowerColor = lowerColor;
610
+ }
611
+ return Limit;
612
+ }());
613
+
596
614
  /**
597
615
  * Modello che identifica la coppia Data-Valore
598
616
  */
@@ -1465,6 +1483,32 @@
1465
1483
  yAxis.min = settings.Min;
1466
1484
  if (settings.Max)
1467
1485
  yAxis.max = settings.Max;
1486
+ if (dataConverted.limit) {
1487
+ if (dataConverted.limit.upper != null && dataConverted.limit.upper != undefined) {
1488
+ var range = yAxis.axisRanges.create();
1489
+ range.value = dataConverted.limit.upper;
1490
+ range.label.inside = true;
1491
+ range.label.text = dataConverted.limit.upperLabel;
1492
+ range.label.fill = range.grid.stroke;
1493
+ range.label.verticalCenter = "bottom";
1494
+ range.label.stroke = am4core__namespace.color(dataConverted.limit.upperColor || "#F92200");
1495
+ range.grid.stroke = am4core__namespace.color(dataConverted.limit.upperColor || "#F92200");
1496
+ range.grid.strokeWidth = 2;
1497
+ range.grid.strokeOpacity = 1;
1498
+ }
1499
+ if (dataConverted.limit.lower != null && dataConverted.limit.lower != undefined) {
1500
+ var range = yAxis.axisRanges.create();
1501
+ range.value = dataConverted.limit.lower;
1502
+ range.label.inside = true;
1503
+ range.label.text = dataConverted.limit.lowerLabel;
1504
+ range.label.fill = range.grid.stroke;
1505
+ range.label.verticalCenter = "bottom";
1506
+ range.label.stroke = am4core__namespace.color(dataConverted.limit.lowerColor || "#F92200");
1507
+ range.grid.stroke = am4core__namespace.color(dataConverted.limit.lowerColor || "#F92200");
1508
+ range.grid.strokeWidth = 2;
1509
+ range.grid.strokeOpacity = 1;
1510
+ }
1511
+ }
1468
1512
  var dateAxis = ChartInstanceCasted.xAxes.push(new am4charts__namespace.DateAxis());
1469
1513
  if (settings.XAxisTitle) {
1470
1514
  dateAxis.title.text = settings.XAxisTitle;
@@ -3133,6 +3177,7 @@
3133
3177
  exports.KeyValue = KeyValue;
3134
3178
  exports.KeyValueColor = KeyValueColor;
3135
3179
  exports.LegendPad = LegendPad;
3180
+ exports.Limit = Limit;
3136
3181
  exports.LineChartData = LineChartData;
3137
3182
  exports.LineChartSettings = LineChartSettings;
3138
3183
  exports.LineSerie = LineSerie;