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" --- schall/static/RGraph/docs/setconfig.html | 155 +++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 schall/static/RGraph/docs/setconfig.html (limited to 'schall/static/RGraph/docs/setconfig.html') diff --git a/schall/static/RGraph/docs/setconfig.html b/schall/static/RGraph/docs/setconfig.html new file mode 100644 index 0000000..14ebfb0 --- /dev/null +++ b/schall/static/RGraph/docs/setconfig.html @@ -0,0 +1,155 @@ + + + + + + RGraph: HTML5 Javascript charts library - The RGraph.SetConfig() function + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Mention RGraph on Twitter + +
+ + + +
+ + +
+ + + + +

RGraph: HTML5 Javascript charts library - The RGraph.SetConfig() function

+ + + + +
+ [No canvas support] +
+ + + +

+ Instead of using a number of .Set() calls, you may find that using the RGraph.SetConfig() method more to your tastes. The + method is an alternative to setting the configuration of your chart. It doesn't offer any speed benefits, but it can facilitate reuse better, so that the + appearance of your websites charts is the same. There's an example of its use below: +

+ +
+ +
+<script>
+    window.onload = function ()
+    {
+        /**
+        * This configuration could be stored in a central configuration file, making its reuse easier. You could also have
+        * several different configurations that you pick and choose from depending on the requirements. Values in
+        * subsequent calls to .SetConfig() will overwrite previous ones.
+        */
+        var config = {
+                      'chart.colors':                  ['red', 'green'],
+                      'chart.labels':                  ['John','Fred','June','Charles','Lou', 'Olga'],
+                      'chart.title.yaxis':             'Amount',
+                      'chart.title.yaxis.pos':         -0.2,
+                      'chart.title.xaxis':             'Person',
+                      'chart.background.grid.autofit': true,
+                      'chart.title': 'A chart showing RGraph.SetConfig()'
+                     }
+        var bar = new RGraph.Bar('cvs', [48,56,52,49,43,51]);
+        RGraph.SetConfig(bar, config);
+        bar.Draw();
+    }
+</script>
+
+ + + \ No newline at end of file -- cgit v1.2.1