@esfaenza/es-charts 11.2.37 → 11.2.39
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 +43 -3
- 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/esm2015/lib/models/data/base/LineSerie.js +2 -2
- package/esm2015/lib/services/AreaChartService.js +22 -2
- package/esm2015/lib/services/LineChartService.js +22 -2
- package/fesm2015/esfaenza-es-charts.js +43 -3
- package/fesm2015/esfaenza-es-charts.js.map +1 -1
- package/lib/models/data/base/LineSerie.d.ts +1 -1
- package/lib/services/AreaChartService.d.ts +1 -0
- package/lib/services/LineChartService.d.ts +1 -0
- package/package.json +4 -4
|
@@ -661,7 +661,7 @@
|
|
|
661
661
|
* @param {string} name Nome della serie
|
|
662
662
|
* @param {DateValue[]} values Valori della serie
|
|
663
663
|
* @param {BaseInterval} interval Intervallo della serie. Viene utilizzato per gestire Gap e date in Istante Finale
|
|
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)
|
|
664
|
+
* @param {string} color Colore della serie in notazione HTML, 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
667
|
* @param {boolean} stacked Override della proprietà **Stacked** del grafico, specifico per ogni serie
|
|
@@ -1676,7 +1676,7 @@
|
|
|
1676
1676
|
console.error("Per utilizzare la funzionalità dei gap è obbligatorio definire un intervallo nelle serie del grafico");
|
|
1677
1677
|
return null;
|
|
1678
1678
|
}
|
|
1679
|
-
dateAxis.baseInterval = { count: interval.count, timeUnit: interval.timeunit };
|
|
1679
|
+
dateAxis.baseInterval = { count: interval.count, timeUnit: this.fixTimeUnit(interval.timeunit) };
|
|
1680
1680
|
}
|
|
1681
1681
|
if (showTimeline)
|
|
1682
1682
|
ChartInstanceCasted.scrollbarX = new am4charts__namespace.XYChartScrollbar();
|
|
@@ -1826,6 +1826,26 @@
|
|
|
1826
1826
|
dateAxis.events.on("endchanged", function (t) { return _this.emitSelectionChanged(t, settings); });
|
|
1827
1827
|
return this;
|
|
1828
1828
|
};
|
|
1829
|
+
LineChartService.prototype.fixTimeUnit = function (tu) {
|
|
1830
|
+
if (tu === 0)
|
|
1831
|
+
return "millisecond";
|
|
1832
|
+
else if (tu === 1)
|
|
1833
|
+
return "second";
|
|
1834
|
+
else if (tu === 2)
|
|
1835
|
+
return "minute";
|
|
1836
|
+
else if (tu === 3)
|
|
1837
|
+
return "hour";
|
|
1838
|
+
else if (tu === 4)
|
|
1839
|
+
return "day";
|
|
1840
|
+
else if (tu === 5)
|
|
1841
|
+
return "week";
|
|
1842
|
+
else if (tu === 6)
|
|
1843
|
+
return "month";
|
|
1844
|
+
else if (tu === 7)
|
|
1845
|
+
return "year";
|
|
1846
|
+
else
|
|
1847
|
+
return tu;
|
|
1848
|
+
};
|
|
1829
1849
|
/** @ignore */
|
|
1830
1850
|
LineChartService.prototype.setSelection = function (from, to) {
|
|
1831
1851
|
this.dateAxis.zoomToDates(from, to, true, true);
|
|
@@ -2521,7 +2541,7 @@
|
|
|
2521
2541
|
dateAxis.renderer.ticks.template.location = 0;
|
|
2522
2542
|
}
|
|
2523
2543
|
if (!!interval)
|
|
2524
|
-
dateAxis.baseInterval = { count: interval.count, timeUnit: interval.timeunit };
|
|
2544
|
+
dateAxis.baseInterval = { count: interval.count, timeUnit: this.fixTimeUnit(interval.timeunit) };
|
|
2525
2545
|
// Unisco il dataset e tiro fuori i dati
|
|
2526
2546
|
var chartData = [];
|
|
2527
2547
|
var seriesToMakeCache = {};
|
|
@@ -2548,6 +2568,26 @@
|
|
|
2548
2568
|
dateAxis.events.on("endchanged", function (t) { return _this.emitSelectionChanged(t, settings); });
|
|
2549
2569
|
return this;
|
|
2550
2570
|
};
|
|
2571
|
+
AreaChartService.prototype.fixTimeUnit = function (tu) {
|
|
2572
|
+
if (tu === 0)
|
|
2573
|
+
return "millisecond";
|
|
2574
|
+
else if (tu === 1)
|
|
2575
|
+
return "second";
|
|
2576
|
+
else if (tu === 2)
|
|
2577
|
+
return "minute";
|
|
2578
|
+
else if (tu === 3)
|
|
2579
|
+
return "hour";
|
|
2580
|
+
else if (tu === 4)
|
|
2581
|
+
return "day";
|
|
2582
|
+
else if (tu === 5)
|
|
2583
|
+
return "week";
|
|
2584
|
+
else if (tu === 6)
|
|
2585
|
+
return "month";
|
|
2586
|
+
else if (tu === 7)
|
|
2587
|
+
return "year";
|
|
2588
|
+
else
|
|
2589
|
+
return tu;
|
|
2590
|
+
};
|
|
2551
2591
|
/** @ignore */
|
|
2552
2592
|
AreaChartService.prototype.setSelection = function (from, to) {
|
|
2553
2593
|
};
|