From 770ba5201f5c60b2bb36602ff9d359f641e33125 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Sun, 23 Oct 2011 21:14:40 +0200 Subject: Charting with flask, rgraph and custom "timeseries database" --- .../static/RGraph/docs/adjusting_thermometer.html | 151 +++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 schall/static/RGraph/docs/adjusting_thermometer.html (limited to 'schall/static/RGraph/docs/adjusting_thermometer.html') diff --git a/schall/static/RGraph/docs/adjusting_thermometer.html b/schall/static/RGraph/docs/adjusting_thermometer.html new file mode 100644 index 0000000..6964d5d --- /dev/null +++ b/schall/static/RGraph/docs/adjusting_thermometer.html @@ -0,0 +1,151 @@ + + + + + + RGraph: HTML5 Javascript charts library - Adjusting your charts interactively - Thermometer chart + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Mention RGraph on Twitter + +
+ + + +
+ + +
+ + + + +

RGraph: HTML5 Javascript charts library - Adjusting your charts interactively - Thermometer chart

+ + + + [No canvas support] + +

+ Nothing pertinent is kept in the registry. If you wish to get the new value of the thermometer you can check obj.value. + If you want the value before the adjustment, you can check the value with the onadjustbegin event (instead of the + onadjustend event). +

+ +

+ +

+ +
+ +
+<script>
+    window.onload = function (e)
+    {
+        var thermometer = new RGraph.Thermometer('myc', 0, 100, 78);
+        
+        var grad = thermometer.context.createLinearGradient(0,50,0,350);
+        grad.addColorStop(0, 'orange');
+        grad.addColorStop(1, 'white');
+
+        thermometer.Set('chart.colors', [grad]);
+        thermometer.Set('chart.title.side', 'An adjustable thermometer');
+        thermometer.Set('chart.adjustable', true);
+        thermometer.Draw();
+
+        RGraph.AddCustomEventListener(thermometer, 'onadjustbegin', function (obj) {document.getElementById("output").value += 'Value before adjustment: ' + obj.value + '\n';});
+        RGraph.AddCustomEventListener(thermometer, 'onadjust', function (obj) {document.getElementById("output").value += 'Value during adjustment: ' + obj.value + '\n';});
+        RGraph.AddCustomEventListener(thermometer, 'onadjustend', function (obj) {document.getElementById("output").value += 'Value after adjustment: ' + obj.value + '\n';});
+    }
+</script>
+
+ + \ No newline at end of file -- cgit v1.2.1