# HG changeset patch # User Daniel O'Connor # Date 1325579755 -37800 # Node ID 6edb93c20971da667234496a4934af35a4963b08 # Parent 4b9d1b47ca179ab73749d237a37cbd63b6283315 Fix stretching the graph limits for temperature. diff -r 4b9d1b47ca17 -r 6edb93c20971 static/iwws.js --- a/static/iwws.js Sun Aug 21 15:47:52 2011 +0930 +++ b/static/iwws.js Tue Jan 03 19:05:55 2012 +1030 @@ -48,10 +48,10 @@ for (i = 0; i < l; i++) { // Convert time from UTC to browser LT t = datacache['idx'][i] - tzofs; - if (datacache['temp_out'] < mint) + if (datacache['temp_out'][i] < mint) mint = datacache['temp_out'] - if (datacache['temp_out'] < maxt) - maxt = datacache['temp_out'] + if (datacache['temp_out'][i] > maxt) + maxt = datacache['temp_out'][i] temp_out.push([t * 1000.0, datacache['temp_out'][i]]); if (datacache['hum_out'][i] != null && datacache['temp_out'][i] != null) { dewpt.push([t * 1000.0, hum2dp(datacache['hum_out'][i], datacache['temp_out'][i])]); @@ -62,6 +62,7 @@ if (datacache['rain'][i] > 0) rain.push([t * 1000.0, datacache['rain'][i]]); } + $.plot($("#graph1"), [ { data : pressure, label: "Baro", yaxis : 1, points : { show : true }, lines : { show : true } }, { data : temp_out, label: "Temp.", yaxis : 2, points : { show : true }, lines : { show : true } },