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/annotating.html | 216 ++++++++++++++++++++++++++++++ 1 file changed, 216 insertions(+) create mode 100644 schall/static/RGraph/docs/annotating.html (limited to 'schall/static/RGraph/docs/annotating.html') diff --git a/schall/static/RGraph/docs/annotating.html b/schall/static/RGraph/docs/annotating.html new file mode 100644 index 0000000..c995894 --- /dev/null +++ b/schall/static/RGraph/docs/annotating.html @@ -0,0 +1,216 @@ + + + + + + RGraph: HTML5 Javascript charts library - Annotating your charts + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Mention RGraph on Twitter + +
+ + + +
+ + +
+ + + + +

RGraph: HTML5 Javascript charts library - Annotating your charts

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

+ The annotations feature brings presentation style functionality to RGraph charts. You can use this feature + for highlighting your charts if you need to. +

+ + + + +

How do annotations work?

+ +

+ Enabling annotations is a very simple affair, and consists of doing the following: +

+ +
myGraph.Set('chart.annotatable', true);
+ + +

Browser support

+ +

+ Annotations are supported in all browsers that RGraph works with - Firefox 3.5+, Chrome 2+, Safari 4+, Opera 10.5+ and + MSIE/Google Chrome Frame. They DO NOT however work with MSIE 8/ExCanvas. +

+ + +

What can I use annotations for?

+ +

+ As mentioned you can use it for presentations, highlighting things to yourself or others or just to have fun drawing (!). +

+ + +

Are annotations persistent?

+ +

+ That depends on which browser you're using. The annotation data is stored in the users web browser (not on the web server), + meaning currently (21st March 2010) browser support is limited to Firefox 3.5+, Safari 4+, + Chrome 4+ and Opera 10.5+. MSIE 8 also has the required storage capabilities, but since it doesn't yet support canvas, the point is moot. + The user does not have to + confirm anything for storage to be allowed - try it out on this page by drawing on the chart and then refreshing the page. +

+ + +

How do I show the mini-palette?

+ + +

+ You can show the palette by using the RGraph.Showpalette function shown below as a context menu item: +

+ +
+myObj.Set('chart.contextmenu', [
+                                ['Show palette', RGraph.Showpalette],
+                                ['Clear', function () {RGraph.Clear(myObj.canvas); myObj.Draw();}]
+                               ]);
+
+ +

+ This code will result in the same context menu as the chart above. +

+ + +

How can I clear the annotations?

+ + You can simply clear the chart and redraw it: + +
RGraph.Clear(myGraph.canvas); // Clear the chart
+myGraph.Draw();               // Redraw it
+ +

+ In the chart above, there is a context menu that allows you to both clear the chart and also demonstrates the mini-palette + feature available to you. +

+ + +

Replaying annotations when they're off

+

+ When annotations are not enabled, any prior annotations that may have been made are not displayed. To show them you need + to use the API function RGraph.ReplayAnnotations(object) after the call to .Draw(). +

+ + +

Making your annotations persist across browsers/computers

+

+ With a little bit of custom Javascript and some server side scripting you can make your annotations persist across + different browsers/computers. You can find an example of this here. +

+ + \ No newline at end of file -- cgit v1.2.1