source: Dev/trunk/RGraph/examples/vprogress.html @ 77

Last change on this file since 77 was 77, checked in by fpvanagthoven, 14 years ago

RGraph

File size: 8.2 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 - vertical progress bar</title>
22
23    <meta name="keywords" content="rgraph html5 canvas example vertical progress bar" />
24    <meta name="description" content="RGraph: Javascript charts and graph library - Vertical Progress Bar example" />
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.png"/>
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 src="../libraries/RGraph.common.core.js"></script>
34    <script src="../libraries/RGraph.common.tooltips.js" ></script>
35    <script src="../libraries/RGraph.vprogress.js"></script>
36    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
37
38    <script>
39        window.onload = function ()
40        {
41            var progress1 = new RGraph.VProgress('progress1', 63, 100);
42            progress1.Set('chart.tickmarks', false);
43            progress1.Set('chart.margin', 3);
44            progress1.Set('chart.tickmarks.inner', true);
45            progress1.Set('chart.label.inner', true);
46            progress1.Set('chart.gutter.left', 30);
47            progress1.Set('chart.gutter.right', 30);
48            progress1.Set('chart.units.post', '%');
49           
50            progress1.Draw();
51
52            var progress2 = new RGraph.VProgress('progress2', [6.5, 1, 2], 10);
53            progress2.Set('chart.colors', ['red', '#cfc', 'blue']);
54            progress2.Set('chart.shadow', true);
55            progress2.Set('chart.shadow.color', '#666');
56            progress2.Set('chart.shadow.offsetx', 0);
57            progress2.Set('chart.shadow.offsety', 0);
58            progress2.Set('chart.shadow.blur', 15);
59            progress2.Set('chart.margin', 3);
60            progress2.Set('chart.tooltips', ['John', 'Fred', 'Pete']);
61            progress2.Set('chart.tooltips.effect', 'contract');
62            progress2.Set('chart.tickmarks', true);
63            progress2.Set('chart.tickmarks.inner', true);
64            progress2.Set('chart.tickmarks.color', '#333');
65            progress2.Draw();
66
67            var progress3 = new RGraph.VProgress('progress3', [1.455, 13, 42], 100);
68            progress3.Set('chart.colors', ['red', '#cfc', 'blue']);
69            progress3.Set('chart.margin', 3);
70            progress3.Set('chart.tooltips', ['John', 'Fred', 'Pete']);
71            progress3.Set('chart.tooltips.effect', 'fade');
72            progress3.Set('chart.tickmarks', true);
73            progress3.Set('chart.tickmarks.inner', true);
74            progress3.Set('chart.tickmarks.color', '#333');
75            progress3.Set('chart.key', ['Richard','Fred','Bob']);
76            progress3.Set('chart.key.position.x', progress3.canvas.width - 90);
77            progress3.Set('chart.tickmarks.zerostart', true);
78            progress3.Set('chart.gutter.right', 125);
79            progress3.Set('chart.scale.decimals', 2);
80            progress3.Draw();
81        }
82    </script>
83
84    <script>
85      var _gaq = _gaq || [];
86      _gaq.push(['_setAccount', 'UA-54706-2']);
87      _gaq.push(['_trackPageview']);
88   
89      (function() {
90        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
91        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
92        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
93      })();
94    </script>
95</head>
96<body>
97
98    <!-- Social networking buttons -->
99        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
100            <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>
101            <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>
102        </div>
103
104        <script>
105            // Opera fix
106            if (navigator.userAgent.indexOf('Opera') == -1) {
107              document.getElementById("social_icons").style.position = 'fixed';
108            }
109        </script>
110    <!-- Social networking buttons -->
111
112
113<div id="breadcrumb">
114    <a href="../index.html">RGraph: Javascript charts and graph library</a>
115    >
116    <a href="./index.html">Examples</a>
117    >
118    Vertical Progress bar
119</div>
120
121    <h1>RGraph: <span>Javascript charts and graph library</span> - Vertical Progress bar</h1>
122
123    <script>
124        if (RGraph.isIE8()) {
125            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>');
126        }
127    </script>
128
129    <p>
130        This is a Progress Bar for showing state. You can show anything with it - use it to show load on your server,
131        or percentage space free on your servers disk drive. You could even incorporate it with some AJAX to retrieve status information
132        from your webserver dynamically, making the Progress Bar realtime. To redraw the progress bar simply call <i>RGraph.Clear()</i>
133        (which clears the canvas) and then call <i>myProgress.Draw()</i> again.
134    </p>
135       
136    <p>
137        The colours, title and scale are configurable, allowing you to represent a wide range of values.
138    </p>
139
140    <div>
141        <ul>
142            <li><a href="../docs/vprogress.html">Vertical Progress bar API documentation</a></li>
143            <li><a href="hprogress.html">Horizontal Progress bar</a></li>
144        </ul>
145    </div>
146
147    <div style="text-align: center">
148        <canvas width="125" height="450" id="progress1">[No canvas support]</canvas>
149        <canvas width="125" height="450" id="progress2" style="margin-left: 100px; margin-right: 100px">[No canvas support]</canvas>
150        <canvas width="210" height="450" id="progress3">[No canvas support]</canvas>
151    </div>
152
153</body>
154</html>
Note: See TracBrowser for help on using the repository browser.