diff --git a/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx.cs b/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx.cs
index 031d1ad..ec98ba8 100644
--- a/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx.cs
+++ b/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx.cs
@@ -142,7 +142,7 @@ namespace NKC_WF.WebUserControls
{
if (!Page.IsPostBack)
{
- cmp_numRow.numRow = 25;
+ cmp_numRow.numRow = 15;
grView.PageSize = cmp_numRow.numRow;
divGraph.Visible = false;
divType.Visible = false;
@@ -152,6 +152,7 @@ namespace NKC_WF.WebUserControls
hlDownload.Visible = fileExist;
}
cmp_numRow.eh_doRefresh += Cmp_numRow_eh_doRefresh;
+ doUpdate();
}
protected void txtNumShow_TextChanged(object sender, EventArgs e)
diff --git a/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx b/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx
index 01140e1..9f22600 100644
--- a/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx
+++ b/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx
@@ -24,7 +24,7 @@
var labelsTS = dataTS.map(function (item) {
return item['x'];
});
- //console.log('labels data', labels);
+ //console.log('labels data', labelsTS);
var myOptions = {
responsive: true,
@@ -42,15 +42,17 @@
};
// recupero obj chart
+ //console.log('ctx ID: ', document.getElementById('myChartTS'));
var ctx = document.getElementById('myChartTS').getContext('2d');
+ var sLeg = document.getElementById('<%=hfLegend.ClientID %>').value;
var chart = new Chart(ctx, {
type: 'line',
data: {
labels: labelsTS,
datasets: [{
- label: '<%=hfLegend.Value %>',
+ label: sLeg,
borderColor: 'rgb(7, 173, 236)',
lineTension: 0,
//steppedLine: false,
@@ -66,22 +68,31 @@
}
// effettuo plotting grafico TimeSerie!
function plotTS() {
- //console.log("api/BatchStats/<%=hfShowLast.Value %>?PlotType=<%=hfPlotType.Value%>");
- // caricamento pagina
- $.ajax({
- type: "GET",
- url: "../api/BatchStats/<%=hfShowLast.Value %>?PlotType=<%=hfPlotType.Value%>",
- contentType: "application/json; charset=utf-8",
- dataType: "json",
- success: OnSuccess_,
- error: OnErrorCall_
- });
+ var hfSL = document.getElementById('<%=hfShowLast.ClientID %>');
+ if (hfSL != null) {
+ var lastNum = document.getElementById('<%=hfShowLast.ClientID %>').value ?? "";
+ var plotType = document.getElementById('<%=hfPlotType.ClientID %>').value ?? "";
+ //console.log("../api/BatchStats/"+lastNum+"?PlotType="+plotType);
+ // caricamento pagina
+ $.ajax({
+ type: "GET",
+ url: "../api/BatchStats/" + lastNum + "?PlotType=" + plotType,
+ contentType: "application/json; charset=utf-8",
+ dataType: "json",
+ success: OnSuccess_,
+ error: OnErrorCall_
+ });
+ }
}
// funzione di drawing ad OGNI pageload!
function pageLoad() {
- // chiamo recupero dati + plot della TS
- plotTS();
- //console.log('pageLoad!');
+ try {
+ console.log('pageLoad BatchStats! | ID: <%= this.ID %> ');
+ plotTS();
+ }
+ catch (error) {
+ console.log(error);
+ }
}
-
\ No newline at end of file
+
diff --git a/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx.cs b/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx.cs
index 8f7422f..49921d7 100644
--- a/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx.cs
+++ b/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx.cs
@@ -53,10 +53,7 @@ namespace NKC_WF.WebUserControls
#region Protected Methods
- protected void Page_Load(object sender, EventArgs e)
- {
- }
-
+
#endregion Protected Methods
}
}
\ No newline at end of file
diff --git a/NKC_WF/WebUserControls/cmp_DailyStatsList.ascx b/NKC_WF/WebUserControls/cmp_DailyStatsList.ascx
index eb01c6d..c8df180 100644
--- a/NKC_WF/WebUserControls/cmp_DailyStatsList.ascx
+++ b/NKC_WF/WebUserControls/cmp_DailyStatsList.ascx
@@ -9,10 +9,10 @@