So in addition hiding these 3 or more series from the legend, I'd also like to be able to:
Draw an inverted 'fillGraph' for the two threshold series and possibly hide the actual data line itself (or change it to match the background color if it's not possible to hide them)
To clarify a bit, on the above image, the two "purple" lines are the threshold. The area above the topmost would be shaded red, and the area above the one below it would be shaded amber (darkish yellow), similar to how I have thresholds set in one of my more "standard" graphs:
I know it's a rather odd compound situation... I've done a lot of googling/researching on the individual components of my task at hand, and a lot of it seems to be unanswered on Reddit/here/stackoverflow... so any assistance would be appreciated.
On a side note: since 'connectSeparatedPoints' does a canvas draw over unknown values, it "should" in theory have all the data internalized to do an "on the fly" linear interpolation. Is there any current plan to make some sort of data callback on the draw function available, possibly through an additional boolean flag, to prevent the 'undefined' datapoints?
--
You received this message because you are subscribed to the Google Groups "dygraphs-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dygraphs-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
And here's the code that got me there:
gs2 = new Dygraph(document.getElementById("div2"), <?php
$sql = "SELECT testdata.date, testdata.time, testdata.motorintemp, noaadata.drybulbf FROM testdata LEFT JOIN `noaadata` ON (testdata.date = noaadata.date) AND (testdata.time = noaadata.time)"; $result = $conn->query($sql);
echo "[";
while($r = mysqli_fetch_array($result)){ $test = $r['date'] . " " . $r['time']; $a = date('Y-m-d H:i:s',strtotime($test)); $a= '"'.$a.'"'; $b = ((float) $r['motorintemp']); if ($r['drybulbf'] != null){ $c = ((float) $r['drybulbf']); $d = $c + 60.0; $e = $c + 70.0; } else { $c = $d = $e = "null"; } $f = (float) 199.9; echo '['."(new Date($a))".','.$b.','.$c.','.$d.','.$e.','.$f.'],'; } echo "]"; ?>, { labels:["Timestamp", "Motor Inboard Temp", "Ambient Temp", "warn","crit","upper"], legend: 'always', connectSeparatedPoints: true, valueRange:[-20, 200], series: { upper: { color: rednoa, fillGraph: true, fillAlpha: 1.0, },
crit: { color: ambernoa, fillGraph: true, fillAlpha: 1.0, }, warn: { color: greennoa, fillGraph: true, fillAlpha: 1.0, // }, 'Motor Inboard Temp': { color: 'black', } }, legendFormatter: function(data) { data.series = [data.series[0]]; return Dygraph.Plugins.Legend.defaultFormatter.call(this, data); } } )
To unsubscribe from this group and stop receiving emails from it, send an email to dygraphs-user...@googlegroups.com.