Skip to content

Commit

Permalink
Fix graphs not updating when changing sites/pages
Browse files Browse the repository at this point in the history
  • Loading branch information
salbahra committed Sep 12, 2023
1 parent c2e6aae commit a356d1b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions www/js/analog.js
Expand Up @@ -788,15 +788,14 @@ var showAnalogSensorCharts = ( function() {
"<div id='myChartM9'></div>" +
"<div id='myChartM10'></div>" +
"</div>" +
"</div>" ),
chart1, chart2, chart3;
"</div>" );

function begin() {
$.mobile.loading( "show" );

chart1 = new Array( CHARTS );
chart2 = new Array( CHARTS );
chart3 = new Array( CHARTS );
var chart1 = new Array( CHARTS ),
chart2 = new Array( CHARTS ),
chart3 = new Array( CHARTS );

page.one( "pagehide", function() {
page.detach();
Expand All @@ -815,7 +814,6 @@ var showAnalogSensorCharts = ( function() {
$( "#analogsensorchart" ).remove();
$.mobile.pageContainer.append( page );

//SendToOS("/so?pw=&lasthours=24&csv=2", "text").then(function (csv) {
sendToOS( "/so?pw=&lasthours=24&csv=2", "text" ).then( function( csv1 ) {
buildGraph( "#myChart", chart1, csv1, _( "last 24h" ), "HH:mm" );

Expand Down

0 comments on commit a356d1b

Please sign in to comment.