initial commit
[home-automation.git] / RGraph / docs / rscatter.html
1 <!DOCTYPE html>
2 <html> 
3 <head> 
4     <meta http-equiv="X-UA-Compatible" content="chrome=1"> 
5     <!--
6         /**
7         * o------------------------------------------------------------------------------o
8         * | This file is part of the RGraph package - you can learn more at:             |
9         * |                                                                              |
10         * |                          http://www.rgraph.net                               |
11         * |                                                                              |
12         * | This package is licensed under the RGraph license. For all kinds of business |
13         * | purposes there is a small one-time licensing fee to pay and for non          |
14         * | commercial  purposes it is free to use. You can read the full license here:  |
15         * |                                                                              |
16         * |                      http://www.rgraph.net/LICENSE.txt                       |
17         * o------------------------------------------------------------------------------o
18         */
19     --> 
20     <title>RGraph: HTML5 canvas graph library - Radial scatter chart documentation</title> 
21     
22     <meta name="keywords" content="rgraph html5 canvas graph docs radial scatter chart" /> 
23     <meta name="description" content="RGraph: Documentation about the Radial scatter chart" /> 
24  
25     <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" /> 
26     <link rel="icon" type="image/png" href="/favicon.png"> 
27 </head> 
28 <body>
29
30     <!-- Social networking buttons -->
31     <script src="../libraries/RGraph.common.core.js" ></script>
32     
33     <script>
34         function HideTwitterDIV ()
35         {
36             document.getElementById("twitter_div").style.opacity = 0;
37             document.getElementById("twitter_div").style.display = 'none';
38         }
39
40
41         function ShowTwitterDIV (e)
42         {
43             var e   = RGraph.FixEventObject(document.all ? event : e);
44             var div = document.getElementById("twitter_div");
45             var img = document.getElementById("twitter_icon");
46
47             div.style.display = 'block';
48             div.style.left    = (RGraph.getCanvasXY(img)[0] + img.offsetWidth - div.offsetWidth + 110) + 'px';
49             div.style.top     = (RGraph.getCanvasXY(img)[1] - 1) + 'px';
50
51             /**
52             * Fade it in
53             */
54             setTimeout('document.getElementById("twitter_div").style.opacity = 0.2;', 25);
55             setTimeout('document.getElementById("twitter_div").style.opacity = 0.4;', 50);
56             setTimeout('document.getElementById("twitter_div").style.opacity = 0.6;', 100);
57             setTimeout('document.getElementById("twitter_div").style.opacity = 0.8;', 125);
58             setTimeout('document.getElementById("twitter_div").style.opacity = 1.0;', 150);
59
60             e.stopPropagation();
61
62             return false;
63         }
64
65         /**
66         * This code installs the event handler that hides the Twitter DIV
67         */
68         if (RGraph.isIE8()) {
69              window.attachEvent('onload', function () {document.body.attachEvent('onclick', HideTwitterDIV);});
70         } else {
71             window.addEventListener('click', HideTwitterDIV, false);
72         }
73     </script>
74
75     <!-- The twitter DIV --> 
76     <div id="twitter_div" style="position: absolute;top: 0;left: 0;background-color: #eee;border: 2px dashed black;box-shadow: 0 0 15px #aaa;-moz-box-shadow: 0 0 15px #aaa;-webkit-box-shadow: 0 0 15px #aaa;padding: 3px;display: none;opacity: 0;z-index: 99;"> 
77         <a href="http://twitter.com/home/?status=RGraph%3A+HTML5+canvas+graph+library+based+on+the+HTML5+canvas+tag+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas" target="_blank" title="Share on Twitter" rel="nofollow" style="text-decoration: none">Tweet&nbsp;about&nbsp;RGraph</a><br>
78         <a href="http://twitter.com/_rgraph" style="text-decoration: none" rel="nofollow" target="_blank">Follow for HTML5 news</a> 
79     </div>
80
81     <div id="social_icons" class="warning" style="top: 0; left: 5px; position: absolute">
82         <script>
83             // Opera fix
84             if (navigator.userAgent.indexOf('Opera') == -1) {
85               document.getElementById("social_icons").style.position = 'fixed';
86               document.getElementById("twitter_div").style.position = 'fixed';
87     
88             }
89         </script>
90     
91         <b style="display: inline-block; position: relative; top: 1px">Bookmark and share:</b>
92     
93     
94             <div id="social">
95                 <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20graph%20library%20supporting%20a%20wide%20range%20of%20different%20graph%20types:Bar,%20Bipolar,%20Donut,%20Funnel,%20Gantt,%20Horizontal%20Bar,%20LED,%20Line,%20Meter,%20Odometer,%20Pie,%20Progress%20Bar,%20Rose,%20RScatter,%20Scatter%20and%20Traditional%20Radar&title=RGraph:%20HTML5%20canvas%20graph%20library%20based%20on%20the%20HTML5%20canvas%20tag" target="_blank">
96                     <img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /> 
97                 </a> 
98      
99                 <a href="" target="_blank" onmouseover="if (document.getElementById('twitter_div').style.display == 'none') ShowTwitterDIV(event);" onclick="event.stopPropagation(); event.cancelBubble = true; return false">
100                     <img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" />
101                 </a>
102     
103     
104 <!--
105                 <a title="Post to Google Buzz!" href="" onclick="window.open('http://www.google.com/buzz/post?url=http://www.rgraph.net&imageurl=http://www.rgraph.net/images/logo.png', 'google_buzz_window', 'width=800,height=400,top=100,left=100'); return false">
106                     <img src="../images/buzz.png" width="22" height="22" alt="Post to Google Buzz!" align="absmiddle" style="position: relative; top: -2px; border: 0" border="0"/>
107                 </a>
108     
109     
110                 <a title="Share RGraph on Facebook" href="" onclick="window.open('http://www.facebook.com/sharer.php?u=http://www.rgraph.net&t=RGraph:%20HTML5%20canvas%20graph%20library', 'facebook_window', 'width=500,height=300,top=100,left=100'); return false">
111                     <img src="../images/facebook.png" width="22" height="22" alt="Post to Facebook" align="absmiddle" style="position: relative; top: -2px; border: 0" border="0"/>
112                 </a>
113     
114                 <a href="mailto:share@friendfeed.com" title="Share on FriendFeed"> 
115                     <img src="../images/friendfeed.png" width="22" height="22" alt="Share on FriendFeed" border="0" align="absmiddle" /> 
116                 </a>
117     
118                 <a href="http://www.stumbleupon.com/submit?url=http://www.rgraph.net" target="_blank" title="Share on StumbleUpon" >
119                     <img src="../images/stumble.png" alt="Stumble! this site" width="22" height="22" border="0" align="absmiddle" /> 
120                 </a>
121 -->
122             </div>
123     </div>
124     <!-- /Social networking buttons -->
125
126     <div id="breadcrumb"> 
127         <a href="../index.html">RGraph: HTML5 canvas graph library</a> 
128         >
129         <a href="index.html">Documentation</a> 
130         >
131         Radial scatter chart
132     </div> 
133  
134     <h1>RGraph: HTML5 canvas graph library - Radial scatter chart documentation</h1> 
135  
136     <script>
137         if (RGraph.isIE8()) {
138             document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the graphs, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://groups.google.com/group/rgraph/browse_thread/thread/c5651ff8c56b8f3c#" target="_blank">here</a> to see some screenshots.</div>');
139         }
140     </script> 
141  
142     <p> 
143         The Radial scatter graph is, as the name suggests, a circular variant of the scatter graph.
144     </p> 
145     
146     <p> 
147         The example file is <a href="../examples/rscatter.html">here</a>.
148     </p> 
149     
150     <pre class="code"> 
151 &lt;script&gt;
152     window.onload = function ()
153     {
154         var data = [
155                     [15,53,'red'],
156                     [45,63,null, 'The tooltip'],
157                     [48,45,'green'],
158                     [52,38],
159                     [51,61]
160                    ];
161
162         var rscatter= new RGraph.Rscatter('myCanvas', data);
163         rscatter.Set('chart.labels', ['NE','E','SE','S','SW','W','NW','N']);
164         rscatter.Set('chart.gutter', 35);
165         rscatter.Draw();
166     }
167 &lt;/script&gt;
168 </pre> 
169  
170     <h2>Properties</h2> 
171  
172     <p> 
173         You can use these properties to control how the chart appears. You can set them by using the Set() method. Eg:
174     </p> 
175     
176     <p> 
177         <b>myRscatter.Set('name', 'value');</b> 
178     </p>
179     
180     <ul>
181         <li><a href="#margins">Margins</a></li>
182         <li><a href="#labels and text">Labels and text</a></li>
183         <li><a href="#titles">Titles</a></li>
184         <li><a href="#key">Key</a></li>
185         <li><a href="#scale">Scale</a></li>
186         <li><a href="#interactive features">Interactive features</a></li>
187         <li><a href="#zoom">Zoom</a></li>
188     </ul>
189
190
191 <a name="margins"></a>
192 <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Margins</h3>            <a name="chart.gutter"></a>
193 <b>chart.gutter</b><br />
194             The gutter of the graph. This is the area outside of the X and Y axis - where the labels go. If you're short on space for your labels, try increasing this. <br /><i>Default: 25</i><br /><br />
195 <a name="labels and text"></a>
196 <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Labels and text</h3>            <a name="chart.text.color"></a>
197 <b>chart.text.color</b><br />
198             The color of the labels. <br /><i>Default: black</i><br /><br />
199             <a name="chart.text.size"></a>
200 <b>chart.text.size</b><br />
201             The size (in points) of the labels. <br /><i>Default: 10</i><br /><br />
202             <a name="chart.text.font"></a>
203 <b>chart.text.font</b><br />
204             The font used to render the text.<br /><i>Default: Verdana</i><br /><br />
205             <a name="chart.labels"></a>
206 <b>chart.labels</b><br />
207             The labels, if any, for the graph.<br /><i>Default: none</i><br /><br />
208             <a name="chart.labels.axes"></a>
209 <b>chart.labels.axes</b><br />
210             This controls the axes that show the scale labels. Each letter stands for the appropriate axis (North, South, East and West)<br /><i>Default: nsew</i><br /><br />
211             <a name="chart.labels.position"></a>
212 <b>chart.labels.position</b><br />
213             This can be either <i>center</i> or <i>edge</i> and determines the position of the labels.<br /><i>Default: center</i><br /><br />
214 <a name="titles"></a>
215 <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Titles</h3>            <a name="chart.title"></a>
216 <b>chart.title</b><br />
217             The title of the graph, if any. <br /><i>Default: null</i><br /><br />
218
219 <a name="chart.title.background"></a>
220 <b>chart.title.background</b><br />
221 The background color (if any) for the title.<br />
222 <i>Default: null</i><br /><br />
223
224             <a name="chart.title.color"></a>
225 <b>chart.title.color</b><br />
226             The color of the title.<br /> <i>Default: black</i><br /><br />
227             <a name="chart.title.hpos"></a>
228 <b>chart.title.hpos</b><br />
229             This allows you to completely override the horizontal positioning of the title. It should be a number between 0 and 1, and is multiplied with the whole width of the canvas and then used as the horizontal position. <br /><i>Default: null</i><br /><br />
230             <a name="chart.title.vpos"></a>
231 <b>chart.title.vpos</b><br />
232             This allows you to completely override the vertical positioning of the title. It should be a number between 0 and 1, and is multiplied with the gutter and then used as the vertical position. It can be useful if you need to have a large gutter.<br /><i>Default: null</i><br /><br />
233
234
235
236
237
238             <a name="key"></a>
239             <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Key</h3>
240             
241             <a name="chart.key"></a>
242             <b>chart.key</b><br />
243             An array of key information. <br />
244             <i>Default: [] (An empty array)</i><br /><br />
245
246             <a name="chart.key.background"></a>
247             <b>chart.key.background</b><br />
248             The color of the key background. Typically white, you could set this to something like rgba(255,255,255,0.7) to allow people to see things behind it.<br>
249             <i>Default: white</i><br /><br />
250             
251             <a name="chart.key.position"></a>
252             <b>chart.key.position</b><br />
253             Determines the position of the key.Either <b>graph</b> (default), or <b>gutter</b>.<br />
254             <i>Default: graph</i><br /><br />
255             
256             <b>chart.key.position.x</b><br />
257             This allows you to specify a specific X coordinate for the key.<br />
258             <i>Default: null</i><br /><br />
259             
260             <b>chart.key.position.y</b><br />
261             This allows you to specify a specific Y coordinate for the key.<br />
262             <i>Default: null</i><br /><br />
263             
264             <b>chart.key.position.gutter.boxed</b><br />
265             If you have the key in gutter mode (ie horizontal), this allows you to give a background color.<br />
266             <i>Default: true</i><br /><br />
267             
268             <a name="chart.key.shadow"></a>
269             <b>chart.key.shadow</b><br />
270             Whether a small drop shadow is applied to the key.<br />
271             <i>Default: false</i><br /><br />
272
273             <a name="chart.key.shadow.color"></a>
274             <b>chart.key.shadow.color</b><br />
275             The color of the shadow.<br />
276             <i>Default: #666</i><br /><br />
277
278             <a name="chart.key.shadow.blur"></a>
279             <b>chart.key.shadow.blur</b><br />
280             The extent of the blurring effect used on the shadow.<br />
281             <i>Default: 3</i><br /><br />
282
283             <a name="chart.key.shadow.offsetx"></a>
284             <b>chart.key.shadow.offsetx</b><br />
285             The X offset of the shadow.<br />
286             <i>Default: 2</i><br /><br />
287
288             <a name="chart.key.shadow.offsety"></a>
289             <b>chart.key.shadow.offsety</b><br />
290             The Y offset of the shadow.<br />
291             <i>Default: 2</i><br /><br />
292
293             <b>chart.key.rounded</b><br />
294             This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.<br />
295             <i>Default: false</i><br /><br />
296             
297             <b>chart.key.color.shape</b><br />
298             This can be <i>square</i>, <i>circle</i> or <i>line</i> and controls how the color indicators in the key appear.<br />
299             <i>Default: square</i><br /><br />
300
301
302
303 <a name="interactive features"></a>
304 <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Interactive features</h3>            <a name="chart.contextmenu"></a>
305 <b>chart.contextmenu</b><br />
306             An array of context menu items. More information on context menus is <a href="context.html">here</a>.<br /><i>Default: [] (An empty array)</i><br /><br />
307             <a name="chart.tooltips.effect"></a>
308 <b>chart.tooltips.effect</b><br />
309             The animated effect used for showing tooltips. Can be either <i>fade</i> or <i>expand</i>.<br /><i>Default: fade</i><br /><br />
310             <a name="chart.tooltips.event"></a>
311 <b>chart.tooltips.event</b><br />
312             This is the event that triggers the tooltips. It can be either <i>onclick</i> or <i>onmousemove</i>.<br /><i>Default: onclick</i><br /><br />
313             <a name="chart.tooltips.css.class"></a>
314 <b>chart.tooltips.css.class</b><br />
315             This is the name of the CSS class the graph uses.<br /><i>Default: RGraph_tooltip</i><br /><br />
316             <a name="chart.tooltips.override"></a>
317 <b>chart.tooltips.override</b><br />
318             If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the <a href="tooltips.html">tooltips documentation page</a><br /><i>Default: null</i><br /><br />
319             <a name="chart.annotatable"></a>
320 <b>chart.annotatable</b><br />
321             Whether annotations are enabled for the chart (ie you can draw on the chart interactively.<br /><i>Default: false</i><br /><br />
322             <a name="chart.annotate.color"></a>
323 <b>chart.annotate.color</b><br />
324             If you do not allow the use of the palette, then this will be the only colour allowed for annotations.<br /><i>Default: black</i><br /><br />
325             <a name="chart.resizable"></a>
326 <b>chart.resizable</b><br />
327             Defaulting to false, this determines whether your graph will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).<br /><i>Default: false</i><br /><br />
328 <a name="zoom"></a>
329 <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Zoom</h3>            <a name="chart.zoom.mode"></a>
330 <b>chart.zoom.mode</b><br />
331             Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: <i>thumbnail</i> and <i>canvas</i>.<br /><i>Default: canvas</i><br /><br />
332             <a name="chart.zoom.factor"></a>
333 <b>chart.zoom.factor</b><br />
334             This is the factor that the graph will be zoomed by (bigger values means more zoom)<br /><i>Default: 1.5</i><br /><br />
335             <a name="chart.zoom.fade.in"></a>
336 <b>chart.zoom.fade.in</b><br />
337             Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
338             <a name="chart.zoom.fade.out"></a>
339 <b>chart.zoom.fade.out</b><br />
340             Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
341             <a name="chart.zoom.hdir"></a>
342 <b>chart.zoom.hdir</b><br />
343             The horizontal direction of the zoom. Possible values are: <i>left</i>, <i>center</i>, <i>right</i><br /><i>Default: right</i><br /><br />
344             <a name="chart.zoom.vdir"></a>
345 <b>chart.zoom.vdir</b><br />
346             The vertical direction of the zoom. Possible values are: <i>up</i>, <i>center</i>, <i>down</i><br /><i>Default: down</i><br /><br />
347             <a name="chart.zoom.delay"></a>
348 <b>chart.zoom.delay</b><br />
349             The delay (in milliseconds) between frames.<br /><i>Default: 50</i><br /><br />
350             <a name="chart.zoom.frames"></a>
351 <b>chart.zoom.frames</b><br />
352             The number of frames in the zoom animation.<br /><i>Default: 10</i><br /><br />
353             <a name="chart.zoom.shadow"></a>
354 <b>chart.zoom.shadow</b><br />
355             Whether or not the zoomed canvas has a shadow or not.<br /><i>Default: true</i><br /><br />
356             <a name="chart.zoom.thumbnail.width"></a>
357 <b>chart.zoom.thumbnail.width</b><br />
358             When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
359             <a name="chart.zoom.thumbnail.height"></a>
360 <b>chart.zoom.thumbnail.height</b><br />
361             When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
362             <a name="chart.zoom.background"></a>
363 <b>chart.zoom.background</b><br />
364             Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page.<br /><i>Default: true</i><br /><br />
365 </div><!-- /DOCS --><br /><br />
366
367 <br /><br />
368
369 </body> 
370 </html>