[77] | 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 - gantt charts</title> |
---|
| 22 | |
---|
| 23 | <meta name="keywords" content="rgraph html5 canvas example gantt charts" /> |
---|
| 24 | <meta name="description" content="RGraph: Javascript charts and graph library - Gantt charts examples" /> |
---|
| 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.gantt.js" ></script> |
---|
| 36 | <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]--> |
---|
| 37 | |
---|
| 38 | <style> |
---|
| 39 | .RGraph_tooltip { |
---|
| 40 | color: #00a ! important; |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | .RGraph_tooltip b { |
---|
| 44 | color: black ! important; |
---|
| 45 | } |
---|
| 46 | </style> |
---|
| 47 | |
---|
| 48 | <script> |
---|
| 49 | window.onload = function () |
---|
| 50 | { |
---|
| 51 | var gantt1 = new RGraph.Gantt('gantt1'); |
---|
| 52 | gantt1.Set('chart.xmax', 122); |
---|
| 53 | gantt1.Set('chart.gutter.right', 35); |
---|
| 54 | gantt1.Set('chart.labels', ['January', 'February', 'March', 'April']); |
---|
| 55 | gantt1.Set('chart.title', 'Work schedule for Xyz Ltd'); |
---|
| 56 | gantt1.Set('chart.defaultcolor', '#faa'); |
---|
| 57 | gantt1.Set('chart.background.grid', false); |
---|
| 58 | |
---|
| 59 | if (!RGraph.isIE8()) { |
---|
| 60 | gantt1.Set('chart.tooltips', ["<b>Richard Crenshaw</b><br />Working through adding something<br /> to the website.", |
---|
| 61 | "<b>Rachel Higgenbottom</b><br />Singing sweetly", |
---|
| 62 | "<b>Fred Bloggs</b><br />Building a new drive", |
---|
| 63 | "<b>Barney Rubble</b><br />Not started adding the new garden", |
---|
| 64 | "<b>Gloria Crockford</b><br />Just started dinner", |
---|
| 65 | "<b>Paul Josford</b><br />Nearly finished the front garden", |
---|
| 66 | "<b>Harry Secjom</b><br />Roughly half way through the book reading", |
---|
| 67 | "<b>Shane Ritchford</b><br />Comedian", |
---|
| 68 | "<b>Kyle Jasford</b><br />Gardening", |
---|
| 69 | "<b>Cynthia Frances</b><br />Not entirely sure what she's doing", |
---|
| 70 | "<b>Mabel Mincy</b><br />Making more lunches", |
---|
| 71 | "<b>Paul MacFord</b><br />Putting everyone off their work", |
---|
| 72 | "<b>Kiffen Longbottom</b><br />Farming Maize", |
---|
| 73 | "<b>John Blussford</b><br />A deer"]); |
---|
| 74 | gantt1.Set('chart.tooltips.effect', 'expand'); |
---|
| 75 | } |
---|
| 76 | |
---|
| 77 | gantt1.Set('chart.events', [ |
---|
| 78 | [31, 28, 67, 'Richard'], |
---|
| 79 | [0, 28, 50, 'Rachel'], |
---|
| 80 | [12, 28, 45, 'Fred'], |
---|
| 81 | [59, 14, 0, 'Barney'], |
---|
| 82 | [59, 21, 5, 'Gloria'], |
---|
| 83 | [46, 31, 92, 'Paul'], |
---|
| 84 | [80, 21, 46, 'Harry'], |
---|
| 85 | [94, 17, 84, 'Shane'], |
---|
| 86 | [34, 14, 32, 'Kyle'], |
---|
| 87 | [64, 14, 28, 'Cynthia'], |
---|
| 88 | [13, 61, 74, 'Mabel'], |
---|
| 89 | [84, 31, 16, 'Paul'], |
---|
| 90 | [100, 22, 45, 'Kiffen'], |
---|
| 91 | [0, 365, 50, 'John'] |
---|
| 92 | ]); |
---|
| 93 | var color = 'rgba(192,255,192,0.5)'; |
---|
| 94 | gantt1.Set('chart.vbars', [ |
---|
| 95 | [0, 10, color], |
---|
| 96 | [20, 10, color], |
---|
| 97 | [40, 10, color], |
---|
| 98 | [60, 10, color], |
---|
| 99 | [80, 10, color], |
---|
| 100 | [100, 10, color] |
---|
| 101 | ]); |
---|
| 102 | gantt1.Set('chart.borders', false); |
---|
| 103 | gantt1.Set('chart.title.vpos', 0.6); |
---|
| 104 | gantt1.Draw(); |
---|
| 105 | } |
---|
| 106 | </script> |
---|
| 107 | |
---|
| 108 | <script> |
---|
| 109 | var _gaq = _gaq || []; |
---|
| 110 | _gaq.push(['_setAccount', 'UA-54706-2']); |
---|
| 111 | _gaq.push(['_trackPageview']); |
---|
| 112 | |
---|
| 113 | (function() { |
---|
| 114 | var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
---|
| 115 | ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
---|
| 116 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
---|
| 117 | })(); |
---|
| 118 | </script> |
---|
| 119 | </head> |
---|
| 120 | <body> |
---|
| 121 | |
---|
| 122 | <!-- Social networking buttons --> |
---|
| 123 | <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed"> |
---|
| 124 | <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net¬es=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> |
---|
| 125 | <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> |
---|
| 126 | </div> |
---|
| 127 | |
---|
| 128 | <script> |
---|
| 129 | // Opera fix |
---|
| 130 | if (navigator.userAgent.indexOf('Opera') == -1) { |
---|
| 131 | document.getElementById("social_icons").style.position = 'fixed'; |
---|
| 132 | } |
---|
| 133 | </script> |
---|
| 134 | <!-- Social networking buttons --> |
---|
| 135 | |
---|
| 136 | |
---|
| 137 | <div id="breadcrumb"> |
---|
| 138 | <a href="../index.html">RGraph: Javascript charts and graph library</a> |
---|
| 139 | > |
---|
| 140 | <a href="./index.html">Examples</a> |
---|
| 141 | > |
---|
| 142 | Gantt charts |
---|
| 143 | </div> |
---|
| 144 | |
---|
| 145 | <h1>RGraph: <span>Javascript charts and graph library</span> - Gantt charts</h1> |
---|
| 146 | |
---|
| 147 | <script> |
---|
| 148 | if (RGraph.isIE8()) { |
---|
| 149 | 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>'); |
---|
| 150 | } |
---|
| 151 | </script> |
---|
| 152 | |
---|
| 153 | <div> |
---|
| 154 | <p> |
---|
| 155 | Gantt charts are used to show scheduling information. It is commonly used in project management but can also be used, |
---|
| 156 | for example, to show holiday schedule information. In this case it would be easy to see when someone is unavailable. |
---|
| 157 | The Gantt chart can have clickable bars that can be used to provide more detail. It can also show vertical bars |
---|
| 158 | that can be used to indicate events, or as in the cases below, can be decorative. |
---|
| 159 | </p> |
---|
| 160 | |
---|
| 161 | <p> |
---|
| 162 | The chart is made of "units", in this case 365. This represents days in a year. The labels are separate, being equally |
---|
| 163 | spaced across the chart. This means you can use more meaningful labels, which are easier to comprehend. As in the |
---|
| 164 | example charts. |
---|
| 165 | </p> |
---|
| 166 | </div> |
---|
| 167 | |
---|
| 168 | <div> |
---|
| 169 | <ul> |
---|
| 170 | <li><a href="../docs/gantt.html">Gantt chart API documentation</a></li> |
---|
| 171 | </ul> |
---|
| 172 | </div> |
---|
| 173 | |
---|
| 174 | <div style="text-align: center"> |
---|
| 175 | <canvas id="gantt1" width="900" height="300">[No canvas support]</canvas> |
---|
| 176 | </div> |
---|
| 177 | |
---|
| 178 | </body> |
---|
| 179 | </html> |
---|