@esfaenza/es-charts 11.2.34 → 11.2.35
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.
- package/bundles/esfaenza-es-charts.umd.js +13 -8
- package/bundles/esfaenza-es-charts.umd.js.map +1 -1
- package/bundles/esfaenza-es-charts.umd.min.js +1 -1
- package/bundles/esfaenza-es-charts.umd.min.js.map +1 -1
- package/esfaenza-es-charts.metadata.json +1 -1
- package/esm2015/lib/components/specializations/es-line-chart.component.js +5 -3
- package/esm2015/lib/models/data/base/LineSerie.js +4 -2
- package/esm2015/lib/models/settings/LineChartSettings.js +1 -1
- package/esm2015/lib/services/LineChartService.js +7 -6
- package/fesm2015/esfaenza-es-charts.js +13 -8
- package/fesm2015/esfaenza-es-charts.js.map +1 -1
- package/lib/components/specializations/es-line-chart.component.d.ts +4 -0
- package/lib/models/data/base/LineSerie.d.ts +3 -1
- package/lib/models/settings/LineChartSettings.d.ts +4 -0
- package/package.json +1 -1
|
@@ -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
|
|
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 = (
|
|
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 =
|
|
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 = ((
|
|
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
|
|
@@ -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
|
/**
|