update comportamento x drawinf chat temperature

This commit is contained in:
Samuele Locatelli
2021-03-19 19:27:20 +01:00
parent 3fc75b6d60
commit a9ba08b3d7
13 changed files with 258 additions and 148 deletions
+50 -37
View File
@@ -6,11 +6,15 @@
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_pageLoaded(function () {
redrawAll();
//console.log('add_pageLoaded!');
console.log('add_pageLoaded!');
});
//prm.add_endRequest(function () {
prm.add_endRequest(function () {
redrawAll();
console.log('add_endRequest!');
});
//prm.add_beginRequest(function () {
// redrawAll();
// console.log('add_endRequest!');
// console.log('add_beginRequest!');
//});
//Sys.Application.add_load(redrawAll);
@@ -41,23 +45,27 @@
},
};
// recupero obj chart
var ctx = document.getElementById('myChartTS').getContext('2d');
var chart = new Chart(ctx, {
type: 'line',
data: {
datasets: [{
borderColor: 'rgb(7, 173, 236)',
lineTension: 0,
steppedLine: true,
label: 'Temperatura Rilevata',
data: dataTS
}]
},
options: myOptions
});
try {
// recupero obj chart
var ctx = document.getElementById('myChartTS').getContext('2d');
var chart = new Chart(ctx, {
type: 'line',
data: {
datasets: [{
borderColor: 'rgb(7, 173, 236)',
lineTension: 0,
steppedLine: true,
label: 'Temperatura Rilevata',
data: dataTS
}]
},
options: myOptions
});
//console.log('TS draw!');
console.log('TS draw!');
}
catch
{ }
}
// errore in reload!
function OnErrorCall_(repo) {
@@ -96,20 +104,25 @@
//console.log('bars: ', barVal);
// recupero obj chart
var ctx = document.getElementById('myChartHist').getContext('2d');
var chart = new Chart(ctx, {
type: 'bar',
data: {
labels: barLabels,
datasets: [{
label: 'Freq. Osservate',
backgroundColor: 'rgb(7, 173, 236)',
data: barVal
}]
},
options: myOptions
});
try {
var ctx = document.getElementById('myChartHist').getContext('2d');
var chart = new Chart(ctx, {
type: 'bar',
data: {
labels: barLabels,
datasets: [{
label: 'Freq. Osservate',
backgroundColor: 'rgb(7, 173, 236)',
data: barVal
}]
},
options: myOptions
});
console.log('Hist draw!');
}
catch
{ }
}
// errore in reload!
function HistOnErrorCall_(repo) {
@@ -141,15 +154,15 @@
}
function redrawAll() {
console.log('numRec: <%=ddlMaxNum.SelectedValue%>');
//console.log('numRec: <%=ddlMaxNum.SelectedValue%>');
plotTS();
plotHist();
}
// funzione di drawing ad OGNI pageload!
function pageLoad() {
//redrawAll();
}
//// funzione di drawing ad OGNI pageload!
//function pageLoad() {
// //redrawAll();
//}
</script>
<asp:HiddenField runat="server" ID="hfIdxDip" />
+14 -14
View File
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
// <generato automaticamente>
// Codice generato da uno strumento.
// <auto-generated>
// This code was generated by a tool.
//
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW_Commesse.WebUserControls
@@ -15,29 +15,29 @@ namespace GPW_Commesse.WebUserControls
{
/// <summary>
/// Controllo hfIdxDip.
/// hfIdxDip control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfIdxDip;
/// <summary>
/// Controllo hfData.
/// hfData control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfData;
/// <summary>
/// Controllo ddlMaxNum.
/// ddlMaxNum control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlMaxNum;
}
@@ -12,21 +12,29 @@
<asp:HiddenField runat="server" ID="hfDataFrom" />
<asp:HiddenField runat="server" ID="hfDataTo" />
<script>
</script>
<div class="row mt-0">
<div class="col-12">
<asp:UpdatePanel ID="upFilt" runat="server" UpdateMode="Conditional" RenderMode="Block">
<ContentTemplate>
<div class="filtro_1 py-1 mx-0 row" style="height: 2em;">
<div class="col-6 text-left">
<div class="d-flex filtro_1">
<div class="p-2 flex-grow-1">
<uc2:mod_periodoAnalisi ID="mod_periodoAnalisi1" runat="server" realtimeUpdate="true" />
</div>
<div class="col-6 text-right small">
<div class="p-2 small">
Temperatura:
<uc2:cmp_toggle runat="server" ID="cmp_toggleTemp" classOn="text-light" classOff="text-secondary" />
</div>
<div class="p-2 small">
Sel globale:
<uc2:cmp_toggle runat="server" ID="cmp_toggle" classOn="text-dark" classOff="text-dark" />
<uc2:cmp_toggle runat="server" ID="cmp_toggle" classOn="text-dark" classOff="text-secondary" />
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<uc2:cmp_chart runat="server" ID="cmp_chart1" Visible="false" />
<asp:UpdatePanel ID="upCharts" runat="server" UpdateMode="Conditional" RenderMode="Block">
<ContentTemplate>
<div class="py-1 mx-0 row bg-light" id="divRilTemp" runat="server">
@@ -105,6 +105,7 @@ namespace GPW_Commesse.WebUserControls
private void cmp_rilTemp_ehCancel(object sender, EventArgs e)
{
cmp_toggleTemp.toggleValue = false;
activeMode = modoCommesse.elenco;
showPanels();
grView.SelectedIndex = -1;
@@ -113,6 +114,7 @@ namespace GPW_Commesse.WebUserControls
private void cmp_rilTemp_ehSave(object sender, EventArgs e)
{
cmp_toggleTemp.toggleValue = false;
activeMode = modoCommesse.elenco;
showPanels();
}
@@ -216,6 +218,7 @@ namespace GPW_Commesse.WebUserControls
protected void lbShowTemp_Click(object sender, EventArgs e)
{
string dataRif = ((LinkButton)sender).CommandArgument;
cmp_toggleTemp.toggleValue = true;
// verifico se dip sia attivo...
if (DataProxy.currDipIsActive)
{
@@ -313,6 +316,13 @@ namespace GPW_Commesse.WebUserControls
cmp_toggle.ehToggle += Cmp_toggle_ehToggle;
cmp_rilTemp.ehCancel += cmp_rilTemp_ehCancel;
cmp_rilTemp.ehSave += cmp_rilTemp_ehSave;
ScriptManager.RegisterStartupScript(
upCharts,
this.GetType(),
"MyAction",
"redrawAll();",
true);
}
/// <summary>
@@ -407,6 +417,7 @@ namespace GPW_Commesse.WebUserControls
cmp_chart.Visible = true;
upMain.Update();
upFilt.Update();
upCharts.Update();
}
+92 -74
View File
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
// <generato automaticamente>
// Codice generato da uno strumento.
// <auto-generated>
// This code was generated by a tool.
//
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW_Commesse.WebUserControls
@@ -15,209 +15,227 @@ namespace GPW_Commesse.WebUserControls
{
/// <summary>
/// Controllo hfDataFrom.
/// hfDataFrom control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfDataFrom;
/// <summary>
/// Controllo hfDataTo.
/// hfDataTo control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfDataTo;
/// <summary>
/// Controllo upFilt.
/// upFilt control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel upFilt;
/// <summary>
/// Controllo mod_periodoAnalisi1.
/// mod_periodoAnalisi1 control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_periodoAnalisi mod_periodoAnalisi1;
/// <summary>
/// Controllo cmp_toggle.
/// cmp_toggleTemp control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW_Commesse.WebUserControls.cmp_toggle cmp_toggleTemp;
/// <summary>
/// cmp_toggle control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW_Commesse.WebUserControls.cmp_toggle cmp_toggle;
/// <summary>
/// Controllo upCharts.
/// cmp_chart1 control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW_Commesse.WebUserControls.cmp_chart cmp_chart1;
/// <summary>
/// upCharts control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel upCharts;
/// <summary>
/// Controllo divRilTemp.
/// divRilTemp control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divRilTemp;
/// <summary>
/// Controllo cmp_rilTemp.
/// cmp_rilTemp control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW_Commesse.WebUserControls.cmp_rilTemp cmp_rilTemp;
/// <summary>
/// Controllo cmp_chart.
/// cmp_chart control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW_Commesse.WebUserControls.cmp_chart cmp_chart;
/// <summary>
/// Controllo upMain.
/// upMain control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel upMain;
/// <summary>
/// Controllo divSx.
/// divSx control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divSx;
/// <summary>
/// Controllo pnlEditOre.
/// pnlEditOre control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel pnlEditOre;
/// <summary>
/// Controllo btnCloseTimb.
/// btnCloseTimb control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnCloseTimb;
/// <summary>
/// Controllo mod_elencoTimbr1.
/// mod_elencoTimbr1 control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW_Commesse.WebUserControls.mod_elencoTimbr mod_elencoTimbr1;
/// <summary>
/// Controllo mod_commUtMancTimbr1.
/// mod_commUtMancTimbr1 control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW_Commesse.WebUserControls.mod_commUtMancTimbr mod_commUtMancTimbr1;
/// <summary>
/// Controllo divCn.
/// divCn control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divCn;
/// <summary>
/// Controllo grView.
/// grView control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.GridView grView;
/// <summary>
/// Controllo ods.
/// ods control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
/// <summary>
/// Controllo divDx.
/// divDx control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divDx;
/// <summary>
/// Controllo pnlEditCom.
/// pnlEditCom control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel pnlEditCom;
/// <summary>
/// Controllo btnCloseRA.
/// btnCloseRA control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnCloseRA;
/// <summary>
/// Controllo mod_TagCloudProgetti1.
/// mod_TagCloudProgetti1 control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW_Commesse.WebUserControls.mod_TagCloudProgetti mod_TagCloudProgetti1;
/// <summary>
/// Controllo mod_commAttivitaDesk1.
/// mod_commAttivitaDesk1 control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW_Commesse.WebUserControls.mod_commAttivitaDesk mod_commAttivitaDesk1;
}