source: Dev/branches/rest-dojo-ui/jQueryUI/client/RGraph/docs/radar.html @ 312

Last change on this file since 312 was 312, checked in by jkraaijeveld, 13 years ago
File size: 21.9 KB
Line 
1<?php ob_start('ob_gzhandler') ?>
2<!DOCTYPE html>
3<html>
4<head>
5    <meta http-equiv="X-UA-Compatible" content="chrome=1">
6    <!--
7        /**
8        * o------------------------------------------------------------------------------o
9        * | This file is part of the RGraph package - you can learn more at:             |
10        * |                                                                              |
11        * |                          http://www.rgraph.net                               |
12        * |                                                                              |
13        * | This package is licensed under the RGraph license. For all kinds of business |
14        * | purposes there is a small one-time licensing fee to pay and for personal,    |
15        * | charity and educational purposes it is free to use. You can read the full    |
16        * | license here:                                                                |
17        * |                      http://www.rgraph.net/LICENSE.txt                       |
18        * o------------------------------------------------------------------------------o
19        */
20    -->
21    <title>RGraph: Javascript charts and graph library - Radar charts documentation</title>
22
23    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
24    <link rel="icon" type="image/png" href="/favicon.png">
25   
26    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
27    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
28    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
29
30    <script>
31      var _gaq = _gaq || [];
32      _gaq.push(['_setAccount', 'UA-54706-2']);
33      _gaq.push(['_trackPageview']);
34   
35      (function() {
36        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
37        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
38        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
39      })();
40    </script>
41
42</head>
43<body>
44
45    <!-- Social networking buttons -->
46        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
47            <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%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
48            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
49        </div>
50
51        <script>
52            // Opera fix
53            if (navigator.userAgent.indexOf('Opera') == -1) {
54              document.getElementById("social_icons").style.position = 'fixed';
55            }
56        </script>
57    <!-- Social networking buttons -->
58
59    <div id="breadcrumb">
60        <a href="../index.html">RGraph: Javascript charts and graph library</a>
61        >
62        <a href="index.html">Documentation</a>
63        >
64        Radar charts
65    </div>
66
67    <h1>RGraph: <span>Javascript charts and graph library</span> - Radar charts documentation</h1>
68
69    <div style="background-color: #ffb; border: 2px dashed #000; padding: 3px">
70        This chart used to be called the Tradar chart (T standing for "Traditional" - there used to be two Radar charts in RGraph),
71        however now (July 2011), it has been renamed to the "Radar" chart to make it easier for people to identify. If you use it
72        you will need to update your code accordingly. Keep in mind that if you use the .type property - this has been updated too
73        (to <i>radar</i>).
74    </div>
75
76    <script>
77        if (RGraph.isIE8()) {
78            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 charts, 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://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
79        }
80    </script>
81
82    <p>
83        A Radar chart.
84    </p>
85   
86    <p>
87        The example file is <a href="../examples/radar.html">here</a>.
88    </p>
89   
90    <pre class="code">
91&lt;script&gt;
92    window.onload = function ()
93    {
94        var data = [3, 3, 41, 37, 16];
95   
96        var radar = new RGraph.Radar('myRadar', data);
97        radar.Set('chart.background.circles', true);
98        radar.Set('chart.color', 'rgba(255,0,0,0.5)');
99        radar.Set('chart.circle', 20);
100        radar.Set('chart.circle.fill', 'rgba(200,255,200,0.5)');
101        radar.Set('chart.labels', ['Safari (3%)', 'Other (3%)', 'MSIE 7 (41%)', 'MSIE 6 (37%)', 'Firefox (16%)']);
102        radar.Set('chart.key', ['Market share', 'A made up figure']);
103        radar.Draw();
104    }
105&lt;/script&gt;
106</pre>
107
108
109    <h2>Properties</h2>
110   
111    <p>
112        You can use these properties to control how the chart apears. You can set these properties by using the Set() method. Eg:
113    </p>
114   
115    <p>
116        <b>myRadar.Set('color', 'rgba(255,0,0,0.5)');</b>
117    </p>
118   
119    <ul>
120        <li><a href="#margins">Margins</a></li>
121        <li><a href="#colors">Colors</a></li>
122        <li><a href="#title">Title</a></li>
123        <li><a href="#labels and text">Labels and text</a></li>
124        <li><a href="#scale">Scale</a></li>
125        <li><a href="#misc">Miscellaneous</a></li>
126        <li><a href="#key">Key</a></li>
127        <li><a href="#interactive features">Interactive features</a></li>
128        <li><a href="#zoom">Zoom</a></li>
129    </ul>
130
131
132
133<a name="margins"></a>
134<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>
135
136
137
138            <a name="chart.gutter.left"></a>
139            <b>chart.gutter.left</b><br />
140            The left gutter of the chart, (the gutter is where the labels and title are)).<br />
141            <i>Default: 25</i><br /><br />
142
143            <a name="chart.gutter.right"></a>
144            <b>chart.gutter.right</b><br />
145            The right gutter of the chart, (the gutter is where the labels and title are).<br />
146            <i>Default: 25</i><br /><br />
147
148            <a name="chart.gutter.top"></a>
149            <b>chart.gutter.top</b><br />
150            The top gutter of the chart, (the gutter is where the labels and title are).<br />
151            <i>Default: 25</i><br /><br />
152
153            <a name="chart.gutter.bottom"></a>
154            <b>chart.gutter.bottom</b><br />
155            The bottom gutter of the chart, (the gutter is where the labels and title are).<br />
156            <i>Default: 25</i><br /><br />
157
158<a name="colors"></a>
159<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">Colors</h3>
160            <a name="chart.colors"></a>
161            <b>chart.colors</b><br />
162            The colors of the radar chart(s).<br />
163            <i>Default: red</i><br /><br />
164
165            <a name="chart.colors.alpha"></a>
166            <b>chart.colors.alpha</b><br />
167            If set (a number between 0 nd 1), this will be used as the alpha value of the colors of the chart.<br />
168            <i>Default: null</i><br /><br />
169
170<a name="title"></a>
171<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">Title</h3>
172
173            <a name="chart.title"></a>
174            <b>chart.title</b><br />
175            The title, if any, of the chart.<br />
176            <i>Default: Not set</i><br /><br />
177
178            <a name="chart.title.color"></a>
179<b>chart.title.color</b><br />
180            The color of the title.<br /> <i>Default: black</i><br /><br />
181            <a name="chart.title.vpos"></a>
182<b>chart.title.vpos</b><br />
183            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 />
184            <a name="chart.title.hpos"></a>
185<b>chart.title.hpos</b><br />
186            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 />
187<a name="labels and text"></a>
188<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.labels"></a>
189<b>chart.labels</b><br />
190            The labels to use for the chart.<br /><i>Default: An empty array</i><br /><br />
191            <a name="chart.labels.axes"></a>
192<b>chart.labels.axes</b><br />
193            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 />
194            <a name="chart.labels.offsetx"></a>
195<b>chart.labels.offsetx</b><br />
196            The X pixel offset for the labels.<br /><i>Default: 10</i><br /><br />
197            <a name="chart.labels.offsety"></a>
198<b>chart.labels.offsety</b><br />
199            The Y pixel offset for the labels.<br /><i>Default: 10</i><br /><br />
200            <a name="chart.text.font"></a>
201<b>chart.text.font</b><br />
202            The font used to render the text.<br /><i>Default: Verdana</i><br /><br />
203            <a name="chart.text.color"></a>
204<b>chart.text.color</b><br />
205            The color of the labels. <br /><i>Default: black</i><br /><br />
206            <a name="chart.text.size"></a>
207<b>chart.text.size</b><br />
208            The size of the text (in points).<br /><i>Default: 10</i><br /><br />
209<a name="scale"></a>
210
211<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">Scale</h3>            <a name="chart.ymax"></a>
212            <b>chart.ymax</b><br />
213            The optional maximum Y scale value. If not specified then it will be calculated.<br /><i>Default: null (It's calculated)</i><br /><br />
214
215            <a name="chart.scale.round"></a>
216            <b>chart.scale.round</b><br />
217            Whether to round the maximum scale value up or not. This will produce slightly better scales in some instances.<br />
218            <i>Default: null</i><br /><br />
219
220    <a name="misc"></a>
221    <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">Miscellaneous</h3>
222        <a name="chart.highlight.stroke"></a>
223        <b>chart.highlight.stroke</b><br />
224        If you use tooltips, this controls the color of the highlight stroke.
225        <br /><i>Default: gray</i><br /><br />
226
227        <a name="chart.highlight.fill"></a>
228        <b>chart.highlight.fill</b><br />
229        If you use tooltips, this controls the colour of the highlight fill.
230        <br /><i>Default: white</i><br /><br />
231
232<a name="chart.background.circles"></a>
233<b>chart.background.circles</b><br />
234            Whether to draw the grey background circles.<br /><i>Default: true</i><br /><br />
235            <a name="chart.linewidth"></a>
236<b>chart.linewidth</b><br />
237            The width of the outline.<br /><i>Default: 1</i><br /><br />
238            <a name="chart.circle"></a>
239<b>chart.circle</b><br />
240            What value to draw a circle at. Defaults to zero (off). You could use this to represent a threshold of some sort.<br /><i>Default: 0</i><br /><br />
241            <a name="chart.circle.fill"></a>
242<b>chart.circle.fill</b><br />
243            What color to fill the circle with.<br /><i>Default: red</i><br /><br />
244            <a name="chart.circle.stroke"></a>
245<b>chart.circle.stroke</b><br />
246            What color to stroke (ie The outline) the circle with.<br /><i>Default: black</i><br /><br />
247
248
249
250
251
252
253            <a name="key"></a>
254            <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>
255           
256            <a name="chart.key"></a>
257            <b>chart.key</b><br />
258            An array of key information. <br />
259            <i>Default: [] (An empty array)</i><br /><br />
260
261            <a name="chart.key.background"></a>
262            <b>chart.key.background</b><br />
263            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>
264            <i>Default: white</i><br /><br />
265           
266            <a name="chart.key.halign"></a>
267            <b>chart.key.halign</b><br />
268            Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
269            aligned <i>left</i> or <i>right</i>.<br />
270            <i>Default: right</i><br /><br />
271           
272            <a name="chart.key.position"></a>
273            <b>chart.key.position</b><br />
274            Determines the position of the key.Either <b>graph</b> (default), or <b>gutter</b>.<br />
275            <i>Default: graph</i><br /><br />
276           
277            <b>chart.key.position.x</b><br />
278            This allows you to specify a specific X coordinate for the key.<br />
279            <i>Default: null</i><br /><br />
280           
281            <b>chart.key.position.y</b><br />
282            This allows you to specify a specific Y coordinate for the key.<br />
283            <i>Default: null</i><br /><br />
284           
285            <b>chart.key.position.gutter.boxed</b><br />
286            If you have the key in gutter mode (ie horizontal), this allows you to give a background color.<br />
287            <i>Default: true</i><br /><br />
288           
289            <a name="chart.key.shadow"></a>
290            <b>chart.key.shadow</b><br />
291            Whether a small drop shadow is applied to the key.<br />
292            <i>Default: false</i><br /><br />
293
294            <a name="chart.key.shadow.color"></a>
295            <b>chart.key.shadow.color</b><br />
296            The color of the shadow.<br />
297            <i>Default: #666</i><br /><br />
298
299            <a name="chart.key.shadow.blur"></a>
300            <b>chart.key.shadow.blur</b><br />
301            The extent of the blurring effect used on the shadow.<br />
302            <i>Default: 3</i><br /><br />
303
304            <a name="chart.key.shadow.offsetx"></a>
305            <b>chart.key.shadow.offsetx</b><br />
306            The X offset of the shadow.<br />
307            <i>Default: 2</i><br /><br />
308
309            <a name="chart.key.shadow.offsety"></a>
310            <b>chart.key.shadow.offsety</b><br />
311            The Y offset of the shadow.<br />
312            <i>Default: 2</i><br /><br />
313
314            <b>chart.key.rounded</b><br />
315            This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.<br />
316            <i>Default: false</i><br /><br />
317           
318            <b>chart.key.color.shape</b><br />
319            This can be <i>square</i>, <i>circle</i> or <i>line</i> and controls how the color indicators in the key appear.<br />
320            <i>Default: square</i><br /><br />
321           
322            <b>chart.key.linewidth</b><br />
323            The line width of the surrounding border on the key.<br />
324            <i>Default: 1</i><br /><br />
325
326
327
328
329
330
331
332<a name="interactive features"></a>
333<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>
334
335            <a name="chart.contextmenu"></a>
336            <b>chart.contextmenu</b><br />
337            An array of context menu items. More information on context menus is <a href="context.html">here</a>.<br />
338            <i>Default: [] (An empty array)</i><br /><br />
339           
340            <a name="chart.annotatable"></a>
341            <b>chart.annotatable</b><br />
342            Whether annotations are enabled for the chart (ie you can draw on the chart interactively.<br /><i>Default: false</i><br /><br />
343           
344            <a name="chart.annotate.color"></a>
345            <b>chart.annotate.color</b><br />
346            If you do not allow the use of the palette, then this will be the only colour allowed for annotations.<br />
347            <i>Default: black</i><br /><br />
348
349            <a name="chart.tooltips"></a>
350            <b>chart.tooltips</b><br />
351            A numerically indexed array of tooltips that are shown when a hotspot is hovered over. These can contain HTML.<br />
352            <i>Default: An empty array</i><br /><br />
353
354            <a name="chart.tooltips.effect"></a>
355            <b>chart.tooltips.effect</b><br />
356            The visual effect used when showing tooltips. Can be either <i>fade</i> or <i>expand</i>.<br />
357            <i>Default: fade</i><br /><br />
358
359            <a name="chart.tooltips.css.class"></a>
360            <b>chart.tooltips.css.class</b><br />
361            This is the name of the CSS class the chart uses.<br />
362            <i>Default: RGraph_tooltip</i><br /><br />
363
364            <a name="chart.tooltips.override"></a>
365            <b>chart.tooltips.override</b><br />
366            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 />
367            <i>Default: null</i><br /><br />
368
369            <a name="chart.resizable"></a>
370            <b>chart.resizable</b><br />
371            Defaulting to false, this determines whether your chart 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 />
372            <i>Default: false</i><br /><br />
373
374
375            <a name="chart.resize.handle.background"></a>
376            <b>chart.resize.handle.background</b><br />
377            With this you can specify the background color for the resize handle. If you're adjusting the position of the
378            handle then you may need this to make the handle stand out more.<br />
379            <i>Default: null</i><br /><br />
380
381<a name="zoom"></a>
382<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>
383<b>chart.zoom.mode</b><br />
384            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 />
385            <a name="chart.zoom.factor"></a>
386<b>chart.zoom.factor</b><br />
387            This is the factor that the chart will be zoomed by (bigger values means more zoom)<br /><i>Default: 1.5</i><br /><br />
388            <a name="chart.zoom.fade.in"></a>
389<b>chart.zoom.fade.in</b><br />
390            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 />
391            <a name="chart.zoom.fade.out"></a>
392<b>chart.zoom.fade.out</b><br />
393            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 />
394            <a name="chart.zoom.hdir"></a>
395<b>chart.zoom.hdir</b><br />
396            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 />
397            <a name="chart.zoom.vdir"></a>
398<b>chart.zoom.vdir</b><br />
399            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 />
400            <a name="chart.zoom.delay"></a>
401<b>chart.zoom.delay</b><br />
402            The delay (in milliseconds) between frames.<br /><i>Default: 50</i><br /><br />
403            <a name="chart.zoom.frames"></a>
404<b>chart.zoom.frames</b><br />
405            The number of frames in the zoom animation.<br /><i>Default: 10</i><br /><br />
406            <a name="chart.zoom.shadow"></a>
407<b>chart.zoom.shadow</b><br />
408            Whether or not the zoomed canvas has a shadow or not.<br /><i>Default: true</i><br /><br />
409            <a name="chart.zoom.thumbnail.width"></a>
410<b>chart.zoom.thumbnail.width</b><br />
411            When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
412            <a name="chart.zoom.thumbnail.height"></a>
413<b>chart.zoom.thumbnail.height</b><br />
414            When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
415            <a name="chart.zoom.background"></a>
416<b>chart.zoom.background</b><br />
417            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 />
418</div><!-- /DOCS --><br /><br />
419</body>
420</html>
Note: See TracBrowser for help on using the repository browser.