source: Dev/branches/jQueryUI/client/RGraph/docs/funnel.html @ 249

Last change on this file since 249 was 249, checked in by hendrikvanantwerpen, 13 years ago

This one's for Subversion, because it's so close...

First widget (stripped down sequencer).
Seperated client and server code in two direcotry trees.

File size: 21.0 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 non          |
15        * | commercial  purposes it is free to use. You can read the full license here:  |
16        * |                                                                              |
17        * |                      http://www.rgraph.net/LICENSE.txt                       |
18        * o------------------------------------------------------------------------------o
19        */
20    -->
21    <title>RGraph: Javascript charts and graph library - funnel charts documentation</title>
22   
23    <meta name="keywords" content="rgraph html5 canvas chart docs funnel charts" />
24    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about the Funnel charts" />
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    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
31    <link rel="icon" type="image/png" href="../images/favicon.png">
32
33    <script>
34      var _gaq = _gaq || [];
35      _gaq.push(['_setAccount', 'UA-54706-2']);
36      _gaq.push(['_trackPageview']);
37   
38      (function() {
39        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
40        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
41        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
42      })();
43    </script>
44
45</head>
46<body>
47
48
49   
50    <!-- Social networking buttons -->
51        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
52            <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>
53            <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>
54        </div>
55
56        <script>
57            // Opera fix
58            if (navigator.userAgent.indexOf('Opera') == -1) {
59              document.getElementById("social_icons").style.position = 'fixed';
60            }
61        </script>
62    <!-- Social networking buttons -->
63
64    <div id="breadcrumb">
65        <a href="../index.html">RGraph: Javascript charts and graph library</a>
66        >
67        <a href="index.html">Documentation</a>
68        >
69        Funnel charts
70    </div>
71
72    <h1>RGraph: <span>Javascript charts and graph library</span> - Funnel charts documentation</h1>
73
74    <script>
75        if (RGraph.isIE8()) {
76            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>');
77        }
78    </script>
79
80    <p>
81        These are funnel charts. It can be used to illustrate stages of a sales or order fulfillment process, and in doing so highlight
82        any bottlenecks or steps where large amounts of customers are lost.
83    </p>
84   
85    <p>
86        The example file is <a href="../examples/funnel.html">here</a>.
87    </p>
88   
89    <pre class="code">
90&lt;script&gt;
91    window.onload = function ()
92    {
93        var funnel = new RGraph.Funnel('funnel1', [100,45,45,26,21,5]);
94        funnel.Set('chart.text.boxed', false);
95        funnel.Set('chart.title', 'Leads through to sales');
96        funnel.Set('chart.labels', ['A', 'B', 'C', 'D', 'E', 'F']);
97        funnel.Set('chart.shadow', true);
98        funnel.Draw();
99    }
100&lt;/script&gt;
101</pre>
102
103
104    <h2>Properties</h2>
105   
106    <p>
107        You can use these properties to control how the Funnel chart appears. You can set them by using the Set() method. Eg:
108    </p>
109   
110    <p>
111        <b>myFunnel.Set('name', 'value');</b>
112    </p>
113   
114    <ul>
115        <li><a href="#margins">Margins</a></li>
116        <li><a href="#colors">Colors</a></li>
117        <li><a href="#labels and text">Labels and text</a></li>
118        <li><a href="#titles">Titles</a></li>
119        <li><a href="#shadow">Shadow</a></li>
120        <li><a href="#interactive features">Interactive features</a></li>
121        <li><a href="#key">Key</a></li>
122        <li><a href="#zoom">Zoom</a></li>
123        <li><a href="#misc">Miscellaneous</a></li>
124    </ul>
125
126<a name="margins"></a>
127<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>
128
129
130
131            <a name="chart.gutter.left"></a>
132            <b>chart.gutter.left</b><br />
133            The left gutter of the chart, (the gutter is where the labels and title are)).<br />
134            <i>Default: 25</i><br /><br />
135
136            <a name="chart.gutter.right"></a>
137            <b>chart.gutter.right</b><br />
138            The right gutter of the chart, (the gutter is where the labels and title are).<br />
139            <i>Default: 25</i><br /><br />
140
141            <a name="chart.gutter.top"></a>
142            <b>chart.gutter.top</b><br />
143            The top gutter of the chart, (the gutter is where the labels and title are).<br />
144            <i>Default: 25</i><br /><br />
145
146            <a name="chart.gutter.bottom"></a>
147            <b>chart.gutter.bottom</b><br />
148            The bottom gutter of the chart, (the gutter is where the labels and title are).<br />
149            <i>Default: 25</i><br /><br />
150
151<a name="colors"></a>
152<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>            <a name="chart.colors"></a>
153<b>chart.colors</b><br />
154            These are the colors used for each segment.<br /><i>Default: ['red', 'green', 'gray', 'blue', 'black', 'white']</i><br /><br />
155<a name="labels and text"></a>
156<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>
157<b>chart.labels</b><br />
158            An array of the labels to be used on the chart. <br /><i>Default: An empty array</i><br /><br />
159            <a name="chart.text.font"></a>
160<b>chart.text.font</b><br />
161            The font used to render the text.<br /><i>Default: Verdana</i><br /><br />
162            <a name="chart.text.color"></a>
163<b>chart.text.color</b><br />
164            The color of the labels. <br /><i>Default: black</i><br /><br />
165            <a name="chart.text.size"></a>
166<b>chart.text.size</b><br />
167            The size (in points) of the labels. <br /><i>Default: 10</i><br /><br />
168            <a name="chart.text.boxed"></a>
169<b>chart.text.boxed</b><br />
170            Whether the text is contained within a white bounding box. In some cases this can help readability.<br /><i>Default: true</i><br /><br />
171            <a name="chart.text.halign"></a>
172<b>chart.text.halign</b><br />
173            The horizontal alignment of the text. Can be <i>center</i> or <i>left</i>.<br /><i>Default: left</i><br /><br />
174<a name="titles"></a>
175<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>
176<b>chart.title</b><br />
177            The title of the chart, if any. <br /><i>Default: null</i><br /><br />
178
179<a name="chart.title.background"></a>
180<b>chart.title.background</b><br />
181The background color (if any) for the title.<br />
182<i>Default: null</i><br /><br />
183
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="chart.title.vpos"></a>
188<b>chart.title.vpos</b><br />
189            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 />
190            <a name="chart.title.color"></a>
191<b>chart.title.color</b><br />
192            The color of the title.<br /> <i>Default: black</i><br /><br />
193<a name="shadow"></a>
194<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">Shadow</h3>            <a name="chart.shadow"></a>
195<b>chart.shadow</b><br />
196            Whether a drop shadow is applied to the Funnel chart. The funnel is the first to use the canvas shadow API, and as such they won't be supported on all browsers. Currently only Safari 4+ (possibly earlier versions too), Firefox 3.5+ and Chrome 2+ support canvas shadows.<br /><i>Default: false</i><br /><br />
197            <a name="chart.shadow.color"></a>
198<b>chart.shadow.color</b><br />
199            The color of the drop shadow.<br /><i>Default: #666</i><br /><br />
200            <a name="chart.shadow.blur"></a>
201<b>chart.shadow.blur</b><br />
202            The severity of the shadow blurring effect.<br /><i>Default: 3</i><br /><br />
203            <a name="chart.shadow.offsetx"></a>
204<b>chart.shadow.offsetx</b><br />
205            The X offset of the shadow.<br /><i>Default: 3</i><br /><br />
206            <a name="chart.shadow.offsety"></a>
207<b>chart.shadow.offsety</b><br />
208            The Y offset of the shadow.<br /><i>Default: 3</i><br /><br />
209
210            <a name="interactive features"></a>
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">Interactive features</h3>
212           
213            <a name="chart.contextmenu"></a>
214            <b>chart.contextmenu</b><br />
215            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 />
216           
217            <a name="chart.tooltips"></a>
218            <b>chart.tooltips</b><br />
219            An array of tooltips for the Funnel chart segments.<br /><i>Default: null</i><br /><br />
220           
221            <a name="chart.tooltips.effect"></a>
222            <b>chart.tooltips.effect</b><br />
223            The animated effect that tooltips use - <i>fade</i> or <i>expand</i><br /><i>Default: fade</i><br /><br />
224           
225            <a name="chart.tooltips.css.class"></a>
226            <b>chart.tooltips.css.class</b><br />
227            This is the name of the CSS class the chart uses.<br /><i>Default: RGraph_tooltip</i><br /><br />
228           
229            <a name="chart.tooltips.override"></a>
230            <b>chart.tooltips.override</b><br />
231            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 />
232
233            <a name="chart.annotatable"></a>
234<b>chart.annotatable</b><br />
235            Whether annotations are enabled for the chart (ie you can draw on the chart interactively.<br /><i>Default: false</i><br /><br />
236            <a name="chart.annotate.color"></a>
237<b>chart.annotate.color</b><br />
238            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 />
239
240
241
242
243            <a name="chart.resizable"></a>
244            <b>chart.resizable</b><br />
245            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 />
246            <i>Default: false</i><br /><br />
247
248
249            <a name="chart.resize.handle.background"></a>
250            <b>chart.resize.handle.background</b><br />
251            With this you can specify the background color for the resize handle. If you're adjusting the position of the
252            handle then you may need this to make the handle stand out more.<br />
253            <i>Default: null</i><br /><br />
254
255
256            <a name="key"></a>
257            <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>
258           
259            <a name="chart.key"></a>
260            <b>chart.key</b><br />
261            An array of key information. <br />
262            <i>Default: [] (An empty array)</i><br /><br />
263
264            <a name="chart.key.background"></a>
265            <b>chart.key.background</b><br />
266            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>
267            <i>Default: white</i><br /><br />
268           
269            <a name="chart.key.halign"></a>
270            <b>chart.key.halign</b><br />
271            Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
272            aligned <i>left</i> or <i>right</i>.<br />
273            <i>Default: right</i><br /><br />
274           
275            <a name="chart.key.position"></a>
276            <b>chart.key.position</b><br />
277            Determines the position of the key.Either <b>graph</b> (default), or <b>gutter</b>.<br />
278            <i>Default: graph</i><br /><br />
279           
280            <b>chart.key.position.x</b><br />
281            This allows you to specify a specific X coordinate for the key.<br />
282            <i>Default: null</i><br /><br />
283           
284            <b>chart.key.position.y</b><br />
285            This allows you to specify a specific Y coordinate for the key.<br />
286            <i>Default: null</i><br /><br />
287           
288            <b>chart.key.position.gutter.boxed</b><br />
289            If you have the key in gutter mode (ie horizontal), this allows you to give a background color.<br />
290            <i>Default: true</i><br /><br />
291           
292            <a name="chart.key.shadow"></a>
293            <b>chart.key.shadow</b><br />
294            Whether a small drop shadow is applied to the key.<br />
295            <i>Default: false</i><br /><br />
296
297            <a name="chart.key.shadow.color"></a>
298            <b>chart.key.shadow.color</b><br />
299            The color of the shadow.<br />
300            <i>Default: #666</i><br /><br />
301
302            <a name="chart.key.shadow.blur"></a>
303            <b>chart.key.shadow.blur</b><br />
304            The extent of the blurring effect used on the shadow.<br />
305            <i>Default: 3</i><br /><br />
306
307            <a name="chart.key.shadow.offsetx"></a>
308            <b>chart.key.shadow.offsetx</b><br />
309            The X offset of the shadow.<br />
310            <i>Default: 2</i><br /><br />
311
312            <a name="chart.key.shadow.offsety"></a>
313            <b>chart.key.shadow.offsety</b><br />
314            The Y offset of the shadow.<br />
315            <i>Default: 2</i><br /><br />
316
317            <b>chart.key.rounded</b><br />
318            This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.<br />
319            <i>Default: false</i><br /><br />
320           
321            <b>chart.key.color.shape</b><br />
322            This can be <i>square</i>, <i>circle</i> or <i>line</i> and controls how the color indicators in the key appear.<br />
323            <i>Default: square</i><br /><br />
324           
325            <b>chart.key.linewidth</b><br />
326            The line width of the surrounding border on the key.<br />
327            <i>Default: 1</i><br /><br />
328           
329           
330
331<a name="zoom"></a>
332<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>
333<b>chart.zoom.mode</b><br />
334            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 />
335            <a name="chart.zoom.factor"></a>
336<b>chart.zoom.factor</b><br />
337            This is the factor that the chart will be zoomed by (bigger values means more zoom)<br /><i>Default: 1.5</i><br /><br />
338            <a name="chart.zoom.fade.in"></a>
339<b>chart.zoom.fade.in</b><br />
340            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 />
341            <a name="chart.zoom.fade.out"></a>
342<b>chart.zoom.fade.out</b><br />
343            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 />
344            <a name="chart.zoom.hdir"></a>
345<b>chart.zoom.hdir</b><br />
346            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 />
347            <a name="chart.zoom.vdir"></a>
348<b>chart.zoom.vdir</b><br />
349            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 />
350            <a name="chart.zoom.delay"></a>
351<b>chart.zoom.delay</b><br />
352            The delay (in milliseconds) between frames.<br /><i>Default: 50</i><br /><br />
353            <a name="chart.zoom.frames"></a>
354<b>chart.zoom.frames</b><br />
355            The number of frames in the zoom animation.<br /><i>Default: 10</i><br /><br />
356            <a name="chart.zoom.shadow"></a>
357<b>chart.zoom.shadow</b><br />
358            Whether or not the zoomed canvas has a shadow or not.<br /><i>Default: true</i><br /><br />
359            <a name="chart.zoom.thumbnail.width"></a>
360<b>chart.zoom.thumbnail.width</b><br />
361            When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
362            <a name="chart.zoom.thumbnail.height"></a>
363<b>chart.zoom.thumbnail.height</b><br />
364            When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
365            <a name="chart.zoom.background"></a>
366<b>chart.zoom.background</b><br />
367            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 />
368
369
370            <a name="misc"></a>
371            <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>
372
373            <a name="chart.highlight.stroke"></a>
374            <b>chart.highlight.stroke</b><br />
375            If you use tooltips, this controls the colour of the highlight stroke.<br />
376            <i>Default: black</i><br /><br />
377           
378            <a name="chart.highlight.fill"></a>
379            <b>chart.highlight.fill</b><br />
380            If you use tooltips, this controls the colour of the highlight fill.<br />
381            <i>Default: rgba(255,255,255,0.5)</i><br /><br />
382
383</div><br /><br />
384</body>
385</html>
Note: See TracBrowser for help on using the repository browser.