From 22502eb7a498183fada4a50994fa2bb25e4bb790 Mon Sep 17 00:00:00 2001
From: Russ Handorf
Date: Sat, 13 Feb 2016 21:34:23 -0500
Subject: [PATCH 1/1] initial commit
---
README | 45 +
RGraph/LICENSE.txt | 93 +
RGraph/css/ModalDialog.css | 90 +
RGraph/css/common.css | 297 +++
RGraph/css/website.css | 253 +++
RGraph/docs/.BC.txt | 101 +
RGraph/docs/.CHANGELOG.txt | 1277 +++++++++++
RGraph/docs/adjusting.html | 244 ++
RGraph/docs/animation.html | 313 +++
RGraph/docs/annotating.html | 263 +++
RGraph/docs/api.html | 835 +++++++
RGraph/docs/async.html | 265 +++
RGraph/docs/bar.html | 603 +++++
RGraph/docs/bipolar.html | 370 ++++
RGraph/docs/color.html | 274 +++
RGraph/docs/combine.html | 481 ++++
RGraph/docs/context.html | 368 +++
RGraph/docs/css.html | 326 +++
RGraph/docs/domcontentloaded.html | 252 +++
RGraph/docs/donut.html | 168 ++
RGraph/docs/downloads | 2 +
RGraph/docs/dynamic.html | 291 +++
RGraph/docs/events.html | 303 +++
RGraph/docs/external.html | 370 ++++
RGraph/docs/funnel.html | 382 ++++
RGraph/docs/gantt.html | 455 ++++
RGraph/docs/hbar.html | 489 ++++
RGraph/docs/hprogress.html | 327 +++
RGraph/docs/index.html | 920 ++++++++
RGraph/docs/ingraph.html | 224 ++
RGraph/docs/issues.html | 248 +++
RGraph/docs/keys.html | 211 ++
RGraph/docs/led.html | 230 ++
RGraph/docs/licensing.html | 258 +++
RGraph/docs/line.html | 745 +++++++
RGraph/docs/meter.html | 344 +++
RGraph/docs/misc.html | 668 ++++++
RGraph/docs/msie.html | 306 +++
RGraph/docs/odo.html | 346 +++
RGraph/docs/pie.html | 498 +++++
RGraph/docs/png.html | 249 +++
RGraph/docs/released.txt | 416 ++++
RGraph/docs/resizing.html | 212 ++
RGraph/docs/rose.html | 442 ++++
RGraph/docs/rscatter.html | 370 ++++
RGraph/docs/scatter.html | 683 ++++++
RGraph/docs/setconfig.html | 206 ++
RGraph/docs/tooltips.html | 587 +++++
RGraph/docs/tradar.html | 398 ++++
RGraph/docs/vprogress.html | 363 +++
RGraph/docs/zoom.html | 388 ++++
RGraph/docs/zoom_thumbnail.html | 191 ++
RGraph/examples/bar.html | 333 +++
RGraph/examples/basic.html | 64 +
RGraph/examples/bipolar.html | 255 +++
RGraph/examples/donut.html | 256 +++
RGraph/examples/funnel.html | 234 ++
RGraph/examples/gantt.html | 272 +++
RGraph/examples/hbar.html | 244 ++
RGraph/examples/hprogress.html | 212 ++
RGraph/examples/index.html | 171 ++
RGraph/examples/led.html | 200 ++
RGraph/examples/line.html | 350 +++
RGraph/examples/meter.html | 233 ++
RGraph/examples/odo.html | 241 ++
RGraph/examples/pie.html | 241 ++
RGraph/examples/rose.html | 187 ++
RGraph/examples/rscatter.html | 198 ++
RGraph/examples/scatter.html | 302 +++
RGraph/examples/showcase.html | 68 +
RGraph/examples/text.html | 104 +
RGraph/examples/tradar.html | 240 ++
RGraph/examples/vprogress.html | 209 ++
RGraph/images/alex.png | Bin 0 -> 2365 bytes
RGraph/images/analogo.gif | Bin 0 -> 567 bytes
RGraph/images/analogo.png | Bin 0 -> 524 bytes
RGraph/images/atom.png | Bin 0 -> 1198 bytes
RGraph/images/bara1.gif | Bin 0 -> 39 bytes
RGraph/images/bara1.png | Bin 0 -> 117 bytes
RGraph/images/bara16.gif | Bin 0 -> 59 bytes
RGraph/images/bara16.png | Bin 0 -> 118 bytes
RGraph/images/bara2.gif | Bin 0 -> 41 bytes
RGraph/images/bara2.png | Bin 0 -> 117 bytes
RGraph/images/bara32.gif | Bin 0 -> 71 bytes
RGraph/images/bara32.png | Bin 0 -> 118 bytes
RGraph/images/bara4.gif | Bin 0 -> 45 bytes
RGraph/images/bara4.png | Bin 0 -> 117 bytes
RGraph/images/bara8.gif | Bin 0 -> 50 bytes
RGraph/images/bara8.png | Bin 0 -> 118 bytes
RGraph/images/barb1.gif | Bin 0 -> 67 bytes
RGraph/images/barb1.png | Bin 0 -> 149 bytes
RGraph/images/barb16.gif | Bin 0 -> 126 bytes
RGraph/images/barb16.png | Bin 0 -> 151 bytes
RGraph/images/barb2.gif | Bin 0 -> 76 bytes
RGraph/images/barb2.png | Bin 0 -> 149 bytes
RGraph/images/barb32.gif | Bin 0 -> 165 bytes
RGraph/images/barb32.png | Bin 0 -> 152 bytes
RGraph/images/barb4.gif | Bin 0 -> 85 bytes
RGraph/images/barb4.png | Bin 0 -> 149 bytes
RGraph/images/barb8.gif | Bin 0 -> 100 bytes
RGraph/images/barb8.png | Bin 0 -> 150 bytes
RGraph/images/barc1.gif | Bin 0 -> 68 bytes
RGraph/images/barc1.png | Bin 0 -> 159 bytes
RGraph/images/barc16.gif | Bin 0 -> 214 bytes
RGraph/images/barc16.png | Bin 0 -> 169 bytes
RGraph/images/barc2.gif | Bin 0 -> 80 bytes
RGraph/images/barc2.png | Bin 0 -> 167 bytes
RGraph/images/barc32.gif | Bin 0 -> 318 bytes
RGraph/images/barc32.png | Bin 0 -> 170 bytes
RGraph/images/barc4.gif | Bin 0 -> 102 bytes
RGraph/images/barc4.png | Bin 0 -> 167 bytes
RGraph/images/barc8.gif | Bin 0 -> 145 bytes
RGraph/images/barc8.png | Bin 0 -> 168 bytes
RGraph/images/bard1.gif | Bin 0 -> 43 bytes
RGraph/images/bard1.png | Bin 0 -> 121 bytes
RGraph/images/bard16.gif | Bin 0 -> 104 bytes
RGraph/images/bard16.png | Bin 0 -> 124 bytes
RGraph/images/bard2.gif | Bin 0 -> 48 bytes
RGraph/images/bard2.png | Bin 0 -> 122 bytes
RGraph/images/bard32.gif | Bin 0 -> 147 bytes
RGraph/images/bard32.png | Bin 0 -> 124 bytes
RGraph/images/bard4.gif | Bin 0 -> 57 bytes
RGraph/images/bard4.png | Bin 0 -> 123 bytes
RGraph/images/bard8.gif | Bin 0 -> 76 bytes
RGraph/images/bard8.png | Bin 0 -> 123 bytes
RGraph/images/bare1.gif | Bin 0 -> 71 bytes
RGraph/images/bare1.png | Bin 0 -> 162 bytes
RGraph/images/bare16.gif | Bin 0 -> 201 bytes
RGraph/images/bare16.png | Bin 0 -> 172 bytes
RGraph/images/bare2.gif | Bin 0 -> 85 bytes
RGraph/images/bare2.png | Bin 0 -> 170 bytes
RGraph/images/bare32.gif | Bin 0 -> 300 bytes
RGraph/images/bare32.png | Bin 0 -> 173 bytes
RGraph/images/bare4.gif | Bin 0 -> 105 bytes
RGraph/images/bare4.png | Bin 0 -> 170 bytes
RGraph/images/bare8.gif | Bin 0 -> 142 bytes
RGraph/images/bare8.png | Bin 0 -> 171 bytes
RGraph/images/barf1.gif | Bin 0 -> 39 bytes
RGraph/images/barf1.png | Bin 0 -> 117 bytes
RGraph/images/barf16.gif | Bin 0 -> 118 bytes
RGraph/images/barf16.png | Bin 0 -> 124 bytes
RGraph/images/barf2.gif | Bin 0 -> 49 bytes
RGraph/images/barf2.png | Bin 0 -> 122 bytes
RGraph/images/barf32.gif | Bin 0 -> 181 bytes
RGraph/images/barf32.png | Bin 0 -> 124 bytes
RGraph/images/barf4.gif | Bin 0 -> 58 bytes
RGraph/images/barf4.png | Bin 0 -> 123 bytes
RGraph/images/barf8.gif | Bin 0 -> 76 bytes
RGraph/images/barf8.png | Bin 0 -> 123 bytes
RGraph/images/barg1.gif | Bin 0 -> 93 bytes
RGraph/images/barg1.png | Bin 0 -> 164 bytes
RGraph/images/barg16.gif | Bin 0 -> 235 bytes
RGraph/images/barg16.png | Bin 0 -> 193 bytes
RGraph/images/barg2.gif | Bin 0 -> 111 bytes
RGraph/images/barg2.png | Bin 0 -> 183 bytes
RGraph/images/barg32.gif | Bin 0 -> 337 bytes
RGraph/images/barg32.png | Bin 0 -> 194 bytes
RGraph/images/barg4.gif | Bin 0 -> 132 bytes
RGraph/images/barg4.png | Bin 0 -> 192 bytes
RGraph/images/barg8.gif | Bin 0 -> 175 bytes
RGraph/images/barg8.png | Bin 0 -> 192 bytes
RGraph/images/barh1.gif | Bin 0 -> 94 bytes
RGraph/images/barh1.png | Bin 0 -> 174 bytes
RGraph/images/barh16.gif | Bin 0 -> 287 bytes
RGraph/images/barh16.png | Bin 0 -> 213 bytes
RGraph/images/barh2.gif | Bin 0 -> 114 bytes
RGraph/images/barh2.png | Bin 0 -> 202 bytes
RGraph/images/barh32.gif | Bin 0 -> 447 bytes
RGraph/images/barh32.png | Bin 0 -> 214 bytes
RGraph/images/barh4.gif | Bin 0 -> 144 bytes
RGraph/images/barh4.png | Bin 0 -> 211 bytes
RGraph/images/barh8.gif | Bin 0 -> 194 bytes
RGraph/images/barh8.png | Bin 0 -> 212 bytes
RGraph/images/bari1.gif | Bin 0 -> 68 bytes
RGraph/images/bari1.png | Bin 0 -> 146 bytes
RGraph/images/bari16.gif | Bin 0 -> 131 bytes
RGraph/images/bari16.png | Bin 0 -> 150 bytes
RGraph/images/bari2.gif | Bin 0 -> 78 bytes
RGraph/images/bari2.png | Bin 0 -> 147 bytes
RGraph/images/bari32.gif | Bin 0 -> 172 bytes
RGraph/images/bari32.png | Bin 0 -> 153 bytes
RGraph/images/bari4.gif | Bin 0 -> 88 bytes
RGraph/images/bari4.png | Bin 0 -> 148 bytes
RGraph/images/bari8.gif | Bin 0 -> 103 bytes
RGraph/images/bari8.png | Bin 0 -> 149 bytes
RGraph/images/barj1.gif | Bin 0 -> 94 bytes
RGraph/images/barj1.png | Bin 0 -> 158 bytes
RGraph/images/barj16.gif | Bin 0 -> 253 bytes
RGraph/images/barj16.png | Bin 0 -> 187 bytes
RGraph/images/barj2.gif | Bin 0 -> 115 bytes
RGraph/images/barj2.png | Bin 0 -> 176 bytes
RGraph/images/barj32.gif | Bin 0 -> 393 bytes
RGraph/images/barj32.png | Bin 0 -> 189 bytes
RGraph/images/barj4.gif | Bin 0 -> 143 bytes
RGraph/images/barj4.png | Bin 0 -> 184 bytes
RGraph/images/barj8.gif | Bin 0 -> 185 bytes
RGraph/images/barj8.png | Bin 0 -> 186 bytes
RGraph/images/bn.business.png | Bin 0 -> 4512 bytes
RGraph/images/bn.personal.png | Bin 0 -> 4979 bytes
RGraph/images/border-radius.png | Bin 0 -> 9437 bytes
RGraph/images/buy.png | Bin 0 -> 4365 bytes
RGraph/images/buzz.png | Bin 0 -> 1180 bytes
RGraph/images/chrome_logo.png | Bin 0 -> 6645 bytes
RGraph/images/coins.jpg | Bin 0 -> 1634 bytes
RGraph/images/context.png | Bin 0 -> 3569 bytes
RGraph/images/delicious.png | Bin 0 -> 1018 bytes
RGraph/images/download-beta-sml.png | Bin 0 -> 1877 bytes
RGraph/images/download-beta.png | Bin 0 -> 3689 bytes
RGraph/images/download-stable-sml.png | Bin 0 -> 2106 bytes
RGraph/images/download-stable.png | Bin 0 -> 4609 bytes
RGraph/images/download.png | Bin 0 -> 5426 bytes
RGraph/images/facebook.png | Bin 0 -> 1053 bytes
RGraph/images/favicon.ico | Bin 0 -> 3638 bytes
RGraph/images/favicon.png | Bin 0 -> 1245 bytes
RGraph/images/friendfeed.png | Bin 0 -> 1071 bytes
RGraph/images/googlegroups.png | Bin 0 -> 3191 bytes
RGraph/images/html2.gif | Bin 0 -> 231 bytes
RGraph/images/html2.png | Bin 0 -> 290 bytes
RGraph/images/icons_combined.png | Bin 0 -> 5965 bytes
RGraph/images/introspection.png | Bin 0 -> 157292 bytes
RGraph/images/logo.png | Bin 0 -> 4154 bytes
RGraph/images/merry-christmas-snowman.png | Bin 0 -> 18770 bytes
RGraph/images/png.icon.png | Bin 0 -> 1008 bytes
RGraph/images/reddit.png | Bin 0 -> 619 bytes
RGraph/images/rss.png | Bin 0 -> 657 bytes
RGraph/images/rss_big.png | Bin 0 -> 1794 bytes
RGraph/images/sq0.png | Bin 0 -> 91 bytes
RGraph/images/sq1.png | Bin 0 -> 94 bytes
RGraph/images/sq2.png | Bin 0 -> 93 bytes
RGraph/images/sq3.png | Bin 0 -> 93 bytes
RGraph/images/sq4.png | Bin 0 -> 94 bytes
RGraph/images/sq5.png | Bin 0 -> 93 bytes
RGraph/images/sq6.png | Bin 0 -> 94 bytes
RGraph/images/sq7.png | Bin 0 -> 94 bytes
RGraph/images/sq8.png | Bin 0 -> 94 bytes
RGraph/images/sq9.png | Bin 0 -> 93 bytes
RGraph/images/sqg.png | Bin 0 -> 94 bytes
RGraph/images/structure.png | Bin 0 -> 4399 bytes
RGraph/images/stumble.png | Bin 0 -> 1275 bytes
RGraph/images/twitter.png | Bin 0 -> 1163 bytes
RGraph/images/unicef.png | Bin 0 -> 8505 bytes
RGraph/index.html | 872 ++++++++
RGraph/scripts/minify | 104 +
alert_status.php | 11 +
beth.txt | 1 +
check_climate_status.php | 43 +
check_isy99i_occupancy_status.php | 71 +
check_isy99i_status.php | 57 +
check_power_status.php | 149 ++
css/ModalDialog.css | 90 +
css/common.css | 297 +++
css/website.css | 253 +++
excanvas/EXCANVAS-LICENSE.txt | 214 ++
excanvas/HTACCESS-SAMPLE | 11 +
excanvas/excanvas.compressed.js | Bin 0 -> 8660 bytes
excanvas/excanvas.original.js | 1421 ++++++++++++
groceries.html | 2 +
icons/button_Off.png | Bin 0 -> 3213 bytes
icons/button_On.png | Bin 0 -> 3479 bytes
icons/left-arrow.png | Bin 0 -> 2169 bytes
icons/light.png | Bin 0 -> 7254 bytes
icons/music.png | Bin 0 -> 7326 bytes
icons/right-arrow.png | Bin 0 -> 2184 bytes
icons/weather.png | Bin 0 -> 5739 bytes
icons/weather/Chance_Of_Showers.png | Bin 0 -> 11382 bytes
icons/weather/Clear.png | Bin 0 -> 6977 bytes
icons/weather/Cloudy.png | Bin 0 -> 9774 bytes
icons/weather/Cloudy_Period.png | Bin 0 -> 10999 bytes
icons/weather/Cloudy_With_Dizzle.png | Bin 0 -> 13328 bytes
icons/weather/Few_Flurries.png | Bin 0 -> 11627 bytes
icons/weather/Few_Flurries_Night.png | Bin 0 -> 12202 bytes
icons/weather/Few_Showers.png | Bin 0 -> 11639 bytes
icons/weather/Flurries.png | Bin 0 -> 9924 bytes
icons/weather/Fog.png | Bin 0 -> 9337 bytes
icons/weather/Folder_Extra.png | Bin 0 -> 7221 bytes
icons/weather/Freezing_Rain.png | Bin 0 -> 15657 bytes
icons/weather/Mostly_Sunny.png | Bin 0 -> 13291 bytes
icons/weather/Note_Extra.png | Bin 0 -> 12393 bytes
icons/weather/Overcast.png | Bin 0 -> 9774 bytes
icons/weather/Partly cloudy.png | Bin 0 -> 12335 bytes
icons/weather/Rain.png | Bin 0 -> 10666 bytes
icons/weather/Rain_Or_Snow.png | Bin 0 -> 11308 bytes
icons/weather/Risk_Of_Thundershowers.png | Bin 0 -> 14632 bytes
icons/weather/Snow.png | Bin 0 -> 10904 bytes
icons/weather/Sunny.png | Bin 0 -> 11150 bytes
icons/weather/Thunder_Showers.png | Bin 0 -> 14106 bytes
icons/weather/Thunderstorms.png | Bin 0 -> 12380 bytes
icons/weather/Wet_Flurries.png | Bin 0 -> 13606 bytes
icons/weather/Wet_Flurries_Night.png | Bin 0 -> 13306 bytes
images/bg.jpg | Bin 0 -> 3541 bytes
images/body-box-bottom.png | Bin 0 -> 212 bytes
images/body-box-repeatablebody.png | Bin 0 -> 135 bytes
images/body-box-top.png | Bin 0 -> 220 bytes
images/bottom-controls-off.jpg | Bin 0 -> 10342 bytes
images/bottom-controls-on.jpg | Bin 0 -> 23090 bytes
images/bottom-controls-repeatablebar.jpg | Bin 0 -> 352 bytes
images/cameras-off.png | Bin 0 -> 1096 bytes
images/cameras-on.png | Bin 0 -> 2540 bytes
images/climate-off.png | Bin 0 -> 1014 bytes
images/climate-on.png | Bin 0 -> 2172 bytes
images/groceries-off.png | Bin 0 -> 941 bytes
images/groceries-on.png | Bin 0 -> 2212 bytes
images/header-camera.png | Bin 0 -> 5265 bytes
images/header-climate.png | Bin 0 -> 3797 bytes
images/header-groceries.png | Bin 0 -> 4846 bytes
images/header-lighting.png | Bin 0 -> 9484 bytes
images/header-news.png | Bin 0 -> 3304 bytes
images/header-power.png | Bin 0 -> 3461 bytes
images/header-recipes.png | Bin 0 -> 4356 bytes
images/header-repeater.png | Bin 0 -> 197 bytes
images/header-security.png | Bin 0 -> 5659 bytes
images/header-thejukebox.png | Bin 0 -> 5892 bytes
images/header-traffic.png | Bin 0 -> 4077 bytes
images/header-weather.png | Bin 0 -> 5646 bytes
images/header.png | Bin 0 -> 9777 bytes
images/home-off.png | Bin 0 -> 1134 bytes
images/home-on.png | Bin 0 -> 2683 bytes
images/icon-barchart.png | Bin 0 -> 761 bytes
images/icon-sliders.png | Bin 0 -> 724 bytes
images/lighting-off.png | Bin 0 -> 930 bytes
images/lighting-on.png | Bin 0 -> 3744 bytes
images/music-off.png | Bin 0 -> 924 bytes
images/music-on.png | Bin 0 -> 2785 bytes
images/news-off.png | Bin 0 -> 1158 bytes
images/news-on.png | Bin 0 -> 2508 bytes
images/power-off.png | Bin 0 -> 948 bytes
images/power-on.png | Bin 0 -> 2482 bytes
images/receipes-off.png | Bin 0 -> 936 bytes
images/receipes-on.png | Bin 0 -> 2387 bytes
images/security-off.png | Bin 0 -> 1840 bytes
images/security-on.png | Bin 0 -> 3008 bytes
images/slider-off.png | Bin 0 -> 417 bytes
images/slider-on.png | Bin 0 -> 716 bytes
images/traffic-off.png | Bin 0 -> 1484 bytes
images/traffic-on.png | Bin 0 -> 3212 bytes
images/weather-off.png | Bin 0 -> 1255 bytes
images/weather-on.png | Bin 0 -> 3297 bytes
includes.php | 45 +
index.php | 466 ++++
jukebox.php | 51 +
left-arrow.html | 49 +
libraries/RGraph.bar.js | 1653 ++++++++++++++
libraries/RGraph.bipolar.js | 713 ++++++
libraries/RGraph.common.adjusting.js | 624 ++++++
libraries/RGraph.common.annotate.js | 317 +++
libraries/RGraph.common.context.js | 559 +++++
libraries/RGraph.common.core.js | 2454 +++++++++++++++++++++
libraries/RGraph.common.resizing.js | 330 +++
libraries/RGraph.common.tooltips.js | 502 +++++
libraries/RGraph.common.zoom.js | 867 ++++++++
libraries/RGraph.funnel.js | 603 +++++
libraries/RGraph.gantt.js | 467 ++++
libraries/RGraph.hbar.js | 893 ++++++++
libraries/RGraph.hprogress.js | 545 +++++
libraries/RGraph.led.js | 225 ++
libraries/RGraph.line.js | 1868 ++++++++++++++++
libraries/RGraph.meter.js | 398 ++++
libraries/RGraph.modaldialog.js | 244 ++
libraries/RGraph.odo.js | 653 ++++++
libraries/RGraph.pie.js | 705 ++++++
libraries/RGraph.rose.js | 531 +++++
libraries/RGraph.rscatter.js | 597 +++++
libraries/RGraph.scatter.js | 1168 ++++++++++
libraries/RGraph.skeleton.js | 306 +++
libraries/RGraph.tradar.js | 624 ++++++
libraries/RGraph.vprogress.js | 554 +++++
menu.html | 125 ++
middle.html | 1 +
news.html | 11 +
news.php | 47 +
other_icons/Security.jpg | Bin 0 -> 14632 bytes
other_icons/audio.jpg | Bin 0 -> 11349 bytes
other_icons/audio.png | Bin 0 -> 7326 bytes
other_icons/cameras.jpg | Bin 0 -> 10825 bytes
other_icons/cameras.png | Bin 0 -> 8379 bytes
other_icons/climate.jpg | Bin 0 -> 11250 bytes
other_icons/climate.png | Bin 0 -> 7070 bytes
other_icons/events.jpg | Bin 0 -> 11062 bytes
other_icons/events.png | Bin 0 -> 7807 bytes
other_icons/lighting.jpg | Bin 0 -> 11580 bytes
other_icons/lighting.png | Bin 0 -> 8304 bytes
other_icons/power.jpg | Bin 0 -> 11032 bytes
other_icons/power.png | Bin 0 -> 7883 bytes
other_icons/status.jpg | Bin 0 -> 10434 bytes
other_icons/status.png | Bin 0 -> 7300 bytes
pxweather.class.php | 257 +++
pxweather/LICENSE.txt | 340 +++
pxweather/README.txt | 302 +++
pxweather/pxweather.class.php | 251 +++
pxweather/xmlize-php4.inc.php | 168 ++
pxweather/xmlize-php5.inc.php | 174 ++
right-arrow.html | 46 +
rotate-weather.php | 6 +
russ.txt | 1 +
security1.html | 19 +
set_climate_status.php | 35 +
set_isy99i_status.php | 48 +
set_summon_status.php | 10 +
thermometer-blank-black.png | Bin 0 -> 1753 bytes
thermometer-blank.png | Bin 0 -> 1292 bytes
thermometer.php | 403 ++++
title_status.php | 22 +
top.html | 1 +
traffic-iframe.html | 46 +
traffic.html | 1 +
weather-footer.php | 15 +
weather-meter.php | 80 +
weather-odometer.php | 55 +
weather.php | 80 +
weather1-speed.php | 55 +
weather1-temp.php | 77 +
weather1.js | 21 +
weather1.php | 89 +
weather2.js | 5 +
weather2.php | 4 +
weather3.js | 5 +
weather3.php | 32 +
weather4.js | 5 +
weather4.php | 6 +
weather5.js | 5 +
weather5.php | 19 +
weather6.js | 5 +
weather6.php | 28 +
xml2array.php | 125 ++
xmlize-php5.inc.php | 174 ++
425 files changed, 49460 insertions(+)
create mode 100644 README
create mode 100644 RGraph/LICENSE.txt
create mode 100644 RGraph/css/ModalDialog.css
create mode 100644 RGraph/css/common.css
create mode 100644 RGraph/css/website.css
create mode 100644 RGraph/docs/.BC.txt
create mode 100644 RGraph/docs/.CHANGELOG.txt
create mode 100644 RGraph/docs/adjusting.html
create mode 100644 RGraph/docs/animation.html
create mode 100644 RGraph/docs/annotating.html
create mode 100644 RGraph/docs/api.html
create mode 100644 RGraph/docs/async.html
create mode 100644 RGraph/docs/bar.html
create mode 100644 RGraph/docs/bipolar.html
create mode 100644 RGraph/docs/color.html
create mode 100644 RGraph/docs/combine.html
create mode 100644 RGraph/docs/context.html
create mode 100644 RGraph/docs/css.html
create mode 100644 RGraph/docs/domcontentloaded.html
create mode 100644 RGraph/docs/donut.html
create mode 100644 RGraph/docs/downloads
create mode 100644 RGraph/docs/dynamic.html
create mode 100644 RGraph/docs/events.html
create mode 100644 RGraph/docs/external.html
create mode 100644 RGraph/docs/funnel.html
create mode 100644 RGraph/docs/gantt.html
create mode 100644 RGraph/docs/hbar.html
create mode 100644 RGraph/docs/hprogress.html
create mode 100644 RGraph/docs/index.html
create mode 100644 RGraph/docs/ingraph.html
create mode 100644 RGraph/docs/issues.html
create mode 100644 RGraph/docs/keys.html
create mode 100644 RGraph/docs/led.html
create mode 100644 RGraph/docs/licensing.html
create mode 100644 RGraph/docs/line.html
create mode 100644 RGraph/docs/meter.html
create mode 100644 RGraph/docs/misc.html
create mode 100644 RGraph/docs/msie.html
create mode 100644 RGraph/docs/odo.html
create mode 100644 RGraph/docs/pie.html
create mode 100644 RGraph/docs/png.html
create mode 100644 RGraph/docs/released.txt
create mode 100644 RGraph/docs/resizing.html
create mode 100644 RGraph/docs/rose.html
create mode 100644 RGraph/docs/rscatter.html
create mode 100644 RGraph/docs/scatter.html
create mode 100644 RGraph/docs/setconfig.html
create mode 100644 RGraph/docs/tooltips.html
create mode 100644 RGraph/docs/tradar.html
create mode 100644 RGraph/docs/vprogress.html
create mode 100644 RGraph/docs/zoom.html
create mode 100644 RGraph/docs/zoom_thumbnail.html
create mode 100644 RGraph/examples/bar.html
create mode 100644 RGraph/examples/basic.html
create mode 100644 RGraph/examples/bipolar.html
create mode 100644 RGraph/examples/donut.html
create mode 100644 RGraph/examples/funnel.html
create mode 100644 RGraph/examples/gantt.html
create mode 100644 RGraph/examples/hbar.html
create mode 100644 RGraph/examples/hprogress.html
create mode 100644 RGraph/examples/index.html
create mode 100644 RGraph/examples/led.html
create mode 100644 RGraph/examples/line.html
create mode 100644 RGraph/examples/meter.html
create mode 100644 RGraph/examples/odo.html
create mode 100644 RGraph/examples/pie.html
create mode 100644 RGraph/examples/rose.html
create mode 100644 RGraph/examples/rscatter.html
create mode 100644 RGraph/examples/scatter.html
create mode 100644 RGraph/examples/showcase.html
create mode 100644 RGraph/examples/text.html
create mode 100644 RGraph/examples/tradar.html
create mode 100644 RGraph/examples/vprogress.html
create mode 100644 RGraph/images/alex.png
create mode 100644 RGraph/images/analogo.gif
create mode 100644 RGraph/images/analogo.png
create mode 100644 RGraph/images/atom.png
create mode 100644 RGraph/images/bara1.gif
create mode 100644 RGraph/images/bara1.png
create mode 100644 RGraph/images/bara16.gif
create mode 100644 RGraph/images/bara16.png
create mode 100644 RGraph/images/bara2.gif
create mode 100644 RGraph/images/bara2.png
create mode 100644 RGraph/images/bara32.gif
create mode 100644 RGraph/images/bara32.png
create mode 100644 RGraph/images/bara4.gif
create mode 100644 RGraph/images/bara4.png
create mode 100644 RGraph/images/bara8.gif
create mode 100644 RGraph/images/bara8.png
create mode 100644 RGraph/images/barb1.gif
create mode 100644 RGraph/images/barb1.png
create mode 100644 RGraph/images/barb16.gif
create mode 100644 RGraph/images/barb16.png
create mode 100644 RGraph/images/barb2.gif
create mode 100644 RGraph/images/barb2.png
create mode 100644 RGraph/images/barb32.gif
create mode 100644 RGraph/images/barb32.png
create mode 100644 RGraph/images/barb4.gif
create mode 100644 RGraph/images/barb4.png
create mode 100644 RGraph/images/barb8.gif
create mode 100644 RGraph/images/barb8.png
create mode 100644 RGraph/images/barc1.gif
create mode 100644 RGraph/images/barc1.png
create mode 100644 RGraph/images/barc16.gif
create mode 100644 RGraph/images/barc16.png
create mode 100644 RGraph/images/barc2.gif
create mode 100644 RGraph/images/barc2.png
create mode 100644 RGraph/images/barc32.gif
create mode 100644 RGraph/images/barc32.png
create mode 100644 RGraph/images/barc4.gif
create mode 100644 RGraph/images/barc4.png
create mode 100644 RGraph/images/barc8.gif
create mode 100644 RGraph/images/barc8.png
create mode 100644 RGraph/images/bard1.gif
create mode 100644 RGraph/images/bard1.png
create mode 100644 RGraph/images/bard16.gif
create mode 100644 RGraph/images/bard16.png
create mode 100644 RGraph/images/bard2.gif
create mode 100644 RGraph/images/bard2.png
create mode 100644 RGraph/images/bard32.gif
create mode 100644 RGraph/images/bard32.png
create mode 100644 RGraph/images/bard4.gif
create mode 100644 RGraph/images/bard4.png
create mode 100644 RGraph/images/bard8.gif
create mode 100644 RGraph/images/bard8.png
create mode 100644 RGraph/images/bare1.gif
create mode 100644 RGraph/images/bare1.png
create mode 100644 RGraph/images/bare16.gif
create mode 100644 RGraph/images/bare16.png
create mode 100644 RGraph/images/bare2.gif
create mode 100644 RGraph/images/bare2.png
create mode 100644 RGraph/images/bare32.gif
create mode 100644 RGraph/images/bare32.png
create mode 100644 RGraph/images/bare4.gif
create mode 100644 RGraph/images/bare4.png
create mode 100644 RGraph/images/bare8.gif
create mode 100644 RGraph/images/bare8.png
create mode 100644 RGraph/images/barf1.gif
create mode 100644 RGraph/images/barf1.png
create mode 100644 RGraph/images/barf16.gif
create mode 100644 RGraph/images/barf16.png
create mode 100644 RGraph/images/barf2.gif
create mode 100644 RGraph/images/barf2.png
create mode 100644 RGraph/images/barf32.gif
create mode 100644 RGraph/images/barf32.png
create mode 100644 RGraph/images/barf4.gif
create mode 100644 RGraph/images/barf4.png
create mode 100644 RGraph/images/barf8.gif
create mode 100644 RGraph/images/barf8.png
create mode 100644 RGraph/images/barg1.gif
create mode 100644 RGraph/images/barg1.png
create mode 100644 RGraph/images/barg16.gif
create mode 100644 RGraph/images/barg16.png
create mode 100644 RGraph/images/barg2.gif
create mode 100644 RGraph/images/barg2.png
create mode 100644 RGraph/images/barg32.gif
create mode 100644 RGraph/images/barg32.png
create mode 100644 RGraph/images/barg4.gif
create mode 100644 RGraph/images/barg4.png
create mode 100644 RGraph/images/barg8.gif
create mode 100644 RGraph/images/barg8.png
create mode 100644 RGraph/images/barh1.gif
create mode 100644 RGraph/images/barh1.png
create mode 100644 RGraph/images/barh16.gif
create mode 100644 RGraph/images/barh16.png
create mode 100644 RGraph/images/barh2.gif
create mode 100644 RGraph/images/barh2.png
create mode 100644 RGraph/images/barh32.gif
create mode 100644 RGraph/images/barh32.png
create mode 100644 RGraph/images/barh4.gif
create mode 100644 RGraph/images/barh4.png
create mode 100644 RGraph/images/barh8.gif
create mode 100644 RGraph/images/barh8.png
create mode 100644 RGraph/images/bari1.gif
create mode 100644 RGraph/images/bari1.png
create mode 100644 RGraph/images/bari16.gif
create mode 100644 RGraph/images/bari16.png
create mode 100644 RGraph/images/bari2.gif
create mode 100644 RGraph/images/bari2.png
create mode 100644 RGraph/images/bari32.gif
create mode 100644 RGraph/images/bari32.png
create mode 100644 RGraph/images/bari4.gif
create mode 100644 RGraph/images/bari4.png
create mode 100644 RGraph/images/bari8.gif
create mode 100644 RGraph/images/bari8.png
create mode 100644 RGraph/images/barj1.gif
create mode 100644 RGraph/images/barj1.png
create mode 100644 RGraph/images/barj16.gif
create mode 100644 RGraph/images/barj16.png
create mode 100644 RGraph/images/barj2.gif
create mode 100644 RGraph/images/barj2.png
create mode 100644 RGraph/images/barj32.gif
create mode 100644 RGraph/images/barj32.png
create mode 100644 RGraph/images/barj4.gif
create mode 100644 RGraph/images/barj4.png
create mode 100644 RGraph/images/barj8.gif
create mode 100644 RGraph/images/barj8.png
create mode 100644 RGraph/images/bn.business.png
create mode 100644 RGraph/images/bn.personal.png
create mode 100644 RGraph/images/border-radius.png
create mode 100644 RGraph/images/buy.png
create mode 100644 RGraph/images/buzz.png
create mode 100644 RGraph/images/chrome_logo.png
create mode 100644 RGraph/images/coins.jpg
create mode 100644 RGraph/images/context.png
create mode 100644 RGraph/images/delicious.png
create mode 100644 RGraph/images/download-beta-sml.png
create mode 100644 RGraph/images/download-beta.png
create mode 100644 RGraph/images/download-stable-sml.png
create mode 100644 RGraph/images/download-stable.png
create mode 100644 RGraph/images/download.png
create mode 100644 RGraph/images/facebook.png
create mode 100644 RGraph/images/favicon.ico
create mode 100644 RGraph/images/favicon.png
create mode 100644 RGraph/images/friendfeed.png
create mode 100644 RGraph/images/googlegroups.png
create mode 100644 RGraph/images/html2.gif
create mode 100644 RGraph/images/html2.png
create mode 100644 RGraph/images/icons_combined.png
create mode 100644 RGraph/images/introspection.png
create mode 100644 RGraph/images/logo.png
create mode 100644 RGraph/images/merry-christmas-snowman.png
create mode 100644 RGraph/images/png.icon.png
create mode 100644 RGraph/images/reddit.png
create mode 100644 RGraph/images/rss.png
create mode 100644 RGraph/images/rss_big.png
create mode 100644 RGraph/images/sq0.png
create mode 100644 RGraph/images/sq1.png
create mode 100644 RGraph/images/sq2.png
create mode 100644 RGraph/images/sq3.png
create mode 100644 RGraph/images/sq4.png
create mode 100644 RGraph/images/sq5.png
create mode 100644 RGraph/images/sq6.png
create mode 100644 RGraph/images/sq7.png
create mode 100644 RGraph/images/sq8.png
create mode 100644 RGraph/images/sq9.png
create mode 100644 RGraph/images/sqg.png
create mode 100644 RGraph/images/structure.png
create mode 100644 RGraph/images/stumble.png
create mode 100644 RGraph/images/twitter.png
create mode 100644 RGraph/images/unicef.png
create mode 100644 RGraph/index.html
create mode 100644 RGraph/scripts/minify
create mode 100644 alert_status.php
create mode 100644 beth.txt
create mode 100644 check_climate_status.php
create mode 100644 check_isy99i_occupancy_status.php
create mode 100644 check_isy99i_status.php
create mode 100644 check_power_status.php
create mode 100644 css/ModalDialog.css
create mode 100644 css/common.css
create mode 100644 css/website.css
create mode 100644 excanvas/EXCANVAS-LICENSE.txt
create mode 100644 excanvas/HTACCESS-SAMPLE
create mode 100644 excanvas/excanvas.compressed.js
create mode 100644 excanvas/excanvas.original.js
create mode 100644 groceries.html
create mode 100644 icons/button_Off.png
create mode 100644 icons/button_On.png
create mode 100644 icons/left-arrow.png
create mode 100644 icons/light.png
create mode 100644 icons/music.png
create mode 100644 icons/right-arrow.png
create mode 100644 icons/weather.png
create mode 100644 icons/weather/Chance_Of_Showers.png
create mode 100644 icons/weather/Clear.png
create mode 100644 icons/weather/Cloudy.png
create mode 100644 icons/weather/Cloudy_Period.png
create mode 100644 icons/weather/Cloudy_With_Dizzle.png
create mode 100644 icons/weather/Few_Flurries.png
create mode 100644 icons/weather/Few_Flurries_Night.png
create mode 100644 icons/weather/Few_Showers.png
create mode 100644 icons/weather/Flurries.png
create mode 100644 icons/weather/Fog.png
create mode 100644 icons/weather/Folder_Extra.png
create mode 100644 icons/weather/Freezing_Rain.png
create mode 100644 icons/weather/Mostly_Sunny.png
create mode 100644 icons/weather/Note_Extra.png
create mode 100644 icons/weather/Overcast.png
create mode 100644 icons/weather/Partly cloudy.png
create mode 100644 icons/weather/Rain.png
create mode 100644 icons/weather/Rain_Or_Snow.png
create mode 100644 icons/weather/Risk_Of_Thundershowers.png
create mode 100644 icons/weather/Snow.png
create mode 100644 icons/weather/Sunny.png
create mode 100644 icons/weather/Thunder_Showers.png
create mode 100644 icons/weather/Thunderstorms.png
create mode 100644 icons/weather/Wet_Flurries.png
create mode 100644 icons/weather/Wet_Flurries_Night.png
create mode 100755 images/bg.jpg
create mode 100755 images/body-box-bottom.png
create mode 100755 images/body-box-repeatablebody.png
create mode 100755 images/body-box-top.png
create mode 100755 images/bottom-controls-off.jpg
create mode 100755 images/bottom-controls-on.jpg
create mode 100755 images/bottom-controls-repeatablebar.jpg
create mode 100644 images/cameras-off.png
create mode 100644 images/cameras-on.png
create mode 100644 images/climate-off.png
create mode 100644 images/climate-on.png
create mode 100644 images/groceries-off.png
create mode 100644 images/groceries-on.png
create mode 100755 images/header-camera.png
create mode 100755 images/header-climate.png
create mode 100755 images/header-groceries.png
create mode 100755 images/header-lighting.png
create mode 100755 images/header-news.png
create mode 100755 images/header-power.png
create mode 100755 images/header-recipes.png
create mode 100755 images/header-repeater.png
create mode 100755 images/header-security.png
create mode 100755 images/header-thejukebox.png
create mode 100755 images/header-traffic.png
create mode 100755 images/header-weather.png
create mode 100755 images/header.png
create mode 100644 images/home-off.png
create mode 100644 images/home-on.png
create mode 100755 images/icon-barchart.png
create mode 100755 images/icon-sliders.png
create mode 100644 images/lighting-off.png
create mode 100644 images/lighting-on.png
create mode 100644 images/music-off.png
create mode 100644 images/music-on.png
create mode 100644 images/news-off.png
create mode 100644 images/news-on.png
create mode 100644 images/power-off.png
create mode 100644 images/power-on.png
create mode 100644 images/receipes-off.png
create mode 100644 images/receipes-on.png
create mode 100644 images/security-off.png
create mode 100644 images/security-on.png
create mode 100755 images/slider-off.png
create mode 100755 images/slider-on.png
create mode 100644 images/traffic-off.png
create mode 100644 images/traffic-on.png
create mode 100644 images/weather-off.png
create mode 100644 images/weather-on.png
create mode 100644 includes.php
create mode 100644 index.php
create mode 100644 jukebox.php
create mode 100644 left-arrow.html
create mode 100644 libraries/RGraph.bar.js
create mode 100644 libraries/RGraph.bipolar.js
create mode 100644 libraries/RGraph.common.adjusting.js
create mode 100644 libraries/RGraph.common.annotate.js
create mode 100644 libraries/RGraph.common.context.js
create mode 100644 libraries/RGraph.common.core.js
create mode 100644 libraries/RGraph.common.resizing.js
create mode 100644 libraries/RGraph.common.tooltips.js
create mode 100644 libraries/RGraph.common.zoom.js
create mode 100644 libraries/RGraph.funnel.js
create mode 100644 libraries/RGraph.gantt.js
create mode 100644 libraries/RGraph.hbar.js
create mode 100644 libraries/RGraph.hprogress.js
create mode 100644 libraries/RGraph.led.js
create mode 100644 libraries/RGraph.line.js
create mode 100644 libraries/RGraph.meter.js
create mode 100644 libraries/RGraph.modaldialog.js
create mode 100644 libraries/RGraph.odo.js
create mode 100644 libraries/RGraph.pie.js
create mode 100644 libraries/RGraph.rose.js
create mode 100644 libraries/RGraph.rscatter.js
create mode 100644 libraries/RGraph.scatter.js
create mode 100644 libraries/RGraph.skeleton.js
create mode 100644 libraries/RGraph.tradar.js
create mode 100644 libraries/RGraph.vprogress.js
create mode 100644 menu.html
create mode 100644 middle.html
create mode 100644 news.html
create mode 100644 news.php
create mode 100644 other_icons/Security.jpg
create mode 100644 other_icons/audio.jpg
create mode 100644 other_icons/audio.png
create mode 100644 other_icons/cameras.jpg
create mode 100644 other_icons/cameras.png
create mode 100644 other_icons/climate.jpg
create mode 100644 other_icons/climate.png
create mode 100644 other_icons/events.jpg
create mode 100644 other_icons/events.png
create mode 100644 other_icons/lighting.jpg
create mode 100644 other_icons/lighting.png
create mode 100644 other_icons/power.jpg
create mode 100644 other_icons/power.png
create mode 100644 other_icons/status.jpg
create mode 100644 other_icons/status.png
create mode 100644 pxweather.class.php
create mode 100755 pxweather/LICENSE.txt
create mode 100755 pxweather/README.txt
create mode 100755 pxweather/pxweather.class.php
create mode 100755 pxweather/xmlize-php4.inc.php
create mode 100755 pxweather/xmlize-php5.inc.php
create mode 100644 right-arrow.html
create mode 100644 rotate-weather.php
create mode 100644 russ.txt
create mode 100644 security1.html
create mode 100644 set_climate_status.php
create mode 100644 set_isy99i_status.php
create mode 100644 set_summon_status.php
create mode 100644 thermometer-blank-black.png
create mode 100644 thermometer-blank.png
create mode 100644 thermometer.php
create mode 100644 title_status.php
create mode 100644 top.html
create mode 100644 traffic-iframe.html
create mode 100644 traffic.html
create mode 100644 weather-footer.php
create mode 100644 weather-meter.php
create mode 100644 weather-odometer.php
create mode 100644 weather.php
create mode 100644 weather1-speed.php
create mode 100644 weather1-temp.php
create mode 100644 weather1.js
create mode 100644 weather1.php
create mode 100644 weather2.js
create mode 100644 weather2.php
create mode 100644 weather3.js
create mode 100644 weather3.php
create mode 100644 weather4.js
create mode 100644 weather4.php
create mode 100644 weather5.js
create mode 100644 weather5.php
create mode 100644 weather6.js
create mode 100644 weather6.php
create mode 100644 xml2array.php
create mode 100644 xmlize-php5.inc.php
diff --git a/README b/README
new file mode 100644
index 0000000..6a24292
--- /dev/null
+++ b/README
@@ -0,0 +1,45 @@
+###############################################################################
+# The MIT License (MIT)
+# Copyright (c) Russell Handorf
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
+###############################################################################
+
+I've been building a home automation solution over the years. The code within is built to help manage these systems.
+
+The graphics were generated by Mike Anthony at http://www.mejadesign.com/. They are to be included for this project.
+
+Hardware:
+-Insteon
+-Elk M1 Gold
+-TED - The Energy Detector
+
+Software:
+-Zoneminder
+-Asterisk
+-Wview
+
+I'm leaving out some code for now for you to edit for your own source. Once I lock up mine, I'll upload it; some stuff is just very specific. I've set some account defaults for you, specifically admin/admin in the ISY and zoneminder. There isnt a central config yet... yet.
+
+Edit your /etc/hosts to be
+[IP] isy99
+[IP] zoneminder
+[IP] TED
+[IP] weather
diff --git a/RGraph/LICENSE.txt b/RGraph/LICENSE.txt
new file mode 100644
index 0000000..2a4bc6f
--- /dev/null
+++ b/RGraph/LICENSE.txt
@@ -0,0 +1,93 @@
+THE RGRAPH LICENSE VERSION 1.5.4
+
+Everyone is permitted to copy and distribute this license document.
+
+This license applies to any software originating from the www.rgraph.net website.
+Such software is herein referred to as the Software. This license covers
+modification and distribution of the Software, use of third-party application
+programs based on the Software, and development of software which uses the
+Software. Note that ExCanvas is covered by the Apache license.
+
+
+SUMMARY
+
+
+A summary of the license is that non-commercial use of the Software is free,
+whilst for commercial use there is a one-time fee of £49 (GBP).
+
+
+
+GRANTED RIGHTS
+
+
+1. You are granted the non-exclusive rights set forth in this license
+ provided you agree to and comply with any and all conditions in
+ this license. Whole or partial distribution of the Software,
+ signifies acceptance of this license.
+
+
+2. You may copy and distribute the Software in unmodified form
+ provided that the entire package, including - but not restricted to
+ - copyright, trademark notices and disclaimers, as released by the
+ initial developer of the Software, is distributed. See clause (3)
+ regarding the inclusion of this license document with your software.
+
+
+3. You may develop application programs, reusable components and other
+ software items that use the original or modified versions of the
+ Software. You may distribute these programs or components as long
+ as this license is distributed along with the Software. If you have
+ purchased an RGraph license you do not need to include this license
+ document with your software.
+
+
+4. For commercial use you are required to buy a license from the copyright
+ holder. A commercial license permits you to use any code you wish that
+ originated from the RGraph website (www.rgraph.net) and also the
+ PHPGuru website (www.phpguru.org). This license is £49 (UK pounds).
+ Commercial use incorporates applications, websites (regardless of
+ whether they sell products or services or simply promote them),
+ intranets and use in offline materials.
+
+
+5. Non-commercial use (eg personal, charity and educational) is permitted.
+ Please link back to the RGraph website. Example code as follows:
+
+
+ RGraph: HTML5 canvas graph library
+
+
+ Alternatively, if you don't wish to link to the RGraph website, you can
+ buy an RGraph license and you won't need to.
+
+
+LIMITATIONS OF LIABILITY
+
+In no event shall the initial developers or copyright holders be
+liable for any damages whatsoever, including - but not restricted to
+- lost revenue or profits or other direct, indirect, special,
+incidental or consequential damages, even if they have been advised
+of the possibility of such damages, except to the extent invariable
+law, if any, provides otherwise.
+
+
+NO WARRANTY
+
+The Software and this license document are provided AS IS with NO
+WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN,
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+CHOICE OF LAW
+
+This license is governed by the Laws of England. Disputes shall be
+settled by Chelmsford town court.
+
+
+QUESTIONS
+
+Any questions or queries about this license or its extent should
+be directed to licensing@rgraph.net
+
+
+
diff --git a/RGraph/css/ModalDialog.css b/RGraph/css/ModalDialog.css
new file mode 100644
index 0000000..c9c339c
--- /dev/null
+++ b/RGraph/css/ModalDialog.css
@@ -0,0 +1,90 @@
+ /**
+ * o------------------------------------------------------------------------------o
+ * | This file is part of the RGraph package - you can learn more at: |
+ * | |
+ * | http://www.rgraph.net |
+ * | |
+ * | This package is licensed under the RGraph license. For all kinds of business |
+ * | purposes there is a small one-time licensing fee to pay and for non |
+ * | commercial purposes it is free to use. You can read the full license here: |
+ * | |
+ * | http://www.rgraph.net/LICENSE.txt |
+ * o------------------------------------------------------------------------------o
+ */
+
+
+ /**
+ * Modal Dialog
+ */
+ .modalBg {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ filter: Alpha(Opacity=50);
+ -moz-opacity: 0.5;
+ background-color: #ddd;
+ visibility: hidden;
+ width: expression(document.body.clientWidth);
+ height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight);
+ z-index: 100;
+ }
+
+ .modalDialog {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ visibility: hidden;
+ z-index: 101;
+ background-color: white;
+ top: expression(document.body.clientHeight / 2 - this.offsetHeight / 2);
+ left: expression(document.body.clientWidth / 2 - this.offsetWidth / 2);
+ border: 1px solid #777;
+ border-top: 0;
+ padding: 20px;
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ }
+
+ .modalDialog .modalDialogHeader {
+ margin:0;
+ padding: 0px;
+ color: #333;
+ font-weight: bold;
+ background-color: #ccc;
+ border: 1px solid #989898;
+ position: absolute;
+ top: 0px;
+ left: -1px;
+ height: 7px;
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ -moz-border-radius-bottomleft: 0;
+ -moz-border-radius-bottomright: 0;
+ -webkit-border-bottom-left-radius: 0;
+ -webkit-border-bottom-right-radius: 0;
+ }
+
+ .modalShadow {
+ position: absolute;
+ background-color: black;
+ top: 0px;
+ left: 0px;
+ z-index: 99;
+ top: expression(document.body.clientHeight / 2 - this.offsetHeight / 2);
+ left: expression(document.body.clientWidth / 2 - this.offsetWidth / 2);
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ opacity: 0.5;
+ }
+
+ /**
+ * This is not part of the core Modal Dialog styles, instead it's just so that the dialog looks
+ * respectable.
+ */
+ h4 {
+ font-family: Verdana, Arial;
+ padding-top: 10px;
+ }
\ No newline at end of file
diff --git a/RGraph/css/common.css b/RGraph/css/common.css
new file mode 100644
index 0000000..cb2b287
--- /dev/null
+++ b/RGraph/css/common.css
@@ -0,0 +1,297 @@
+@font-face {
+ font-family: Delicious;
+ src: url('/Delicious-Roman.otf')
+}
+
+/**
+* Various
+*/
+body {
+ margin: 0px;
+}
+
+a {
+ text-decoration: none;
+}
+
+code {
+ background-color: #dedede;
+ border: 1px dashed #aaaaaa;
+ padding: 3px;
+ display: block;
+ font-family: Monospace;
+}
+
+
+/**
+* Datagrid stuff
+*/
+table.datagrid {
+ border-collapse: collapse;
+ margin-left: 30px;
+}
+
+table.datagrid th {
+ background-color: #ccc;
+ border: 1px solid #aaa;
+ padding: 2px;
+}
+
+table.datagrid tr {
+ background-color: #ddd;
+}
+
+table.datagrid tr.oddrow {
+ background-color: #eee;
+}
+
+table.datagrid td {
+ border: 1px solid #aaa;
+ padding: 3px;
+}
+
+
+/**
+* Master div
+*/
+.master {
+ font-family: Georgia;
+}
+
+
+/**
+* Header section
+*/
+.header {
+ margin-right: 10px;
+ letter-spacing: 2px;
+ background-image: url(/images/hdrbg.jpg);
+ margin-left: 10px;
+}
+
+.header h1 {
+ margin-top: 0px;
+}
+
+.tagline {
+ font-size: 8pt;
+ position: relative;
+ top: -15px;
+ left: 15px;
+ letter-spacing: 0px;
+}
+
+
+/**
+* Top nav
+*/
+.topnav {
+ color: white;
+ background-color: #314657; /* Old */
+ background-color: #2D4B33;
+ padding: 1px;
+ padding-left: 10px;
+}
+
+.topnav a {
+ color: white;
+}
+
+
+/**
+* Left nav
+*/
+.leftnav,
+.searchbox {
+ width: 180px;
+ color: black;
+ background-color: #FF5A18;
+ margin-left: 5px;
+ margin-top: 10px;
+ padding: 10px;
+ padding-top: 0;
+ padding-bottom: 0;
+ padding: expression('10px');
+ border: 1px solid #B33E11;
+}
+
+.leftnav {
+ box-shadow: 3px 3px 3px #aaa;
+ border-radius: 5px;
+ -moz-box-shadow: 3px 3px 3px #aaa;
+ -webkit-box-shadow: 3px 3px 3px #aaa;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ width: 180px;
+ float: left;
+ hmargin: 5px;
+}
+
+.leftnav h4 {
+ border-bottom: 1px solid black;
+}
+.leftnav a {
+ color: black;
+}
+
+.leftnav ul {
+ margin-left: -20px;
+ margin-left: expression('20px');
+ list-style-type: square;
+}
+
+
+/**
+* Main body section
+*/
+.mainbody {
+ margin-left: 220px;
+}
+
+.borderedTable table {
+ border-collapse: collapse;
+}
+
+.borderedTable th {
+ background-color: #dddddd;
+ border: 1px solid #aaaaaa;
+ font-size: 70%;
+ padding-left: 3px;
+ padding-right: 3px;
+}
+
+.borderedTable td {
+ vertical-align: top;
+ font-size: 70%;
+ border: 1px solid #dddddd;
+}
+
+.newsitem {
+ margin-bottom: 25px;
+}
+
+.newsitem h2,
+.newsitem h1 {
+ display: inline;
+}
+
+.newsitem .date {
+ font-size: 70%;
+}
+
+p.firstLetter:first-letter {
+ font-size: 200%;
+ font-style: italic;
+ font-weight: bold;
+ float: left;
+ padding-right: 3px;
+}
+
+.newsitem p.update {
+ background-color: #efefef;
+ border: 1px dashed black;
+ padding: 5px;
+}
+
+
+/**
+* Comments
+*/
+.comment {
+ padding: 5px;
+ margin-bottom: 20px;
+ font-size: 80%;
+ background-color: #efefef;
+ border: 1px dashed #cccccc;
+}
+
+.comment .body {
+ margin-top: 5px;
+ padding-left: 7px;
+}
+
+.comment .quoteLink {
+ text-align: right;
+ font-size: 90%;
+}
+
+
+/**
+* Errors
+*/
+.error {
+ color: red;
+ font-style: italic;
+}
+
+
+/**
+* Copyright text
+*/
+.copyright {
+ text-align: right;
+ font-size: 75%;
+}
+
+
+/**
+* Admin page
+*/
+.adminPage table {
+ font-family: Verdana;
+ font-size: 10pt;
+}
+
+.adminPage th {
+ background-color: #dddddd;
+}
+
+
+/**
+* Tools page
+*/
+#toolsPage th,
+#toolsPage td {
+}
+
+#toolsPage th {
+ font-weight: bold;
+ text-align: right;
+ white-space: nowrap;
+ vertical-align: top;
+ background-color: #ffffcc;
+}
+
+#toolsPage textarea {
+ height: 200px;
+ width: 800px;
+ filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#ffffff, endColorstr=#ffffcc);
+}
+
+#shortcuts th {
+
+}
+
+#shortcuts th {
+ text-align: left;
+ background-color: #ededed;
+ padding: 2px;
+}
+
+/**
+* Download header/footer
+*/
+div#download pre,
+div#download pre a {
+
+}
+
+/**
+* Code
+*/
+div.boxout,
+pre.code {
+ border: 2px dashed gray;
+ padding: 3px;
+ background-color: #eee;
+}
\ No newline at end of file
diff --git a/RGraph/css/website.css b/RGraph/css/website.css
new file mode 100644
index 0000000..827b5fb
--- /dev/null
+++ b/RGraph/css/website.css
@@ -0,0 +1,253 @@
+ /**
+ * o------------------------------------------------------------------------------o
+ * | This file is part of the RGraph package - you can learn more at: |
+ * | |
+ * | http://www.rgraph.net |
+ * | |
+ * | This package is licensed under the RGraph license. For all kinds of business |
+ * | purposes there is a small one-time licensing fee to pay and for non |
+ * | purposes there is a small one-time licensing fee to pay and for non |
+ * | commercial purposes it is free to use. You can read the full license here: |
+ * | |
+ * | http://www.rgraph.net/LICENSE.txt |
+ * o------------------------------------------------------------------------------o
+ */
+
+
+body {
+ padding-top: 10px;
+ font-family: Georgia, Arial, Sans-Serif;
+}
+
+pre#code,
+code {
+ display: block;
+ border: 1px solid #aaa;
+ padding: 5px;
+ background-color: #ddd;
+}
+
+#breadcrumb,
+#logo {
+ border: 2px black solid;
+ background-color: #eee;
+ padding: 3px;
+ top: 0;
+ right: 0;
+ position: absolute;
+ margin: 2px;
+ opacity: 0.8;
+}
+#breadcrumb a,
+#logo a {
+ text-decoration: none;
+}
+
+th {
+ text-align: left;
+ border: 1px solid gray;
+ background-color: #ddd;
+ padding: 3px;
+ vertical-align: top;
+}
+
+td {
+ vertical-align: top;
+}
+
+ol li {
+ margin-top: 20px;
+}
+
+ol#implementation li code {
+ margin-top: 5px;
+}
+
+td.description {
+ background-color: #eee;
+ padding: 3px;
+ border: 1px solid #ddd;
+}
+
+td.chart {
+ text-align: center;
+}
+
+.example_boxout {
+ background-color: #eee;
+ padding: 3px;
+ border: 1px solid #aaa;
+}
+
+.code {
+ padding: 5px;
+ background-color: #eee;
+ border: 2px dashed gray
+}
+
+/**
+* This is semi-transparent box in the top left corner
+*/
+div#devtag {
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+ -webkit-box-shadow: #999 3px 3px 3px;
+ -moz-box-shadow: #999 3px 3px 3px;
+ box-shadow: #999 3px 3px 3px;
+ filter: progid:DXImageTransform.Microsoft.Shadow(color=#666666,direction=135);
+ position: fixed;
+ top: 2px;
+ right: 2px;
+ width: 145px;
+ border: 2px solid black;
+ text-align: center;
+ font-weight: bold;
+ font-family: Arial;
+ background-color: #fdd;
+}
+
+div#devtag a {
+ font-size: 10px;
+ text-decoration: none;
+ color: blue;
+ opacity: 1;
+}
+
+/**
+* This overrides something defined earlier
+*/
+ol#colors li {
+ margin: 0;
+}
+
+/**
+* styles lists
+*/
+div.list-item {
+ width: 220px;
+ display: inline-block;
+}
+
+div.list-item.label {
+ width: 170px;
+}
+
+legend {
+ background-color: #efefef;
+ border: 1px solid #75736e;
+}
+
+body#licensing span {
+ font-size: 120%;
+}
+
+/**
+* The yellow warning box on the front page
+*/
+div.warning {
+ border: 1px solid black;
+ text-align: center;
+ background-color: #ffa;
+ padding: 5px;
+ margin-top: 5px;
+ border-radius: 15px;
+ -moz-border-radius: 15px;
+ -webkit-border-radius: 15px;
+ -webkit-box-shadow: #aaa 1px 1px 15px;
+ -moz-box-shadow: #aaa 1px 1px 15px;
+ box-shadow: #aaa 1px 1px 15px;
+ filter: progid:DXImageTransform.Microsoft.Shadow(color=#666666,direction=135);
+ z-index: 98;
+}
+
+div.canvasfallback {
+ border: 2px dashed red;
+ background-color: #fee;
+ width: 475px;
+ height: 150px;
+ text-align: center;
+ padding-top: 50px;
+}
+
+/**
+* The title "bar"
+*/
+div#title {
+}
+
+div#title div#image {
+ float: left;
+ margin-right: 15px;
+}
+
+div#title div#text {
+ padding-top: 5px;
+ margin-left: 70px;
+}
+
+
+div.warning p {
+ text-align: center;
+ margin-top: 5px;
+ margin-bottom: 5px;
+ font-weight: bold;
+}
+
+
+div.description {
+ border: 1px dashed gray;
+ background-color: #eee;
+ font-size: 75%;
+ padding: 3px;
+}
+
+div#social {
+ display: inline;
+ display: inline-block;
+}
+
+
+/***************************************************************************************
+* *
+* RGraph CSS classes. *
+* *
+* These allow you to customise how tooltips and context menus will appear. To override *
+* the CSS defined in the graph scripts, you may need to use " ! important" like so: *
+* *
+* font-weight: bold ! important *
+* *
+* You don't always need to use this, only if you're trying to override something which *
+* the script sets. *
+* *
+***************************************************************************************/
+
+.RGraph_png {
+}
+
+.RGraph_tooltip {
+}
+
+.RGraph_contextmenu {
+}
+
+.RGraph_contextmenu_background {
+}
+
+.RGraph_contextmenu_item {
+}
+
+.RGraph_zoom_window {
+}
+
+.RGraph_zoomed_canvas {
+}
+
+.ModalDialog_background {
+}
+
+.ModalDialog_dialog {
+}
+
+.ModalDialog_topbar {
+}
\ No newline at end of file
diff --git a/RGraph/docs/.BC.txt b/RGraph/docs/.BC.txt
new file mode 100644
index 0000000..ede1913
--- /dev/null
+++ b/RGraph/docs/.BC.txt
@@ -0,0 +1,101 @@
+
+ Backwards compatibility breaks and advisories
+ ===============================================
+
+ +---------------------------------------------------------------------------------------+
+ o [24-12-2010] | Stable release |
+ +---------------------------------------------------------------------------------------+
+
+ o [04-12-2010] chart.key.vpos is now silently converted to chart.key.position.y (note that these two properies behave slightly
+ differently - chart.key.position.y is an absolute coordinate). ALSO; the key has been rewritten, so check that
+ your graphs are working as you expect
+ o [04-12-2010] The HBar labels (from chart.labels.above) now have an extra property (chart.labels.above.decimals) which controls
+ how many decimals are shown. This defaults to 0, and as a result you may need to set this if you're expecting decimals.
+
+ +---------------------------------------------------------------------------------------+
+ o [27-11-2010] | Stable release |
+ +---------------------------------------------------------------------------------------+
+
+ o [20-11-2010] For the line/bar/scatter, when the X axis is at the bottom and there is a background bar with a
+ negative start (or it results in a negative end value), you now get a warning.
+ o [13-11-2010] All line chart labels are now shown, regardless of how many points on the line there are.
+ o [06-11-2010] The HBar and Scatter have had their scaled handling changed slightly - now if you specify a maximum Y value,
+ that is what is used.
+ o [06-11-2010] The API function RGraph.getSCale(max, obj) now takes two arguments - the maximum value and the graph object.
+
+ +---------------------------------------------------------------------------------------+
+ o [30-10-2010] | Stable release |
+ +---------------------------------------------------------------------------------------+
+
+ o [30-10-2010] The Scatter chart can now only have 1/3/5 labels
+ o [30-10-2010] The Line chart can now only have 1/3/5 labels
+ o [23-10-2010] The Bar chart can now only have 1/3/5/10 labels
+ o [23-10-2010] The default for chart.scale.decimals has changed, as such you may need to specify this:
+ myScatter.Set('chart.scale.decimals', 0);
+ o [09-10-2010] Scatter chart ticksize has changed behaviour slightly, you therefore may need to alter it slightly.
+
+ +---------------------------------------------------------------------------------------+
+ o [25-09-2010] | Stable release |
+ +---------------------------------------------------------------------------------------+
+
+ o [18-09-2010] For IE9 compatibility purposes, the IE8 DirectX shadow has been removed from the ModalDialog. This only affects
+ MSIE8. The background is still semi-opaque.
+ o [18-09-2010] The common function RGraph.isIE9() has changed to RGraph.isIE9up(). The old one will continue to work, but
+ not indefinitely.
+ o [11-09-2010] The Odometer properties chart.units.pre and chart.units.post have now changed to chart.value.units.pre
+ and chart.value.units.post. The properties chart.units.post and chart.units.pre are now used for the main
+ labels.
+ o [04-09-2010] HBar and Pie charts have been moved to DOM2 event registration for tooltips
+ o [04-09-2010] The RGraph.number_format() function has had its argument list changed
+ o [04-09-2010] Now that RGraph is moving to DOM2 event handlers, tooltips will be incompatible with IE8
+
+ +---------------------------------------------------------------------------------------+
+ o [28-08-2010] | Stable release |
+ +---------------------------------------------------------------------------------------+
+
+ o [28-08-2010] Removed option to have the labels on the outside of a Meter. Now they're always on the inside of the Meter
+ and there's always 11 of them (including zero)
+ o [14-08-2010] Changed the HBar property chart.strokecolor to chart.strokestyle
+ o [07-08-2010] The Odometer property chart.needle.thickness has been changed to chart.needle.width. Work has been done on the
+ needle head.
+ o [07-08-2010] Progress bar has now been split into two different graph types:
+ o HProgress
+ o VProgress
+ o [07-08-2010] Progress bar property chart.color is now chart.colors, and should be an array
+ o [07-08-2010] Changed default Bipolar colors to just one - green
+
+ +---------------------------------------------------------------------------------------+
+ o [31-07-2010] | Stable release |
+ +---------------------------------------------------------------------------------------+
+
+ o [17-07-2010] Stepped line charts and their tickmarks have been marginally altered. No final tickmark is now shown (it looks
+ odd being isolated)
+ o [17-07-2010] Changed the Odo chart.needle.style to chart.needle.color
+ o [17-07-2010] The Odo properties chart.start, chart.end and chart.value have all been changed to internal properties:
+ obj.start, obj.end and obj.value
+ o [09-07-2010] With the Odometer the old property chart.needle.style has been renamed to be chart.needle.color
+ o [09-07-2010] The Progress bar has had it's properties chart.max and chart.value changed to class properties, this means
+ that if you want to make use of these, you will now need to use myProgress.value and myProgress.max.
+ myProgress being the name of your graph object.
+
+ +---------------------------------------------------------------------------------------+
+ o [26-06-2010] | Stable release |
+ +---------------------------------------------------------------------------------------+
+
+ o [08-05-2010] The Rose charts "chart.labels" property is now different to the "chart.key" property
+ o [01-05-2010] The Donut chart is now a variant of the Pie chart (chart.variant = donut)
+ o [24-04-2010] The radar chart has been renamed to Rose. The library is now called RGraph.rose.js and the constructor has
+ been renamed. It has also been prettied up marginally and labels have been added.
+ o [17-04-2010] All charts have had their property "chart.tooltip.effect" renamed to "chart.tooltips.effect".
+ The Scatter chart has also had its property "chart.tooltip.hotspot" renamed to "chart.tooltips.hotspot"
+ o [17-04-2010] Default chart.tooltips bar chart property has changed from an empty array to null.
+ o [17-04-2010] The RGraph.common.js library has now been split into 5 separate files because it had
+ become far too large. You can read the new implementation details here:
+ http://www.rgraph.net/docs/index.html#implementation
+ o [10-04-2010] The "coords" arrays (for each object) have been unified. Now you no longer need to take
+ into account the margins. What you get in the coords arrays are as they are used on the
+ graph.
+
+ +---------------------------------------------------------------------------------------+
+ o [27-03-2010] | Initial stable release |
+ +---------------------------------------------------------------------------------------+
\ No newline at end of file
diff --git a/RGraph/docs/.CHANGELOG.txt b/RGraph/docs/.CHANGELOG.txt
new file mode 100644
index 0000000..34580b6
--- /dev/null
+++ b/RGraph/docs/.CHANGELOG.txt
@@ -0,0 +1,1277 @@
+ 24th December 2010 (STABLE)
+ ==================
+ o [ANNOTATING] Annotating has been changed to allow annotating to occur in the gutter
+
+ 18th December 2010
+ ==================
+ o [MSIE] MSIE 9 now uses the double click event to trigger the context menu
+ o [ZOOM] Added a note about making the zoom in thumdnail mode circular:
+ http://www.rgraph.net/docs/zoom.html#thumbnail
+
+ 11th December 2010
+ ==================
+ o [API] Added pointer, in the docs, for how to add text to your charts
+ o [BAR] The Bar chart now converts null values to zero
+ o [BAR] You can now specify a textual scale with chart.ylabels.specific
+ o [GANTT] Fixed background bars when specifying an xmin
+ o [HPROGRESS] Labels can now be on top of the bar as well as the bottom
+ o [LINE] You can now specify a textual scale with chart.ylabels.specific
+ o [MISC] Added the RGraph.SetConfig() function - http://www.rgraph.net/docs/setconfig.html
+ o [MISC] Added chart.title.background to graph types that use a title
+ o [PIE] Added chart.highlight.style.2d.color - default is a semi-transparent white color
+ o [PIE] Added chart.tooltips.event
+ o [SCATTER] Crosshairs readout now works when the X axis is in the center
+
+ 4th December 2010
+ =================
+ o [GANTT] Added chart.xmin (default is 0)
+ o [HBAR] Added chart.labels.above.decimals, defaulting to 0. You may need to set this to the number of desired decimals
+ if you're expecting decimals
+ o [LICENSING] If you prefer you can now use PayPal instead of Google Checkout to buy an RGraph license:
+ http://www.rgraph.net/docs/licensing.html#paypal
+ o [LINE] Fixed a bug with null points still showing tooltips
+ o [MISC] The key handling has been rewritten. There is now a documentation page about keys:
+ http://www.rgraph.net/docs/keys.html
+ o [MISC] Added default key properties to all relevant graph types - the key has been completely rewritten and as such,
+ you should check your graphs are as you expect. You may neeed to slightly adjust your key coordinates for example.
+ o [SCATTER] Added option to have vertical bars (much like the horizontal bars option)
+ o [SKELETON] Added more default properties
+ o [VPROGRESS] You can now position the labels on the left of the chart instead of the (default) right.
+
+ 27th November 2010 (STABLE)
+ ==================
+ o [BAR] When showing 10 Y labels, chart.scale.decimals is respected
+ o [DOCS] Add an example showing dynamic updating
+ o [DOCS] Added animation example using jQuery
+ o [LINE] When showing 10 Y labels, chart.scale.decimals is respected
+ o [MISC] Improved the jQuery animation example
+ o [MISC] Removed the "functions as colors" option - this may re-added at a later date
+ o [SCATTER] When showing 10 Y labels, chart.scale.decimals is respected
+ o [SKEL] Added lots more default default properties and functionality that common RGraph functionality
+ uses, for example: chart.resizable.
+
+ 20th November 2010
+ ==================
+ o [API] Documented RGraph.background.Draw().
+ o [DOCS] Added note to AJAX section about types
+ o [DOCS] Added skeleton object which can be used to ease creating new graph types
+ o [DOCS] Added note to misc docs about debugging your graphs
+ o [LINE] Fixed line chart tooltips as separate arguments
+ o [MISC] Minor adjustments to placement and borders
+ o [MISC] For the line/bar/scatter, when the X axis is at the bottom and there is a background bar with a
+ negative start (or it results in a negative end value), you now get a warning.
+ o [MISC] Added animation example using jQuery
+ o [MSIE] Changed instances of document.all to RGraph.isIE8()
+ o [RESIZING] Tweaked the positioning a little, so now nothing should move when you resize a canvas
+ o [SKEL] Added a skeleton file, which can be used as a base when creating new RGraph libraries.
+
+ 13th November 2010
+ ==================
+ o [API] Added RGraph.array_shift() function (removes an element from the beginning of an array)
+ o [LINE] Added chart.labels.above and chart.labels.above.size (default is 8)
+ o [LINE] All chart labels are now shown, regardless of how many points on the line there are.
+ o [LINE] Sets of line points can now be given as one big multi-dimensional array. This may make it easier to use in AJAX, eg:
+ http://dev.rgraph.net/tests/line.arguments.html
+ o [LINE] In Google Chrome, the shadow fix is applied by default. An option exists to enable you to turn this off: chart.chromefix
+ In a few rare cases you will need to turn off shadow blurring (chart.shadow.blur=0)
+ o [MISC] Added more options for in-graph labels. See http://www.rgraph.net/docs/ingraph.html
+ o [MISC] Added note about AJAX and types
+ o [VPROGRESS] Added chart.tooltips.coords.adjust
+ o [VPROGRESS] Added chart.min
+ o [VPROGRESS] Added chart.labels.count, chart.min, chart.scale.decimals
+
+ 6th November 2010
+ =================
+ o [API] RGraph.getScale() now takes the graph object as the second argument
+ o [BAR] Added chart.labels.above.decimals, defaulting to 0
+ o [BAR] Added chart.labels.above.size, which if specified is used as the font size. An example of this and the above change is
+ here: http://dev.rgraph.net/tests/above.bar.html
+ o [BIPOLAR] Added chart.gutter.center, which controls the space where the labels are
+ O [BIPOLAR] Added chart.scale.round
+ o [DOCS] Added note to API docs about references available
+ o [HBAR] Added chart.scale.decimals
+ o [HBAR] Added chart.scale.round
+ o [HPROGRESS] Added chart.min, for specifying a minimum value and chart.scale.decimals
+ o [LINE] Y labels can once again be 1/3/5/10
+ o [LINE] Added chart.scale.round
+ o [LINE] chart.outofbounds is now usable in conjunction with chart.ymax
+ o [LINE] Added chart.chromefix
+ o [RESIZE] Resize now sets the placeholder DIVs 'position' CSS value as inline-block, thus reducing page re-organisation
+ o [ROSE] Added chart.scale.decimals
+ o [ROSE] Added chart.ymax
+ o [ROSE] Added chart.ymin (There's an example here: http://dev.rgraph.net/tests/rose.ymin.html
+ o [RSCATTER] Added chart.scale.decimals // If you use the Rscatter, please test this with your graph(s)
+ o [RSCATTER] Added chart.scale.round // If you use the Rscatter, please test this with your graph(s)
+ o [RSCATTER] Added chart.ymin // If you use the Rscatter, please test this with your graph(s)
+ o [SCATTER] Y labels can once again be 1/3/5/10
+ o [SCATTER] Added chart.scale.decimals
+ o [SCATTER] Added chart.scale.round
+ o [SCATTER] Scatter chart, translating and crosshairs now work when you tell RGraph how you've translated using
+ chart.tooltips.coords.adjust
+ o [SCALE] Added chart.scale.round to: bar, bi-polar, line, rscatter, rose, scatter, tradar This means that scales produced are
+ rounded up, producing rounder values
+ o [SCALE] Re-added 10 Y labels to Line/Scatter. This may be best used In conjunction with chart.scale.round
+ o [TRADAR] Added chart.scale.round
+
+ 30th October 2010 (STABLE)
+ =================
+ o [DOCS] The combination example has been changed and extended. It now shows Pie charts in the tooltips,
+ which can be clicked on.
+ o [DOCS] Added note about using RGraph.showPNG() without a context menu.
+ o [DOCS] RGraph.showPNG() has had it's parameter list changed: http://www.rgraph.net/docs/api.html
+ o [API] Added fix to crosshairs when coordinates are used in conjunction with an X minimum value
+
+
+ 23rd October 2010
+ =================
+
+ Important:
+ The Line (and Scatter chart) chart have been PARTIALLY REVERTED, meaning that the number of labels is again a
+ choice between 1/3/5. The option to have 10 labels will be re-added, but for positive charts only, and
+ probably for scales with maximum values over 10.
+
+ o [API] The RGraph.showPNG() function can now accept the canvas to use as an (optional) argument,
+ allowing you to use the RGraph.showPNG() function with an image, eg:
+ http://www.rgraph.net/examples/tradar.html (1st graph)
+ o [BAR] Bar chart can now only have 1/3/5/10 labels
+ o [GANTT] Borders are now a little thinner (and less blurry)
+ o [KEY] Rounded key corners now lives behind an option: chart.key.rounded (default is false), also documented this
+ o [KEY] Filled keys now only cover the key with one layer of color - so transparency works better
+ o [PNG] URL is now selected by default
+ o [SCATTER] Box plot coords bug has been corrected
+ o [SCATTER] The default for chart.scale.decimals has been changed fr0m 0 (zero) to null. You may need to set this now
+ with: myScatter.Set('chart.scale.decimals', 0);
+
+ 16th October 2010
+ =================
+ o [LINE] Y axis can now have an arbitrary number of labels: http://dev.rgraph.net/tests/ymin.html
+ o [LINE] Made addition so that in Chrome a 1px linewidth is changed to 1.01
+ o [MISC] Corners on the key (in graph mode) are now curvy
+ o [MISC] RGraph.showPNG() now shows the data: URL to the image and makes it easy to copy it to the clipboard
+
+ 9th October 2010
+ ================
+ o [LINE] Changed decimal handling - you may need to specify this: myLine.Set('chart.scale.decimals', 0);
+ o [LINE] Added chart.outofbounds (default is false)
+ o [LINE] Added obj.getPoint(e) method which simplifies getting the pertinent point on the line
+ chart in events (eg the onmousemove event, and now the Line chart uses it)
+ o [LINE] Line charts can now have custom tickmarks
+ o [SCATTER] Added facility for custom tickmarks
+ o [WEBSITE] Fixed favicon path
+
+ 1st October 2010
+ ================
+
+ In October, 25% of all license fees will be donated to Unicef - the International charity for children
+
+ o [BAR] Added .getBar() method. This allows you to easily get the focused/selected bar. There is an example usage here:
+ o [DOCS] Documentation is no longer dynamic
+ o [FUNNEL] Shadows can now go upwards (ie any x/y offset is feasible)
+ o [FUNNEL] Converted this chart type to DOM2 for tooltips
+ o [GANTT] This chart has been moved to DOM2 for tooltips
+ o [HPROGRESS] This chart has been moved to DOM2 for tooltips
+ o [MISC] Colors can now be functions as well as well as strings/gradients. These colors are resolved once, at the start
+ of the .Draw() method
+ o [PIE] Documented method .getSegment(). Used for getting the pertinent
+ segment when the canvas is clicked on (for example), http://www.rgraph.net/docs/pie.html#available.methods
+ o [ROSE] This chart has been moved to DOM2 for tooltips
+ o [ROSE] Documented method .getSegment(). Used for getting the pertinent
+ segment when the canvas is clicked on (for example), http://www.rgraph.net/docs/rose.html#available.methods
+ o [RSCATTER] This chart has been moved to DOM2 for tooltips
+ o [SCATTER] This chart has been moved to DOM2 for tooltips
+ o [SCATTER] Added new properties: chart.yaxispos
+ chart.xaxis
+ chart.noendxtick
+ o [TOOLTIPS] Fixed a tooltip bug that probably only presented itself on the bar chart example page
+ o [TRADAR] Added chart.tooltips.highlight (default is true)
+ o [TRADAR] This chart has been moved to DOM2 for tooltips
+ o [VPROGRESS] This chart has been moved to DOM2 for tooltips
+ o [XML] Removed XML documentation
+
+ 25th September 2010 (STABLE)
+ ===================
+ o [DOCS] Fleshed out the integration example - http://www.rgraph.net/docs/index.html#mysql
+ o [DOCS] Added note to docs about line chart obj.original_data
+
+ 18th September 2010
+ ===================
+ o [ANNOTATE] Added onannotatestart and onannotateend events
+ o [CONTEXT] Fixed submenu offset in MSIE 9
+ o [DOCS] Added MySQL integration example to integration docs
+ o [DOCS] Documented how to use a dynamically created canvas with ExCanvas
+ o [MODALDIALOG] Removed MSIE 8 DirectX shadow from ModalDialog
+ o [MODALDIALOG] Better MSIE 9 compatibility
+ o [PIE] Fixed Pie chart sticks for Chrome 6
+ o [TOOLTIPS] If Y position is less than 0, tooltips are now shown below the cursor to mitigate this
+ o [WEBSITE] Added social networking icons to all pages
+ o [WEBSITE] "Preload" social networking icons
+
+ 11th September 2010
+ ===================
+ o [API] Updated docs for RGraph.Redraw() slightly
+ o [LINE] Added chart.toltips.highlight
+ o [MISC] Updated the combined bar/line example
+ o [ODO] The chart.units.pre and chart.units.post properties have changed to chart.value.units.pre and chart.value.units.post.
+ The chart.units.pre and chart.units.post properties have changed functionally.
+ o [ODO] Added chart.needle.extra to allow you to specify extra needles.
+ o [RSCATTER] Added chart.toltips.highlight
+ o [SCATTER] Added chart.toltips.highlight
+ o [SCATTER] Added coordinates readout: chart.crosshairs.coords
+ chart.crosshairs.coords.fixed
+ chart.crosshairs.coords.fadeout
+ chart.crosshairs.coords.labels.x
+ chart.crosshairs.coords.labels.y
+ Example: http://dev.rgraph.net/tests/crosshairs.html
+ o [ZOOM] Much improved the smoothness of the indicator box when in area mode - see http://www.rgraph.net/docs/zoom.html
+ for an example of area mode
+
+ 4th September 2010
+ ==================
+ o [API] Changed RGraph.number_format() functions arguments
+ o [API] Added RGraph.getGutterSuggest() function, which is a suggestion based on the left labels (only)
+ for the chart.gutter setting.
+ o [API] Added RGraph.showPNG() function, which makes it easy to get images of graphs. This is designed to be
+ used in conjunction with the context menu, and is therfore defined in the RGraph.common.context.js file.
+ There's documentation about it here: http://www.rgraph.net/docs/png.html
+ o [BAR] Added key shadow control
+ o [BAR] Added chart.scale.point and chart.scale.decimal
+ o [BIPOLAR] Added chart.scale.point and chart.scale.decimal
+ o [FUNNEL] Added key shadow control
+ o [HBAR] Moved to DOM 2 event handler functions
+ o [HBAR] Added chart.scale.point and chart.scale.decimal
+ o [LINE] Added key shadow control
+ o [LINE] Added warning about Chrome 6 shadow bug
+ o [LINE] Added chart.noyaxis
+ o [LINE] Added chart.scale.point and chart.scale.decimal
+ o [MISC] Added RGraph.getGutterSuggest(). See the misc documentation for more detail
+ o [MSIE] Now that RGraph is moving to DOM2, tooltips on graph libraries that have been changed will not function in MSIE8.
+ The graphs will still be shown, however tooltips will not function. MSIE9 will still work.
+ o [ODO] Pointer is now more pointy
+ o [PIE] Moved to DOM 2 event handler functions
+ o [ROSE] Added key shadow control
+ o [RSCATTER] Added key shadow control
+ o [SCATTER] Added chart.tooltips.coords.adjust
+ o [SCATTER] Added key shadow control
+ o [SCATTER] Added chart.scale.point and chart.scale.decimal
+ o [TRADAR] Added key shadow control
+ o [WEBSITE] Added code to async page that demonstrates the difference more
+
+ 28th August 2010
+ ================
+ o [API] Updated the API docs a little with the correct data properties for some graph types
+ o [DOCS] Added information about AJAX requests to performance section
+ o [DOCS] Added information about the DOMContentLoaded event to the docs.
+ o [LINE] Fixed problem with chart.ylabels = false
+ o [METER] Added arrow head to the Meter
+ o [METER] Removed outer labels
+ o [METER] Increased number of labels to 11
+ o [MSIE] A few small tweaks to the palette, the scatter chart, the context menu, and tooltips
+ o [ODO] A few fixes for the Odometer in Chrome 6, and a few minor enhancements to the appearance.
+ o [WEBSITE] Live site now uses images.rgraph.net for the index page ** REVERTED **
+ o [WEBSITE] Social networking icons are now combined into one image.
+
+ 21st August 2010
+ ================
+ o [HBAR] Added chart.units.ingraph (for when your units are quite long)
+ o [MISC] Fixed various bugs in circular charts with Chrome 6
+ o [MISC] Added note to front page about suitability for Chrome extensions
+ o [MSIE] Lots more fixes for MSIE 9
+
+ 14th August 2010
+ ================
+ o [BAR] Added chart.tooltips.coords.adjust which allows you to adjust tooltip coordinates when you translate
+ o [HBAR] HBar shadow is now "unified", so you can have an upwards shadow with a large offset and it still looks OK
+ o [HBAR] "chart.labels.abovebar" are now left aligned if they would go off the end of the canvas
+ o [HBAR] Fixed a bug with chart.strokecolor - renamed to chart.strokestyle
+ o [LINE] Added chart.tooltips.coords.adjust (for when you translate() first)
+ o [LINE] Tweaked filled/stepped line charts - stepped line charts show trailing line again
+ o [LINE] Tickmarks, as well as a string, can now also be an array of tickmark styles, eg:
+ http://dev.rgraph.net/tests/test3.html
+ o [LINE] Added chart.ylabels.invert
+ o [MISC] You can now specify in-graph labels like this:
+ line4.Set('chart.labels.ingraph', [6,'July', 3, 'November']);
+ If you have a lot ofempty spaces, this will help.
+ o [MISC] Added type property(=common) to common objects
+ o [ODO] Improved the appearance of the Odometer border
+ o [SCATTER] Tickmarks are no longer drawn when the ticks are boxplots
+ o [SCATTER] Added chart.xmin (upgrade cautiously)
+ o [SCATTER] Boxplots are now usable when the X axis is in the center
+
+ o [NOTE] Chrome 6 appears to have an issue with canvas shadows. Other browsers are fine. A workaround has been added to the
+ Line chart library, however it won't be a solution for all cases. In these cases, turn off shadow blurring.
+
+ 7th August 2010
+ ===============
+ o [BAR] Changed this graph type over to the DOM2 .addEventListener() for tooltips
+ o [BAR] Bar chart can now have an arbitrary number of labels
+ o [BAR] Added chart.ylabels.inside
+ o [BAR] Labels can now be at any angle
+ o [BIPOLAR] Changed the default colors to just one - green
+ o [EVENTS] Added more events:
+ o onmodaldialog
+ o onresize
+ o onadjust
+ o onannotate
+ o [HPROGRESS] Multiple segments are now supported
+ O [HPROGRESS] Added the ability to configure the number of inner tickmarks
+ o [LINE] Labels can now be at any angle
+ o [LINE] Changed this graph type to use the DOM2 .addEventListener() for tooltips
+ o [MISC] Added isRGraph property to common objects
+ o [MISC] Added chart.title.hpos to all graph libraries
+ o [MODALDIALOG] Added onmodaldialog event
+ o [ODO] Outer shadow is now configurable
+ o [ODO] Inner shadow is now configurable
+ o [PROGRESS] This has now been split into the HProgress and VProgress
+ o [SCATTER] Labels can now be at any angle
+ o [TOOLTIPS] Added contract effect, similar to expand but in reverse
+ o [TRADAR] Background grid now matches RScatter in terms of width etc
+ o [VPROGRESS] Multiple segments are now supported
+ o [VPROGRESS] Added the ability to configure the number of inner tickmarks
+
+ o [NOTE] Upgrading to the new H/VProgress should be done cautiously as they have undergone significant alterations
+
+ 31st July 2010
+ ==============
+ o [MISC] Stable release
+ o [DOCS] Added CSS class: RGraph_palette
+ o [DOCS] Added simple example AJAX function to integration documentation:
+ http://www.rgraph.net/docs/index.html#integration
+ o [ZOOM] Fixed a fade-in bug with full canvas zoom
+
+ 24th July 2010
+ ==============
+ o [LINE] This chart can now have text at any angle. Other graph types to follow
+ o [MISC] The minify script now accepts multiple arguments (filenames),
+ eg. ./minify file1 file2 file3 ...
+
+ 17th July 2010
+ ==============
+ o [BAR] Abovebar labels in GROUPED charts are now formatted
+ o [BIPOLAR] Moved this to use addeventListener() for events - this is a test case
+ o [EVENTS] Renamed the RGraph functions RGraph.AddEventListener() and RGraph.FireEvent()
+ to RGraph..AddCustomEventListener() and RGraph.FireCustomEvent()
+ o [EVENTS] Added onbeforedraw event which fires at the start of the .Draw() function
+ o [EVENTS] Added onzoom event to all types of zoom. See docs for details
+ o [HBAR] Added formatting to above bar labels
+ o [HBAR] Fixed grouped HBars with shadows going upwards (partially)
+ o [ODO] Changed a few internal properties. Read more in the docs/.BC.txt file
+ o [ODO] Changed chart.needle.style to chart.needle.color
+ o [RSCATTER] Updated test script
+ o [TRADAR] Added chart.labels.axes - defaults to "nsew"
+ o [TRADAR] Added chart.ymax
+ o [BIPOLAR] Implemented chart.xtickinterval. If you specify this, X tickmark spacing is totally down to this setting
+ o [MISC] Added chart.tooltips.override (see tooltips docs for details)
+
+ 9th July 2010
+ =============
+ o [API] Added __index__ to tooltip DIVs, which corresponds to the original tooltips array. If you're not using an array of strings
+ for your tooltips, this is not pertinent
+ o [API] The RGraph.Tooltip() function now accepts an extra parameter - the index of the tooltip
+ o [MISC] Introduced event support. There are currently just three events - ontooltip - which naturally fires when
+ a tooltip is shown, oncontextmenu - which fires when the RGraph context menu is shown and ondraw - which
+ fires when the .Draw() method is called.. More information is available here:
+ http://www.rgraph.net/docs/events.html
+ o [MISC] Added snap tooltip effect for graph types where the tooltips are triggered using the onmousemove event,
+ ie Line, Rscatter, Scatter and the Tradar
+ o [MISC] MooTools compatibility fix
+ o [MISC] Added obj.isRGraph boolean to all graph objects. This is documented on the misc docs page (docs/misc.html)
+ o [MSIE] MSIE9 compatibility work
+ o [ODO] You can now use textual labels instead of numbers, eg. N/S/E/W (using chart.labels)
+ o [ODO] Added chart.zerostart option determining whether the top label is zero or the end value
+ o [ODO] Fixed a pointer bug
+ o [ODO] Fixed a rounding issue and added chart.scale.decimals (default is 0)
+ o [ODO] Colors can now be configured with: chart.green.color, chart.yellow.color, chart.red.color
+ o [PROGRESS] Changed a few internal properties. Read more in the docs/.BC.txt file
+ o [TRADAR] Added background diagonal lines (going from the center outwards)
+
+
+ 26th June 2010
+ ==============
+ o Stable release
+
+ 18th June 2010
+ ==============
+ o [BAR] Documented grid properties: chart.background.grid.autofit, chart.background.grid.autofit.numhlines, chart.background.grid.autofit.numvlines
+ o [DOCS] Documentation pages have been reorganised and a contents list added to each page
+ o [GANTT] Documented grid properties: chart.background.grid.autofit, chart.background.grid.autofit.numhlines, chart.background.grid.autofit.numvlines
+ o [HBAR] Documented grid properties: chart.background.grid.autofit, chart.background.grid.autofit.numhlines, chart.background.grid.autofit.numvlines
+ o [LINE] Documented grid properties: chart.background.grid.autofit, chart.background.grid.autofit.numhlines, chart.background.grid.autofit.numvlines
+ o [SCATTER] Documented grid properties: chart.background.grid.autofit, chart.background.grid.autofit.numhlines, chart.background.grid.autofit.numvlines
+ o [WEBSITE] Added warning about MSIE versions less than 8
+
+ 5th June 2010
+ =============
+ o [HBAR] Added the following properties: chart.title.xaxis
+ chart.title.yaxis
+ chart.title.xaxis.pos
+ chart.title.yaxis.pos
+ o [ROSE] Slightly increased the area recognised to initiate resizing the Rose (ie the size of the hotspot)
+ o [TRADAR] Added adjusting to the TRadar
+
+ 29th May 2010
+ =============
+ o [BAR] Added adjusting
+ o [ODO] Added gray border effect
+ o [ODO] Added chart.tickmarks.highlight
+ o [PROGRESS] Added adjusting
+ o [ROSE] Added adjusting
+ o [SCATTER] Added chart.ymin
+
+ 22nd May 2010
+ =============
+ o [LINE] Added interactive adjustments
+
+ 15th May 2010
+ =============
+ o [API] Updated the .getSegment() for use with the Rose chart and Donut variant charts
+ o [API] Added RGraph.array_pad() function
+ o [BAR] You can now have grouped bar charts with shadows going to the left
+ o [LINE] Linewidth can now, as well as being a single number, be an array of numbers, one for each line
+ o [LINE] You can now have labels on the inside of the Y axis as opposed to having them in the gutter
+ o [MISC] ModalDialog and zoom background DIVs are now much better in regards to page coverage (the semi-opaque background)
+ o [MISC] Removed RGraph.getPageWidth() and RGraph.getPageHeight() functions
+ o [MISC] You can now pass a color as the second argument to RGraph.Redraw() which it will use
+ o [MISC] Resizing the window when zoomed no longer hides the zoom
+ o [ODO] Little bit of work on pointers and MSIE compatibility
+ o [ODO] Added "digital" readout option, as shown on the example page
+ o [PROGRESS] This chart type can now have an "in-bar" indicator
+ o [PIE] Converted this chart to use RGraph.getSegment() for tooltips
+ o [ROSE] You can now set the strokestyle
+ o [ROSE] Converted this chart to use RGraph.getSegment() for tooltips
+ o [SCATTER] Added chart.line.linewidth and, as with the line, it can be either a number or an array of numbers
+ o [SCATTER] chart.line.stepped can now, as well as simply true or false, be an array of booleans. This allows you to have
+ multiple lines, some stepped, some not.
+
+ 8th May 2010
+ ============
+ o [MISC] You can now have multi-line labels by using the text "\r\n" in your label (without the quotes)
+ o [MISC] Resizing a graph no longer affects the page layout
+ o [ROSE] Added labels to this chart
+ o [ROSE] The Rose chart origin is now the "north" axis
+ o [WEBSITE] Re-arranged the front page
+ o [WEBSITE] Removed a lot of examples from the website and made the whole thing a little more streamlined
+ o [ZOOM] Once visible, you can now double click a zoomed area to expand it to a full size zoom. You can see
+ this on the line graph on the front page.
+
+ 1st May 2010
+ ============
+ o [DONUT] This is no longer a seperate class, but now a variant of the Pie chart (chart.variant = donut)
+ o [MISC] Added note about copying the text in tooltips using Firefox
+ o [ROSE] Tooltip highlighted area is now "under" the labels (as opposed to "over")
+
+ 25th April 2010
+ ===============
+ o [MISC] Separated out resizing functionality into it's own file - RGraph.common.resizing.js This further reduces the size of
+ RGraph.common.core.js
+ o [MISC] In area zoom, you can now left-drag to move the zoom itself around, and right-drag to move the zoomed canvas around inside
+ the zoom
+ o [MISC] Added RGraph_zoomed_area CSS class
+ o [MISC] Added chart.crosshairs.linewidth to bar, line and scatter
+ o [MISC] You can now have a single level of submenu items with the context menu
+ o [RADAR] This chart has been renamed to Rose and the appearance enhanced
+
+ 17th April 2010
+ ===============
+ o [BAR] This chart type can now use the onmousemove event for tooltips instead of the onmousedown
+ o [DOCS] Added tooltips documentation page - this explains tooltips and how you can specify them. There are now 4 methods available.
+ o [MISC] The zoomed area is now draggable once visible
+ o [MISC] Split out RGraph.common.js into separate files, consisting of:
+ o RGraph.common.core.js
+ o RGraph.common.annotate.js
+ o RGraph.common.context.js
+ o RGraph.common.tooltips.js
+ o RGraph.common.zoom.js
+ If you don't use any of the interactive features, the core common library is now roughly half the size. See
+ http://www.rgraph.net/docs/index.html#implementation for details of the new way to implement RGraph
+ o [MISC] You can now specify the CSS class that tooltips use (using chart.tooltips.css.class). If you have multiple
+ graphs on one page and want the tooltips to appear differently, this is how to do it
+ o [MISC] New tooltip effect - "none". Which, as the name implies, doesn't fade or expand.
+
+ 10th April 2010
+ ===============
+ o [MISC] Cleaned up each graphs coords array. If you use the coords arrays, you may need to adjust your numbers slightly.
+ The new coords may be off for you by one or two chart.margin (it can be hmargin or vmargin depending on your graph type)
+ o [MISC] Added details of backwards compatibility breaks
+ o [MISC] New zoom mode - area. You can see this on the front page line graph and on the zoom documentation page
+ o [MISC] Added resizing capability. Will not work with other dynamic features (except the context menu)
+
+ 3rd April 2010
+ ==============
+ o [BAR] Added new grid properties: chart.background.grid.autofit
+ chart.background.grid.autofit.numhlines
+ chart.background.grid.autofit.numvlines
+ o [BAR] Added chart.title.xaxis
+ o [BAR] Added chart.title.yaxis
+ o [BAR] Added chart.title.xaxis.pos
+ o [BAR] Added chart.title.yaxis.pos
+ o [GANTT] Adjusted the background grid, adding the required default properties
+ o [GANTT] Added new grid properties: chart.background.grid.autofit
+ chart.background.grid.autofit.numhlines
+ chart.background.grid.autofit.numvlines
+ o [HBAR] Added new grid properties: chart.background.grid.autofit
+ chart.background.grid.autofit.numhlines
+ chart.background.grid.autofit.numvlines
+ o [LINE] Multiple shadow colors are now facilitated (see example on front page)
+ o [LINE] Added new grid properties: chart.background.grid.autofit
+ chart.background.grid.autofit.numhlines
+ chart.background.grid.autofit.numvlines
+ o [LINE] Added chart.title.xaxis
+ o [LINE] Added chart.title.yaxis
+ o [LINE] Added chart.title.xaxis.pos
+ o [LINE] Added chart.title.yaxis.pos
+ o [LINE] Added chart.backdrop, chart.backdrop.alpha and chart.backdrop.size
+ o [LINE] Shadow color can now be an array of shadow colors. ie. A different one for each line
+ o [MISC] Added note about installing your own event handlers to misc documentation page
+ o [MISC] Added RGraph.SetShadow() - a shortcut function for setting the shadow
+ o [ODO] Added option to not draw the pointer tail
+ o [ODO] Added chart.needle.type option. It can be "pointer" (default) or "triangle".
+ o [PROGRESS] Added chart.margin
+ o [PROGRESS] Added inner tickmarks (chart.tickmarks.inner)
+ o [PROGRESS] Made examples a bit better
+ o [SCATTER] Connecting lines can now be stepped (chart.line.stepped)
+ o [SCATTER] You can now specify the exact X point at which an X label is drawn
+ o [SCATTER] Added new grid properties: chart.background.grid.autofit
+ chart.background.grid.autofit.numhlines
+ chart.background.grid.autofit.numvlines
+ o [SCATTER] Added chart.title.xaxis
+ o [SCATTER] Added chart.title.yaxis
+ o [SCATTER] Added chart.title.xaxis.pos
+ o [SCATTER] Added chart.title.yaxis.pos
+
+
++------------------------------------------------------------------------------------------------------------+
+| STABLE RELEASE - 27th March 2010 |
++------------------------------------------------------------------------------------------------------------+
+
+
+ 27th March 2010
+ ===============
+ o [MISC] Just tweaks - nothing major
+
+ 20th March 2010
+ ===============
+ o [MISC] Reverted dark background color for zoom back to the lighter one
+ o [MODALDIALOG] Reverted the dark background color back to the lighter one
+ o [METER] Added more feint tickmarks
+ o [METER] Labels are now angled. This will be an option in the future
+ o [ODO] Added more feint tickmarks
+ o [ODO] Labels are now angled. This will be an option in the future
+ o [ODO] Significant changes to this see the docs page - http://www.rgraph.net/docs/odo.html
+
+ 13th March 2010
+ ===============
+ o [MISC] Removed curvy corner from context menu
+ o [WEBSITE] Added Google Buzz social networking icon
+ o [MODALDIALOG] Darkened the background a little. You can set this back if you wish by using the ModalDialog_dialog CSS class
+
+ 6th March 2010
+ ==============
+ o [METER] Documented shadow properties
+ o [MISC] Added RGraph.getPageWidth() which returns the page width, accommodating browser differences
+ o [MISC] Added RGraph.getPageHeight() which returns the page height, accommodating browser differences
+ o [MODALDIALOG] Increased the radius of the corners (ie they're more rounded now)
+ o [MODALDIALOG] Documented the ModalDialog CSS classes and also added miscellaneous documentation
+ o [MSIE] Added context menu to the MSIE example
+
+ 27th February 2010
+ ==================
+ o [API] Added information about the coords array.
+ o [API] Added a little information about dynamically updating your graphs
+ o [MISC] Zoom in canvas mode now has a dark background option - chart.zoom.background - can be true or false and defaults to true
+ Note: If you use the full canvas zoom, this will affect you - if you don't like it, you will need to turn it off
+ o [MISC] Added RGraph_zoomed_canvas CSS class. Also tweaked the default CSS for the two types of zoom
+ o [MISC] Tweaked the animation example
+
+ 20th February 2010
+ ==================
+ o [DOCS] Added reasonable caching strategy
+ o [DOCS] Expanded the API docs regarding the data properties
+ o [LINE] Removed chart.border property. You should use CSS on your canvas element instead.
+ o [LINE] Added chart.ymin property
+ o [LINE] Tickmarks are no longer drawn if the tick is outside the Y scale range
+ o [METER] Added shadow
+ o [WEBSITE] Removed most tables from the website
+ o [WEBSITE] Fixed the issue with the front page graphs, Google Chrome and missing text. This was done by NOT using
+ asynchronous processing.
+
+ 9th February 2010
+ =================
+ o [PIE] Fixed pie chart sticks with athick white border
+ o [PIE] Added chart.labels.sticks.color
+ o [DOCS] Added link anchors to documentation pages, eg: http://www.rgraph.net/docs/bar.html#chart.labels
+
+ 7th February 2010
+ =================
+ o [BAR] Added ability to specify number of Y labels - 1, 3 or 5 (the default).
+ o [LINE] Added ability to specify number of Y labels - 1, 3 or 5 (the default).
+ o [LINE] Added a little missing documentation
+ o [LINE] Small fix to MSIE arrow style tickmarks
+ o [MISC] Optimisations to all chart libraries
+ o [MISC] Added RGraph_zoom_window CSS class - the front page uses it if you want an example
+ o [SCATTER] Added ability to specify number of Y labels - 1, 3 or 5 (the default).
+ o [SCATTER] Added a little missing documentation
+
+ 30th January 2010
+ =================
+ o [BAR] Performance tweaks.
+ o [DOCS] Made note about using tables for layout and how it can impact negatively on graph speed.
+ o [DOCS] Documented Pie chart label sticks.
+ o [LINE] Performance tweaks.
+ o [MISC] Opera (10.5) now supports the canvas text and shadow APIs
+
+ 23rd January 2010
+ =================
+ o [LINE] Fix to arrow style tickmarks
+ o [MISC] Very minor change to tooltips and event handling
+ o [SCATTER] Added diamond shape tickmarks
+
+ 16th January 2010
+ =================
+ o [BAR] Documented chart.ylabels
+ o [CONTEXT] Context menus are now positioned correctly when you specify a DOCTYPE in MSIE
+ o [LINE] Added and documented chart.ylabels
+ o [MODAL DIALOG] This is now completely static (when scrolling) in all browsers (Chrome, FF, MSIE, Safari, Opera), (MSIE requires that
+ you use a doctype.
+ o [ODO] Improved MSIE support (spurious circles are no longer drawn)
+
+ 9th January 2010
+ ================
+ o [BAR] Added glass variant
+ o [BAR] Added sketch variant
+ o [DOCS] Documented getCanvasXY() function
+ o [MISC] Links now work in tooltips
+ o [MISC] Added standard box-shadow: CSS property where necessary
+ o [MISC] Slight border-radius change to context menu
+ o [PIE] Added small (optional) label sticks
+ o [PROGRESS] Added indicator arrows
+
+ 2nd January 2010
+ ================
+ o [METER] Added this as a new chart type
+ o [MISC] More optimisations for Meter, Line and Bar charts
+ o [TRADAR] Added tooltips
+ o [TRADAR] Added ability to specify offsetx and offsety for labels
+
+ 19th December 2009
+ ==================
+ o [BAR] Added support for MSIE shadows. Shadow blurring is not available though
+ o [BAR] Fixed dot chart colours not showing correctly in MSIE
+ o [BIPOLAR] Added support for MSIE shadows. Shadow blurring is not available though
+ o [FUNNEL] Optimised this chart type a little
+ o [FUNNEL] Added support for MSIE shadows. Shadow blurring is not available though
+ o [LINE] Added support for MSIE shadows. Shadow blurring is not available though
+ o [MISC] The context menu for Safari, Opera and Firefox Mac is now triggered by a double click (left mouse button).
+ o [MSIE] Tooltips now work (albeit a little unreliably), but this browser is very slow at showing them. Using a doctype will
+ cause them to be ou of position.
+ o [PIE] Added support for MSIE shadows. Shadow blurring is not available though
+ o [PROGRESS] Added support for MSIE shadows. Shadow blurring is not available though
+
+ 12th December 2009
+ ==================
+ o [MSIE] Microsoft Internet Explorer is now supported in a limited fashion. You can see it in action here:
+ http://www.rgraph.net/docs/msie.html This is not using Google Chrome Frame.
+ o [TRADAR] Rewrote so that it works with MSIE. This rewrite means that tooltips will be feasible (I'm yet to add them)
+ o [WEBSITE] Significant reorganisation of website
+
+ 5th December 2009
+ =================
+ o [API] Added and documented RGraph.Async() function, which can be used to help speed up your pages. There's a page which details it:
+ http://www.rgraph.net/docs/async.html
+ o [MISC] Removed text support for Opera. The graphs are still displayed, albeit without text
+ o [MISC] Changed to object detection in place of specific browser detection for older browsers. This means more
+ browsers are accounted for.
+ o [MISC] Added RGraph.getSegment() function, which returns the applicable segment information
+ (x, y, radius, startAngle, endAngle)
+ o [SCATTER] Added ability to do Barplots using the Scatter chart.
+ o [SCATTER] Can now specify the scatter to not display tick marks (be specifying the tickmark as null)
+
+ 28th November 2009
+ ==================
+ o [DOCS] Added RGraph.HideContext() to API documentation.
+ o [MISC] Simplified logic for showing the context menu. Please test your browser on the website before upgrading as this may
+ cause regressions.
+ o [MISC] Fixed slight oddity for zoom which resulted in a small zoom thumbnail
+ o [MISC] The RGraph website now works with Google Chrome Frame. NB: If you're having a similar problem, ensure the META
+ tag is in the first 1Kb of the page.
+ o [MISC] Achieved a degree of Opera compatibility. Please bear in mind that Opera does not yet support the canvas text
+ or shadow APIs so do not expect to see any shadows on your graphs. Text is simulated however, so the graphs
+ are still usable in some circumstances however. Also bear in mind that Opera support is buggy.
+
+ 20th November 2009
+ ==================
+ o [MISC] Added new mode for zoom - thumbnail This shows a zoom thumbnail (you must set chart.zoom.mode to thumbnail) instead of
+ zooming the entire canvas. The line graph on the front page shows an example of it.
+ o [MISC] Context menu in Mac Firefox is now attached to the left mouse button instead of the right
+ o [NOTE] Annotations are now persistent in Chrome (dev channel releases at the moment) and Chrome Frame
+
+ 14th November 2009
+ ==================
+ o [ALL] Finished zoom function
+ o [PIE] Work on linewidth and line color
+ o [MISC] Changed Safari to use left click for context menu - should elimate the temperamentality
+
+ 8th November 2009
+ =================
+ o [ALL] Added zoom functionality (This is not finished yet)
+ o [API] Corrected this regarding graph data
+ o [MISC] Added RGraph.ClearAnnotations() to API documentation. NB: This function is called when you call RGraph.Clear()
+
+ 31st October 2009
+ =================
+ o [DOCS] Correct the docs regarding text sizes
+ o [PIE] Miscellaneous fixes
+ o [RADAR] Changed to be left aligned
+
+ 25th October 2009
+ =================
+ o [ALL] Added property: chart.text.font
+ o [ALL] Added property: chart.text.color
+ o [ALL] Changed from pixels to points for font sizes (you may need to reduce your font sizes slightly). Default is now 10pt
+ o [DONUT] Added ability to set key as being in gutter
+ o [DONUT] Added chart.align for left/center/right aligning the chart
+ o [PIE] Added chart.align for left/center/right aligning the chart
+
+ 17th October 2009
+ =================
+ o [BAR] Added new option: chart.axis.color
+ o [Bipolar] Added new option: chart.axis.color
+ o [DOCS] Automated generation of API (properties) documentation
+ o [HBAR] Added new option: chart.axis.color
+ o [LINE] Added new option: chart.noxaxis
+ o [LINE] Added new option: chart.axis.color
+ o [LINE] Reduced default X/Y shadow offset
+ o [LINE] Added new option: chart.noendtick - useful for when you're generating line charts with Y axes on both sides
+ o [MISC] Changed "Combining..." page to illustrate combining two line charts
+ o [MISC] Added XML documentation
+ o [MISC] Added performance note about combining libraries
+ o [SCATTER] Added new option: chart.axis.color
+
+ 10th October 2009
+ =================
+ o [BAR] Added chart.background.grid.hlines, chart.background.grid.chart.background.grid.vlines and chart.background.grid.border
+ o [BAR] Changed chart.labels.abovebar to chart.labels.above
+ o [BAR] Added chart.labels.above to stacked bar charts
+ o [BIPOLAR] Fixed using chart.xmax
+ o [BIPOLAR] Added chart.scale.decimals
+ o [HBAR] Added chart.background.grid.hlines, chart.background.grid.chart.background.grid.vlines and chart.background.grid.border
+ o [HBAR] Added chart.labels.above. Not technically "above" the bar (not at all), but it's so named for API compatibility
+ o [HBAR] Added chart.labels.above to stacked chart
+ o [LINE] Added chart.background.grid.hlines, chart.background.grid.chart.background.grid.vlines and chart.background.grid.border
+ o [PIE] Miscellaeous work
+ o [SCATTER] Added chart.background.grid.hlines, chart.background.grid.chart.background.grid.vlines and chart.background.grid.border
+ o [WEBSITE] Added sharing buttons
+
+ 3rd October 2009
+ ================
+ o [ALL] Charts now clean up events if tooltips are not installed. This means that if tooltips are not being used
+ the onmousemove/onclick events (depending on the graph library) are reset to null.
+ o [BAR] 3D effect now works with background grid and bars
+ o [DOCS] Added API documentation (replaces working.html)
+ o [MISC] Changed various graphs default background bar colors to white
+ O [MISC] Removed array_range() function - unused
+ o [LINE] More (general) work
+ o [LINE] chart.fillstyle can now be an array as well as a string
+ o [LINE] Added 3D variant to line chart.
+ o [MISC] Added minified library archive
+
+ 19th September 2009
+ ===================
+ o [ALL] Added new option - chart.title.color - to all graph types (except the LED)
+ o [LINE] Slight modification to filled line charts and the (stroke) colour.
+ o [LINE] Changed stepped line chart so last vertical line is not drawn
+ o [LINE] Changed the look (for the better) of filled line charts and thick lines
+ o [LINE] Added option - chart.axesontop - useful in a minority of cases; causes the axes to be
+ redrawn after the graph
+ o [LINE] Added "chart.filled.range" option. Used to compare the range/difference between two sets of data.
+ o [MISC] Fixed negative horizontal bars
+ o [LINE] Fixed problem with null arguments
+ o [LINE] Filled line charts now work a little better with negative values
+ o [PROGRESS] Added chart.tickmarks.color
+ o [PROGRESS] Added chart.text.color
+
+ 6th September 2009
+ ==================
+ o [ALL] Fixed libraries to work with Prototype.js
+ o [ALL] Added chart.title.vpos allowing you override and specify the position of the title. This should be a
+ decimal from 0 to 1. By default it's not used
+ o [BAR] Can now have Y axis labels in right hand gutter
+ o [LINE] Can now have Y axis labels in right hand gutter
+ o [COMMON] Fixed scale generation bug when maximum value is zero (ie all of your values are zero)
+
+ 22nd August 2009
+ ================
+ o [MISC] Optimisations on various graph libraries
+ o [MISC] Very minor albeit better HTML5 compliance
+ o [LINE] You can now specify the Y axis position - left (default) or right
+
+ 8th August 2009
+ ===============
+ o [BAR] Added 3D effect to regular, grouped and stacked charts
+ o [GANTT] Can now specify background grid width
+ o [LED] The text is now stripped of right-most whitespace
+
+ 25th July 2009
+ ==============
+ o [MISC] Stop using $() function for better compatibility with outside libraries
+ o [SCATTER] Support supplying multiple datasets as one big array instead of multiple arrays
+ o [ALL] Changed all graph types to "new RGraph.xxx()" format
+
+ 3rd July 2009
+ =============
+ o [DOCS] Misc updates
+ o [DOCS] Fixed docs regarding default gutter size
+ o [LINE] Handle null values better
+ o [LINE] Documented optional different fill colour
+ o [MISC] Added caching enhancements
+ o [MISC] Slight change to FixEventObject() so offsetX and offsetY are available in Firefox
+ o [SCATTER] Allow multiple datasets. Effect is only visible when lines are shown
+ o [SCATTER] Key can now be shown for multiple lines
+
+ 20th June 2009
+ ==============
+ o [ALL] Code optimisations
+ o [ALL] Annotations are now persistent in browsers that support HTML5 DOM storage (currently Firefox 3.5 and Safari 4)
+ o [BAR] Added ability to specify labels above bars on single and grouped bar charts
+ o [SCATTER] Added ability to show connecting line
+
+ 6th June 2009
+ =============
+ o [ALL] On graphs that support tooltips, you can now have context menus at the same time as tooltips
+ o [MISC] Fixes to hiding palette in Chrome
+ o [MISC] Fixed a palette resizing bug
+ o [MISC] Changed the number of frames for expand and fade tooltip effects from 5 to 10 - looks a little smoother
+ o [MISC] Fixed a minor scale bug
+ o [MISC] Changed name of ShowPalette() function to RGraph.Showpalette()
+ o [PIE] Fixed minor pie chart bugs with mouse cursor
+
+ 23rd May 2009
+ =============
+ o [ALL] Documented context menu
+ o [ALL] Added annotations - useful to highlight interactively, and added example to front page line chart
+ o [BAR] Added pyramid chart variant
+ o [BAR] Added arrow chart variant
+ o [BAR] Added crosshairs
+ o [FUNNEL] Added tooltips
+ o [LINE] Added crosshairs
+ o [LINE] Can now have a context menu at the same time as tooltips
+ o [MISC] Added annotations mini colour palette
+ o [SCATTER] Added crosshairs
+ o [SCATTER] Fixed bug where pre/post units were not being shown
+ o [SCATTER] Can now have a context menu at the same time as tooltips
+
+ 9th May 2009
+ ============
+ o [BAR] Can now better control the shadow
+ o [BAR] Now ymax is exactly that which is used
+ o [BAR] You can now control the number of decimals that are used
+ o [BIPOLAR] Added shadow
+ o [HBAR] Can now better control the shadow
+ o [HBAR] Added tooltipcapability
+ o [PIE] Can now better control the shadow
+ o [LINE] Can now better control the shadow
+ o [LINE] Reversed order of arguments to the constructor - ie the data - so they are uniform with things like labels and tooltips
+ o [LINE] Can now have a fill colour that's different to the line colour (see the last example on the lines example page)
+ o [LINE] Added arrow style tickmarks (filled and not) - look best with a linewidth of 1 or 2
+ o [LINE] Number of labels is now independent of number of datapoints, as are number of X tickmarks
+ The second to last two line chart examples show this in action
+ o [LINE] Added an interesting example showing off the new independence of labels, datapoints and tickmarks. The ninth
+ line example (the sin/cos/tan curves) has 361 datapoints but only 5 labels - 361 labels would be a bit much.
+ o [LINE] Line chart no longer draws in the gutter (see this in action by looking at the above tangent curve example)
+ o [PROGRESS] Brought shadow into line with the rest of the graphs
+ o [PROGRESS] Tidied this up a little
+ o [PROGRESS] Added tooltip capability
+ o [RADAR] Added tooltip capability
+ o [DOCS] Added small note about canvas and accessibility
+ o [MISC] Fixed a few HTML warnings
+ o [MISC] Cleaned up CSS warnings
+ o [MISC] Updated license
+ o [MISC] Slight tweaks to context menu: Specifying a null callback now means that that menu item
+ will not trigger the rollover effect
+ o [MISC] Fixed a scale bug where the top value is 5.xxx
+ o [WEBSITE] Made the line graph and pie chart on the front page a little more interactive
+ o [WEBSITE] Added a funnel chart to the front page
+ o [FUNNEL] Added horizontal alignment for labels
+
+ 25th April 1009
+ ===============
+ o [MISC] Changed to .zip format for archive instead of .tar.gz - easier to work with
+ o [MISC] Fixed issue with "expand" type tooltips & timers
+ o [MISC] Unified default gutter setting (25px)
+ o [MISC] Made shadows all point the same way across all graphs
+ o [MISC] Fixed horizontal background bars so that specifying a value greater than the ymax (or less than the negative ymax)
+ uses the ymax value instead
+ o [MISC] ModalDialog fixes for width and height settings on various browsers and DOM modes
+ o [MISC] Scale is now generated more accurately for *really* tiny values
+ o [LINE] Performance enhancements regarding scale generation
+
+ 11th April 2009
+ ===============
+ o [MISC] Slight aleration to improve "grow" option of tooltips. Instead of starting at the top and growing downwards, it now
+ starts in the center and grows outward in all directions
+ o [MISC] Changed "grow" to "expand" for tooltips
+ o [ODO] Documented ability to turn off the pointer end
+ o [DONUT] Added ring-in-ring effect, enabling multiple datasets
+ o [DONUT] Added option to use in-graph key instead of labels
+ o [LINE] Changed "tick" style tickmarks to "halftick". "tick" now gives a fullheight tickmark, and also added "endtick"
+ which gives a full height tick mark at the ends of the lines
+ o [MISC] Added doctype to all pages and fixed modaldialog accordingly
+ o [MISC] CSS and DTD fixes across the site
+ o [MISC] ModalDialog fixes
+ o [MISC] Add type attribute back to SCRIPT tags - needed for DTD compliance
+ o [HBAR] Added new graph type - Horizontal Bar chart
+
+ 28th March 2009
+ ===============
+ o [BAR] Added dot chart capability
+ o [BAR] When mouse is over a hotspot, cursor now changes
+ o [PIE] When mouse is over a hotspot, cursor now changes
+ o [LINE] When mouse is over a hotspot, cursor now changes
+ o [GANTT] When mouse is over a hotspot, cursor now changes
+ o [DONUT] When mouse is over a hotspot, cursor now changes
+ o [SCATTER] When mouse is over a hotspot, cursor now changes
+ o [MISC] Added new effect for tooltips. So now you can have "fade" (default) or "grow"
+ o [MISC] Added drop shadow to context menu
+ o [MISC] Resolved Chrome color, shadow and gradient bugs
+ o [DOCS] Added short section about suggested library layout
+ o [WEBSITE] Always now show two download links
+
+ 14th March 2009
+ ===============
+ o o------------------------------------------------------------------------------------------------------------------o
+ | IMPORTANT ! |
+ | Every single one of the property names has been changed to be a little more unified. The new format is now |
+ | "chart.xxx" where xxx is the actual name. Some of the names have been changed completely, eg. "chart.text.size", |
+ | which was formerly "textheight", whilst others only marginally. This was necessary to bring some semblance of |
+ | uniformity to the RGraph properties across all of the libraries, make it look a bit more "proffessional" and |
+ | provide plenty of scope for future properties. |
+ | |
+ | You should also note that as of this release (14th March 2009) that RGraph has been changed to use the canvas |
+ | text and shadow APIs. This may mean you needing to upgrade your browser if you want to use the latest version. |
+ | At the time of writing, this meant Firefox 3.1b2, Safari 4 and Chrome 2. If you don't wish to upgrade your |
+ | browser, or need Opera support, then you will need to remain on the 28th February 2009 version. |
+ o------------------------------------------------------------------------------------------------------------------o
+ o [FUNNEL] Added key ability to Funnel chart
+ o [FUNNEL] Added shadow for key
+ o [BAR] Added shadow for key
+ o [LINE] Added shadow for key
+ o [RADAR] Added shadow for key
+ o [TRADAR] Added shadow for key
+ o [RADAR] Added tick marks to the axes
+ o [PIE] Added border option.
+ o [BAR] Added "in graph" static labels, useful for highlighting things
+ o [LINE] Added "in graph" static labels, useful for highlighting things
+ o [MISC] Provided easy access to minified copies of the libraries
+ o [ODO] Added inner and outer shadows
+ o [BAR] Changed to canvas text & shadow API
+ o [BIPOLAR] Changed to canvas text & shadow API
+ o [DONUT] Changed to canvas text & shadow API
+ o [FUNNEL] Changed to canvas text & shadow API
+ o [GANTT] Changed to canvas text & shadow API
+ o [LED] Changed to canvas text & shadow API
+ o [LINE] Changed to canvas text & shadow API
+ o [ODO] Changed to canvas text & shadow API
+ o [PIE] Changed to canvas text & shadow API
+ o [PROGRESS] Changed to canvas text & shadow API
+ o [radar] Changed to canvas text & shadow API
+ o [SCATTER] Changed to canvas text & shadow API
+ o [TRADAR] Changed to canvas text & shadow API
+
+ 28th February 2009
+ ==================
+ o [MISC] Added performance information about onload
+ o [BAR] Can now specify Y axis units (both before and after the number)
+ o [LINE] Can now specify Y axis units (both before and after the number)
+ o [SCATTER] Can now specify Y axis units (both before and after the number)
+ o [PROGRESS] Can now specify Y axis units (both before and after the number)
+ o [BIPOLAR] Can now specify X axis units (both before and after the number)
+ o [BAR] Fixed scale bug
+ o [MISC] Added UK pound sign to font set
+ o [FUNNEL] Added new chart - Funnel chart. Can be used to represent sales processes
+ o [FUNNEL] Made funnel use canvas shadow API
+ o [MISC] Changed minification script to work "in-place" NOTE
+ o [PROGRESS] Made progress use canvas shadow API
+ o [MISC] Tested RGraph on Safari 4.0 - appears to be fine
+ o [LINE] Added ability to specify horizontal coloured bars
+ o [BAR] Added ability to specify horizontal coloured bars
+ o [SCATTER] Added ability to specify horizontal coloured bars
+
+ 14th February 2009
+ ==================
+ o [PIE] Added tooltips + updated docs to correspond
+ o [WEBSITE] Added tooltips to Pie on front page
+ o [LED] Added "counter-like" basic LED grid
+ o [DONUT] Made donut a proxy to pie chart
+ o [DONUT] Added tooltips
+ o [MISC] Moved CSS styles to scripts. You no longer need to define CSS styles unless you wish to override something
+ o [PIE] Made tooltips for pie use 3D effect. This is optional - it can be the traditional 2D or the new 3D effect
+ o [SCATTER] Can now have the X axis in the center
+ o [SCATTER] Added tooltip facility
+ o [MISC] Consolidated invoice handling
+ o [MISC] Minor fix to DOM structure of context menu
+ o [LINE] Can now have combined Line and Bar chart so you can overlay Line graphs on top of Bar charts
+ o [BAR] Can now have combined Line and Bar chart so you can overlay Line graphs on top of Bar charts
+ o [MISC] Moved showcase examples to separate pages - showcase.html was doing too much and becoming far too slow
+
+ 31st January 2009
+ =================
+ o [ODO] Added .beginPath() when starting to draw the Odo - needed for animation
+ o [MISC] Rewrote ModalDialog
+ o [GANTT] Corrected gantt chart docs
+ o [MISC] Context menu is now always the correct width
+ o [BAR] Added ability to specify X axis labels to be drawn at eith 45 or 90 degrees
+ o [LINE] Added ability to specify X axis labels to be drawn at eith 45 or 90 degrees
+ o [SCATTER] Added ability to specify X axis labels to be drawn at eith 45 or 90 degrees
+ o [BIPOLAR] Added tooltips
+ o [DOCS] Re-jigged (ever so slightly) docs index layout
+ o [DOCS] Added info on working with RGraph objects in conjunction with accessing the underlying
+ canvas/context objects
+ o [DONUT] Made sure the above was valid
+ o [PROGRESS] Made sure the above was valid
+
+ 17th January 2009
+ =================
+ o [MISC] Added licensing FAQ page including invoice mailer
+ o [MISC] Moved CSS to css subfolder
+ o [MISC] Renamed modaldialog and removed external fade library
+ o [MISC] Added example of how to integrate RGraph with external libraries using the ModalDialog
+ o [MISC] ymax property is no longer deprecated - it can be used to stop the scale changing when animating your graphs.
+ o [MISC] Added documentation page about animation
+ o [SCATTER] Added square tick type
+ o [PIE] Fixed last segments line width
+ o [MISC] Updated copyright notice
+ o [DOCS] Added basic example for implementation guidance
+ o [MISC] Changed test page to use tables instead of divs. This will make it more apparent if something breaks
+ in the RGraph.getMouseXY() function.
+ o [ODO] Changed to use 10 labels instead of 8 - should make for nicer scale values.
+ o [ODO] Made tick marks tie into labels more
+
+ 4th January 2009
+ ================
+ o [DOCS] Added note about pre-caching
+ o [SCATTER] Added color example to scatter chart
+ o [MISC] Fixed tooltips appearing in the wrong place
+ o [MISC] Removed tooltip shadow layer. Shadows are accomodated for in CSS3
+ o [DOCS] CSS class documentation
+ o [MISC] More work on things working with html5 doctype
+ o [MISC] Removed shadow layer from tooltips. This will be accomodated in CSS3, and is already by some browsers (MSIE (!), Chrome,
+ Safari, and the forthcoming FF 3.1)
+ o [MISC] Ditto for context menus
+ o [MISC] Changed RGraph.getMouseXY() to be more accomodating
+ o [WEBSITE] Added favicon.png
+ o [WEBSITE] Added example of pie chart to front page
+ o [WEBSITE] Changed front page to use tables instead of divs to tell if tooltips keep working
+ o [MISC] Overhauled RGraph.getMouseXY() so that it works in spite of being nested in tables. It also works
+ if you position the canvas absolutely and only specify one of the top or left. Wonderbar!
+ o [SCATTER] Added ability to specify the color of the tick ie:[x, y, color] It's optional. ** Could do with a key **
+ o [DOCS] Added color information
+ o [DOCS] Added context menu information
+ o [MISC] Made context menus more XP style
+ o [GANTT] Customised the example more, showing the completage indicators.
+ o [GANTT] Events and vertical bars are now defined in the usual way, by using the Set() method
+ o ]MISC] Added __object__ property to all graph objects
+ o [MISC] Unified text size at 10 points (and 2 greater for titles).
+ o [MISC] Added context menus to all graph types
+ o [MISC] Fixed tooltip widths on front page. And siving in general in Opera
+
+ 20th December 2008
+ ==================
+ o [MISC] Converted all graphs to use dollar ($) function in place of document.getElementById("...")
+ o [TRADAR] Now defaults to drawing the key out of graph
+ o [LINE] Now labels are turned off if there's fewer labels than data points (every line)
+ o [MISC] Added better smaller scales - now goes down to 0.0005
+ o [DOCS] Added more details on tooltips and positioning
+ o [LINE] Added gridwidth property
+ o [BAR] Added gridwidth property
+ o [MISC] Removed rotating text example (it's still in the archive - it's just not linked)
+ o [MISC] More work on scales when decimal values are involved, plus graphs now use thousand seperators to aid readability
+ o [MISC] More work on tooltips and their positioning.
+ o [MISC] Added "keyposition" option, which can be either "gutter" or "graph" and determines where the key is drawn
+ o [MISC] Unified all graphs to use the same "textheight" property for text.
+ o [MISC] All titles are now drawn two pixels larger than the "textheight" property
+ o [LINE] Key can now be placed above the actual graph area if desired
+ o [BAR] Key can now be placed above the actual graph area if desired
+ o [MISC] Fixes to number formatting, including when there multiple graphs on a page
+ o [BAR] Changed summary line to default to off
+ o [BIPOLAR] Scale values now contain thousand separators
+ o [SCATTER] Scale values now contain thousand separators
+ o [LINE] Scale values now contain thousand separators
+ o [BAR] Scale values now contain thousand separators
+ o [MISC] Updated issues.html with details of the smallest scales
+ o [SCATTER] Deprecated the ymax property. RGraph.getScale() is now good enough (xMax is bipolar chart equivalent)
+ o [LINE] Deprecated the ymax property. RGraph.getScale() is now good enough
+ o [BIPOLAR] Deprecated the xmax property. RGraph.getScale() is now good enough
+ o [BAR] Deprecated the ymax property. RGraph.getScale() is now good enough
+ o [MISC] Made RGraph.getScale() return the whole scale (all five values), not just the top value
+ This means better quality scales can be produced.
+ o [MISC] Made note about positioning in docs on issues page
+ o [ODO] Work on Small scale values
+ o [BIPOLAR] Work on Small scale values
+ o [BAR] Work on Small scale values
+ o [LINE] Work on Small scale values
+ o [MISC] Added tooltip fade in effect using CSS3 opacity
+ o [BAR] Added tooltip functionality to stacked bar chart
+ o [BAR] Added tooltip functionality to grouped bar chart
+ o [MISC] Added gradient to front page graphs
+ o [TRADAR] Added gradient to bipolar on test page
+ o [TRADAR] Re-added traditional radar chart. It doesn't work in Opera 9.x, only Opera 10+. Documentation for this also fine tuned
+ o [MISC] Tidied up RGraph.common.js
+ o [MISC] Removed drawTextAngle() - RGraph.Text() does this
+ o [MISC] Added a bar chart with centre X axis to example page
+ o [GANTT] Fixed Gantt chart title text placement
+ o [GANTT] Added title text size property
+ o [WEBSITE] Changed colour of example on website
+ o [RADAR] Changed key to be the same as the bar/line/tradar
+ o [DOCS] Lots of link updates
+
+ 5th December 2008
+ =================
+ o [LINE] Made keys and lines (ie stacked/filled) totally correspond.
+ o [BAR] Stopped bar chart tooltips redrawing the axes. Not entirely sure why it's doing this, but it seems fine without it.
+ o [DOCS] Bundled license document with archive
+ o [DOCS] Documentation and example updates.
+ o [MISC] Changed index.php to index.html Not earth shattering, but should make it clearer for people where to start,
+ and also makes the downloaded index.html styled as it should be.
+ o [WEBSITE] Added Cache-Control: Header
+ o [WEBSITE] Added link to support group on Google more obvious
+ o [DOCS] Added list of common issues
+ o [MISC] Added header into files that didn't have it
+ o [MISC] Removed CanvasText.enable() - unneccessary
+ o [ODO] Shortened the Odos pointer
+
+ 28th November 2008
+ ==================
+ o [MISC] Got rid of HTML5 doctypes - they seem to be interfering with tooltip positioning.
+ If you don't use tooltips, you'll therefore be fine.
+ o [ODO] Better needle. I think.
+ o [BAR] Keys for charts are now specified in the same order as the pertaining datasets
+ o [LINE] Keys for charts are now specified in the same order as the pertaining datasets
+ o [MISC] Added CSS3 shadows to tooltips
+ o [GANTT] Fixed bug in Gantt chart textsize property
+ o [LINE] Finally made shadows 100% accurate (ie tickmarks now have shadows too), including stepped line
+ o [WEBSITE] Added tooltips to line chart on front page
+ o [MISC] Fixed release script (check)
+ o [LINE] Added keys to line & bar chart
+ o [BAR] Added keys to line & bar chart
+ o [MISC] o-----------------------------------------------------------------------------------------------------o
+ | Use unified better getters/setters for all charts. This is a MAJOR update, since it affects all the |
+ | charts in a fundamental way. For the better. Any update should be done cautiously. But since |
+ | RGraph is beta, all updates should be done that way. Judging by the RGraph test page though, |
+ | everything seems fine. |
+ o-----------------------------------------------------------------------------------------------------o
+
+ 15th November 2008
+ ------------------
+ o [BAR] Removed animation
+ o [LINE] Documented stepped line chart
+ o [LINE] Fixed tick marks
+ o [LINE] Added ability to specify line chart as being stepped
+ o [MISC] Documented default values.
+ o [GANTT] Added gantt chart
+ o [PROGRESS] Corrected name of Progressbar
+ o [LINE] Moved the background drawing to RGraph.common.js
+ o [SCATTER] Moved the background drawing to RGraph.common.js
+ o [MISC] Tooltips now move to the left of the cursor when it's too far right
+ o [MISC] Changed print_r() to pr() - less to type
+ o [MISC] Added GetDays() function for Gantt chart
+ o [GANT] Added it
+ o [MISC] Added an RGraph.print_r() method for easier debugging
+ o [MISC] Added a registry object to the common library to resolve scoping issues and so we don't need to use globals. Globals suck.
+ o [SCATTER] Added a plus tick style to the scatter chart - added a demo too
+ o [SCATTER] Fixed a bug in the Scatter graphs background drawing
+ o [BAR] Moved bar charts DrawBackground() into the RGraph.background class. Should make reuse far easier.
+ o [BAR] "backgroundGrid" property changed to "grid"
+ o [MISC] Added a minification script. This script doesn't reduce the scripts to the bare minimum. But it can take 50% off the size (!).
+ o [LINE] Can now specify colour of shadows for line and bar graphs
+ o [BAR] Can now specify colour of shadows for line and bar graphs
+ o [LINE] line chart now has real shadows and so they can be used for lines of any thickness
+ o [LINE] can now specify shadow offset
+ o [SCATTER] Fixed background bar boundaries
+ o [SCATTER] Added plus cross type
+ o [MISC] Moved background drawing to common library
+ o [WEBSITE] sitemap.xml Now has correct date which changes correctly when a release is performed CHECK
+ o [MISC] Tooltip nows store the text in __text__ variable on the tooltip object (.innerHTML changes the HTML when it's set)
+
+ 1st November 2008
+ ------------------
+ o [BAR] Last bar chart example now uses a gradient
+ o [MISC] Changed hyphens to be slightly shorter
+ o [WEBSITE] Changed sitemap to use an update frequency of weekly. Last modified is now updated when a release is performed
+ o [BAR] Can now specify the grid size on the bar chart
+ o [LINE] Setting propeties can now be any case, upper or lower
+ o [MISC] Added RGraph.print_r() function
+ o [LINE] TickSize now actually has an effect
+ o [LINE] Added tooltips to line chart
+ o [WEBSITE] Moved support forum to Google group
+ o [MISC] Added object registration (for redrawing)
+ o [BAR] Removed margin from being accounted for in height calculation
+ o [LINE] Made tickmarks more coherent
+ o [BAR] Bar chart now uses canvas ID in some, but not all, error messages
+ o [LINE] Added small drop shadow to line chart
+ o [WEBSITE] Added example graphs to front page
+ o [BAR] Added tooltips to line chart
+ o [WEBSITE] Added more performance related information
+ o [PIE] Added drop shadow
+
+ 25th October 2008
+ -----------------
+ o [DOCS[ Added integration section
+ o [RADAR] Added title to radar
+ o [RADAR] Added textStyle to radar
+ o [PIE] Made one of the pie charts use a gradient
+ o [PROGRESS] Added shadows
+ o [PROGRESS] Added title
+ o [ODO] Converted plain colour to radial gradient
+ o [PIE] Added gutter and title
+ o [DONUT] Added gutter and title
+ o [MISC] Fixed comma issue with rendering text
+ o [MISC] Added something to text bounding box illustrating exactly where the point specified is
+ o [BIPOLAR] Bipolar middle bit is now 60px wide instead of 50
+ o [BAR] Fixed shadow bugettee in Safari, Chrome, Opera
+ o [ODO] Documented and vastly improved. Made it use a gutter now allowind for a title (implemented)
+ o [MISC] Added common function, DrawTitle()
+ o [MISC] Added a Javascript version of the PHP function range()
+ o [MISC] Added ability to specify a title to the bar chart, line graph and scatter graph.
+ o [MISC] Changed directory layout slightly
+ o [MISC] Forum is now ecluded from the tar
+ o [MISC] Much improved scale auto-generation
+ o [DOCS] Added code samples to docs pages
+ o [DOCS] Added section on the front page about performance
+ o [SCATTER] Many improvements to the scatter graph
+ o [SCATTER] Much better auto scale generation
+ o [SCATTER] Made scatter use RGraph common library for text
+ o [RADAR] Converted to use common library for text
+ o [LINE] Much improved scale auto-generation
+ o [LINE] Changed to rounded line ends - not very noticable though
+ o [LINE] Converted labels to be drawn by the RGraph library
+ o [BAR] Added optional shadow effect
+ o [BAR] Removed ability to have X axis at the top. It served no real purpose and only served to complicate the code
+ o [BAR] Added animation
+ o [BAR] Much improved scale auto-generation
+ o [BAR] Converted text functions to use RGraph common library
+ o [BAR] Can now specify a title for the bar chart
+ o [BAR] Fixed a bug for Chrome
+ o [BAR] Fixed minor bugs in bar chart (background bars)
+ o [BAR] Added grouping property, which defaults to stacked, but can also be grouped, producing what you would
+ expect (unless you're expecting a chicken.
+ o [BAR] Added a few warnings concerning bad combinations of axis positions
+ o [ODO] Added more labels, now at 8 instead of 4
+
+ 24th September 2008
+ -------------------
+ o [WEBSITE] Added RSS feed to forum
+ o [DOCS] Added more documentation
+ o [ALL] Unified (sort of) the error messages
+ o [ODO] Added odometer
+ o [BIPOLAR] Added a bottom gutter for scale to go in
+ o [BIPOLAR] Added bottom text labels
+ o [PIE] Made pie chart work without translating
+ o [TRADAR] Added real radar chart.
+ o [BAR] Bar chart can now have the X axis in the center, so it now able to represent negative values
+ o [LINE] Allowed multiple lines
+ o [LINE] Line chart can now have the X axis in the center, so it now able to represent negative values
+ o [LINE] Fixed bug in line chart that meant if it was filled the filled line was stopping too short
+ o [LINE] Made it more obvious (I think) for specifying data when using multiple data sets (ie multiple lines)
+
+ 4th September 2008
+ ------------------
+ o Various additions including labels on all the graphs
\ No newline at end of file
diff --git a/RGraph/docs/adjusting.html b/RGraph/docs/adjusting.html
new file mode 100644
index 0000000..aa49251
--- /dev/null
+++ b/RGraph/docs/adjusting.html
@@ -0,0 +1,244 @@
+
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - Adjusting your graphs interactively
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
RGraph: HTML5 canvas graph library - Adjusting your graphs interactively
+
+
+
+
+
+
+
+
+
+
+
+
+ Since 24th May 2010 you have had the ability to adjust your graphs interactively. Currently the Bar chart, Line chart,
+ Progress Bar, Rose chart and the Tradar have this facility. Some graph types use multiple event handlers and as such
+ are unlikely to work well with other dynamic features. The Line chart is an example of this, and whilst it does work
+ with the context menu (and so the full canvas zoom), it is unlikely to work with other dynamic features.
+
+
+
+
+ At the current time this feature on the Bar and Line charts don't work with X axis in the center.
+
+
+
+
+ If your intention is to make some sort of interactive console, new HTML5 input types may also be of interest (for example the new range input type
+ which gives you a "slider bar"). Eg (Chrome/Safari/Opera):
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/RGraph/docs/animation.html b/RGraph/docs/animation.html
new file mode 100644
index 0000000..71669dd
--- /dev/null
+++ b/RGraph/docs/animation.html
@@ -0,0 +1,313 @@
+
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - Animating your graphs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
RGraph: HTML5 canvas graph library - Animating your graphs
+
+
+
+
+
+
+
+
+ Animating your graphs is a relatively easy affair, whilst not being supported natively as it would only serve to
+ over-complicate the RGraph libraries. The way to do it is to use
+ the function RGraph.Clear(canvas), passing it your canvas object that is returned by
+ document.getElementById(). By default this will cover the canvas in white. You can change this by
+ passing it the color you want it to use as the second (optional) argument. You could even use a gradient if
+ you wanted. Then you can simply redraw the entire graph.
+
+
+
+ One thing you should note, is that you may have to specify the scale manually, to prevent it from changing
+ from frame to frame. This can be done by using the chart.ymax property.
+
+
+
+ You can review the source of this page if you need further help. Two global variables are set - the number of frames
+ and the current frame number (which starts at one). The graphs are then drawn with appropriate data
+ (ie the data multiplied by the frame number over the total number of frames). If the frame number is less than
+ the total number of frames, the frame number is incremented and the function (window.onload) is called again
+ after a small delay.
+
+
+
Animation using jQuery
+
+
+
+
+
+
+
+
+
+
+ You can if you prefer use an external library for animation, like jQuery.
+
+
+
+ The graph to the right is animated using
+ jQuery. In the example the width is maintained by placing the canvas within a DIV which has the width/height CSS
+ attributes set.
+
RGraph: HTML5 canvas graph library - Annotating your graphs
+
+
+
+
+
+
+
+
+ The annotations feature brings presentation style functionality to RGraph graphs. You can use this feature
+ for highlighting your graphs if you need to.
+
+ Enabling annotations is a very simple affair, and consists of doing the following:
+
+
+
myGraph.Set('chart.annotatable', true);
+
+
+
Browser support
+
+
+ Annotations are supported in all browsers that RGraph works with - Firefox 3.5+, Chrome 2+, Safari 4+, Opera 10.5+ and
+ MSIE/Google Chrome Frame. They DO NOT however work with MSIE 8/ExCanvas.
+
+
+
+
What can I use annotations for?
+
+
+ As mentioned you can use it for presentations, highlighting things to yourself or others or just to have fun drawing (!).
+
+
+
+
Are annotations persistent?
+
+
+ That depends on which browser you're using. The annotation data is stored in the users web browser (not on the web server),
+ meaning currently (21st March 2010) browser support is limited to Firefox 3.5+, Safari 4+,
+ Chrome 4+ and Opera 10.5+. MSIE 8 also has the required storage capabilities, but since it doesn't yet support canvas, the point is moot.
+ The user does not have to
+ confirm anything for storage to be allowed - try it out on this page by drawing on the graph and then refreshing the page.
+
+
+
+
How do I show the mini-palette?
+
+
+
+ You can show the palette by using the RGraph.Showpalette function shown below as a context menu item:
+
+ This code will result in the same context menu as the graph above.
+
+
+
+
How can I clear the annotations?
+
+ You can simply clear the graph and redraw it:
+
+
RGraph.Clear(myGraph.canvas); // Clear the graph
+myGraph.Draw(); // Redraw it
+
+
+ In the graph above, there is a context menu that allows you to both clear the graph and also demonstrates the mini-palette
+ feature available to you.
+
+
+
+
Replaying annotations when they're off
+
+
+ When annotations are not enabled, any prior annotations that may have been made are not displayed. To show them you need
+ to use the API function RGraph.ReplayAnnotations(object) after the call to .Draw().
+
+
+
\ No newline at end of file
diff --git a/RGraph/docs/api.html b/RGraph/docs/api.html
new file mode 100644
index 0000000..c6a94f2
--- /dev/null
+++ b/RGraph/docs/api.html
@@ -0,0 +1,835 @@
+
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - API documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Working with RGraph objects is purposefully easy, to make them straight forward to integrate into your own scripts if you want to. For any
+ particular graph type there are a few files required - the common libraries and the graph specific library. Eg:
+
+ RGraph.common.core.js is a function library that contains a large set of functions that support the graph classes.
+ Some functions, and sets of functions, have their own files. For example, the zoom functions reside in RGraph.common.zoom.js,
+ so if you don't need zoom, you don't need this file.
+ Each of the graph libraries (RGraph.*.js) contains that particular graphs class. If you'd like to see a "bare bones"
+ implementation, you can look at the basic example. There's also a
+ skeleton example to make it easier to create new graph types.
+
+
+
+
Canvas and context references
+
+
+ Each graph object maintains references to the context and canvas as properties. So to get hold of them all you
+ need to do is this:
+
+
+
+<script>
+ window.onload = function ()
+ {
+ // 1/2 First draw the chart
+ var myBar = new RGraph.Bar('myCanvas', [1,5,8,4,6,3,1,5,7,8,4,6]);
+ myBar.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+ myBar.Draw();
+
+ // 2/2 Now get hold of the references
+ var context = myBar.context; // Get hold of a reference to the context
+ var canvas = myBar.canvas; // Get hold of a reference to the canvas
+ }
+</script>
+
+
+
+
Working with events
+
+
+ When working with events, you may come across the situation where you have a reference to the canvas, but
+ also need to access the graph object. For this reason the constructor of each object adds a reference to the object to the
+ canvas and you can access it like this:
+
+
+
+<script>
+ document.getElementById("myCanvas").onclick = function (e)
+ {
+ var src = (RGraph.isIE8() ? event.srcElement) : e.target;
+
+ // The RGraph object constructors add __object__ to the canvas.
+ var myBar = src.__object__;
+ }
+</script>
+
+
+
+
Working with graph coordinates
+
+
+ For most graph types, the coordinates of elements (eg bars, lines etc) are to be found in the class variable obj.coords.
+ This is usually a multi-dimensional array consisting of the coordinates of those shapes, or of points. As an example the bar
+ chart maintains the X, Y, width and height of each bar (or sections of bars in a stacked bar chart). The coords array is
+ usually a flat array, even when you have multiple sets of data.
+
+
+
+ By using the RGraph.getMouseXY() function and this array you can determine if a bar was clicked on, or if the mouse is near a
+ line point etc.
+
+
+
+var myCoords = myBar.coords;
+
+
+
+ Note: Previously the coords array values sometimes included the margin values, and sometimes didn't. As of 17th
+ April 2010 the values have all been unified to not include the margin values, so the values are as reported.
+
+
+
+
Working with graph data
+
+
+ Another variable you may need is the data variable. For most graph types, this is where the data is stored. It is usually
+ untouched, so it is as you supplied to the graph objects constructor. A notable exception to this is filled line charts.
+ Here the original data is stored in the class variable original_data. The data supplied is modified to produce the stacking
+ effect. If you need to modify a filled line charts data you will need to change this variable instead.
+
+
+
+ Not all graph types use the data variable. For some the name is different so that it makes a little more sense. The
+ graph types and their associate data variables are listed below1.
+
For the Scatter chart, each data point is an array of X/Y coordinates, the color and the tooltip for that point.
+
+ The Line chart obj.original_data is an aggregation of all the datasets given to the Line chart, so the first
+ dataset is held in obj.original_data[0], the second in obj.original_data[1] etc.
+
+
+
+
+
Updating your graphs dynamically
+
+
+ Note:
+ It is important that you're careful with types when making AJAX requests. Since the response is initially a string,
+ and your AJAX function/library may not do conversions for you, you may need to convert these strings to numbers. To
+ do this you can use the Number() or parseInt() functions. For example:
+
+
+
+<script>
+ num = Number('23');
+ num = parseInt('43');
+</script>
+
+
+
+ A common request is to be able to update graphs dynamically. This is quite simple and consists of three steps:
+
+
+
+
Get the new data from the server (with an AJAX request for example).
+
Set the data in your graph object. See the above table for the appropriate property to use.
+
Call the .Draw() method again.
+
+
+
+ If you don't need to get data from your server (ie it's all client-side) then you can omit the first step. Also, it may be
+ sufficient to simply recreate the entire object from scratch. This means that you won't have to alter and
+ RGraph internal properties - just recreate the graph object and configuration. There's a simple function
+ you can use for AJAX purposes here.
+
+
+
+
+
Setting properties
+
+
+ To set RGraph properties, ideally you should use each objects setter (there's also a corresponding getter). These functions
+ accomodate some backwards compatibility changes, so by not using them you run the risk of your graphs not working entirely as
+ expected.
+
+ RGraph stores various references to objects on the canvas (typically) to make getting hold of them easier. There's also a
+ Registry object in
+ which references are stored. Typically the objects are named with the format __xxx__, and you can inspect the
+ objects by using a console(eg the inspector that's part of Google Chrome - CTRL+SHIFT+J). Some examples are:
+
+
+
+
__object__ on the canvas - a reference to the graph object
+
+ RGraph.Registry.Get('chart.tooltip') - a reference to the currently visible tooltip. This in turn has the following
+ available:
+
+
__text__ - Since setting .innerHTML can cause changes in HTML, this is the original tooltip text.
+
__index__ - This is the numerical index corresponding to the tooltips array that you set.
+
__dataset__ - Used in the Scatter chart and corresponding to the dataset.
+
__canvas__ - A reference to the original canvas that triggered the tooltip.
+
+
+
+ RGraph.Registry.Get('chart.mousedown') - Used in annotating, and stipulates whether the mouse button is currently
+ pressed.
+
+
+ RGraph.Registry.Get('chart.contextmenu') - The currently shown context menu, if any. This in turn has the following
+ properties:
+
+
__canvas__ - The original canvas object.
+
+
+
+
+ These are just a sample of what's available, to find more you should use an introspection tool, look at the source, or ask
+ on the support mailing list.
+
+
+
+
+
Scale information
+
+ For the Bar, Bipolar, HBar, Line and Scatter charts the scale that is used is stored in the scale class variable. Eg:
+
+
+
+<script>
+ var myBar = new RGraph.Bar('cvs', [56,43,52,54,51,38,46,42,52]);
+ myBar.Draw();
+
+ var myScale = myBar.scale
+</script>
+
+
+
+
Adding text to your graphs
+
+ If you want to add arbitrary text to your graph(s) you can use the API function RGraph.Text().
+
+
+
+<script>
+ // Draw a basic graph
+ var myObj = new RGraph.Bar('myCanvas', [4,5,5,8,7,6,4,8,5,9]);
+ myObj.Draw();
+
+ // Draw some text
+ myObj.context.beginPath();
+ size = 12;
+ font = 'Verdana';
+ text = 'Some text!;
+ x = 10;
+ y = 10;
+
+ RGraph.Text(myObj.context, font, size, x, y, text);
+ myObj.context.fill();
+</script>
+
+
+
+
RGraph functions
+
+
+ This is a list of some of the functions available to you in the RGraph common libraries.
+ It's not every single one that's available, but is a list of the common ones that you're likely to want to use. Arguments
+ in square brackets are optional.
+
(number) RGraph.array_max(array) Returns the maximum value in the array. File: RGraph.common.core.js
+
(number) RGraph.array_sum(array) Returns the sum of all values in the array. You can also pass a single integer, in which case it is simply returned as-is. File: RGraph.common.core.js
+
(array) RGraph.array_clone(array) Creates a copy/clone of the given array. Only numerically indexed arrays are supported. File: RGraph.common.core.js
+
(array) RGraph.array_reverse(array) Returns a reversal of the given array. File: RGraph.common.core.js
+
(boolean) RGraph.is_array(obj) Returns true or false as to whether the given object is an array or not. File: RGraph.common.core.js
+
(array) RGraph.array_pad(array, length[, value]) Pads the given array to the specified length (if the length is less, if not the array is returned as is). The third, optional, argument is the value which is used as the pad value. If not specified, null is used. File: RGraph.common.core.js
+
(array) RGraph.array_shift(array) Shifts an element off of the start of the given array and returns the new array. File: RGraph.common.core.js
+
+
+
+
Strings
+
+
+
(string) RGraph.rtrim(string) Strips the right hand white space from the string that you pass it. File: RGraph.common.core.js
+
+ (string) RGraph.number_format(obj, number[, prepend[, append]])
+ This formats the given number (which can be either an integer or a float. The prepend and append variables are
+ strings which are added to the string (eg 5%).
+ Note:As of 5th September 2010 this functions argument list has been changed to include the graph object, as shown above.
+ File: RGraph.common.core.js
+
+
+
+
+
Numbers
+
+
+
(number) RGraph.random(min, max) Returns a random number between the minimum and maximum that you give. File: RGraph.common.core.js
+
(string) RGraph.number_format(number[, prepend[, append]]) See above. File: RGraph.common.core.js
+
+
+
+
Miscellaneous
+
+
+
+ (object) RGraph.FixEventObject(event) Pass this function an event object and it will attempt to "fill in" the missing properties (depending on the browser).
+ It tries to add:
+
+
+
pageX (MSIE)
+
pageY (MSIE)
+
target (MSIE)
+
stopPropagation() (MSIE)
+
offsetX (FF)
+
offsetY (FF)
+
+ File: RGraph.common.core.js
+
+
+
(null) RGraph.OldBrowserCompat(context) This function "fills in" any required functions that some browsers don't have. At the moment this consists of adding the measureText() and fillText() functions to the context when they're missing (usually this means older versions of Opera). File: RGraph.common.core.js
+
(number) RGraph.GetDays(date) This returns the number of days in the given month. The argument should be a Date object. File: RGraph.common.core.js
+
(null) RGraph.pr(mixed) Emulates the PHP function print_r() by recursively printing the structure of whatever you pass to it. It handles numbers, strings, arrays, booleans, functions and objects. File: RGraph.common.core.js
+
(null) p(mixed) An alias of the above albeit far shorter to type. File: RGraph.common.core.js
+
(null) cl(mixed) A shortcut for the Firebug and Google Chrome debug function console.log(). File: RGraph.common.core.js
+
(null) RGraph.Clear(canvas[, color]) Clears the canvas by drawing a white (or the optional color you give) rectangle over it. File: RGraph.common.core.js
+
+ (null) RGraph.ClearAnnotations(id) This function clears the annotation data associated with the given canvas ID (but DOES NOT redraw the graph). If you want to clear the visible annotations too, you will need to redraw the canvas. You could do this using the following code:
+
+
+function ClearAndRedraw (obj)
+{
+ RGraph.Clear(obj.canvas); // This function also calls the RGraph.ClearAnnotations() function
+ obj.Draw();
+}
+ File: RGraph.common.annotatate.js
+
+
(null) RGraph.ReplayAnnotations(object) This function redraws any annotations which have previously been drawn on the canvas. You would use this function when annotations are turned off and you want previous annotations to be displayed. File: RGraph.common.annotate.js
+
(array) RGraph.getMouseXY(event) When passed your event object, it returns the X and Y coordinates (in relation to the canvas) of the mouse pointer. (0,0) is in the top left corner, with the X value increasing going right and the Y value increasing going down. File: RGraph.common.core.js
+
(array) RGraph.getCanvasXY(event) Similar to the above function but returns the X/Y coordinates of the canvas in relation to the page. File: RGraph.common.core.js
+
(number) RGraph.degrees2Radians(number) Converts and returns the given number of degrees to radians. 1 radian = 57.3 degrees. File: RGraph.common.core.js
+
(array) RGraph.getScale(max, obj) Given the maximum value this will return an appropriate scale. The second argument is the graph object. File: RGraph.common.core.js
+
(mixed) RGraph.Registry.Get(name) In conjunction with the next function, this is an implementation of the Registry pattern which can be used for storing settings. File: RGraph.common.core.js
+
(mixed) RGraph.Registry.Set(name, value) In conjunction with the previous function, this is an implementation of the Registry pattern which can be used for storing settings. File: RGraph.common.core.js
+
(null) RGraph.Register(object) This function is used in conjunction with the next to register a canvas for redrawing. Canvases are redrawn (for example) when tooltips or crosshairs are being used. File: RGraph.common.core.js
+
+
+ (null) RGraph.Redraw([id, [color]]) This function is used in conjunction with the previous to redraw a canvas. Canvases are redrawn (for example) when tooltips or crosshairs are being used.
Note: All canvases that are registered are redrawn. However the optional first argument can be an ID (a string) of the canvas that is NOT to be redrawn. The optional second argument is the color to use when clearing canvases. File: RGraph.common.core.js
+
+
+
(null) RGraph.SetShadow(object, color, offetX, offsetY, blur) This function is a shortcut function used to set the four shadow properties. The arguments are: your graph object, the shadow color, the X offset, the Y offset, the shadow blur. File: RGraph.common.core.js
+
(null) RGraph.NoShadow(object) This function is a shortcut function used to "turn off" the shadow. The argument is your graph object. File: RGraph.common.core.js
+
(array) RGraph.getSegment(event) This function can be used with the Pie (including the donut variant) and Rose charts to get segment information when the canvas is clicked on (or the mouse is moved). It returns an array consisting of:
The center X coordinate
The center Y coordinate
The radius
The start angle (in degrees)
The end angle (in degrees)
Angles are measured starting from the "east" axis. File: RGraph.common.core.js
+
+ (number) RGraph.Async(mixed[, delay]) This is a simple function but has significant implications on your pages performance. You
+ can pass this either a function pointer, or a string containing the code to run and it will run the code asynchronously (ie in
+ parallel to the page loading). In doing so it can mean that your page is displayed faster, as the graph is created
+ seperate to the page loading. As such, the placement of your canvas tag becomes more important. What you can do is
+ define the canvas tag and then the code to produce the graph immediately after it. This is how the front page is coded,
+ (but not using the RGraph.Async() function).
+ There's an example of it here. The optional delay argument is measured in milliseconds
+ (1 second = 1000 milliseconds) and defaults to 1. What you can do is specify something like 1000 to make the effect
+ more pronounced to ensure it's working as expected.
+
+
+ Note: Since a dev release of version 4, Google Chrome versions 4 and 5 have an issue with rendering text when using
+ the RGraph.Async() function. The solution here is to simply not use the RGraph.Async() function.
+
+ File: RGraph.common.core.js
+
+
+
+ (null) RGraph.filledCurvyRect(context, x, y, width, height[, radius[, curvy top left[, curvy top right[, curvy bottom right[, curvy bottom left]]]]])
+ This draws a rectangle with curvy corners. Similar to the built in rectangle functions, and you can control
+ individual corners. The radius controls the severity of the corner curvature and defaults to 3. By default all
+ the corners are curvy. File: RGraph.common.core.js
+
+
+
+ (null) RGraph.strokedCurvyRect(context, x, y, width, height[, radius[, curvy top left[, curvy top right[, curvy bottom right[, curvy bottom left]]]]])
+ This draws a rectangle with curvy corners. Similar to the built in rectangle functions, and you can control
+ individual corners. The radius controls the severity of the corner curvature and defaults to 3. By default all
+ the corners are curvy. File: RGraph.common.core.js
+
+
+
+
+
Custom RGraph event related functions
+
+
+
(null) RGraph.AddCustomEventHandler(object, event, callback) This attaches a function to the spacified event. The object argument is your graph object, the event argument should be the name of the event, eg ontooltip, and the function argument is your function which handles the event. File: RGraph.common.core.js
+
(null) RGraph.FireCustomEvent(object, event) This fires a custom event. The object is your graph object, and the name is a string specifying the name of the event. File: RGraph.common.core.js
+
+
+
+
Other
+
+
+ These are functions which are less generic, and used to build the graphs. You may still wish to use them however.
+
+
+
+
(null) RGraph.lineByAngle(context, x, y, angle, length) This function draws a line from the given X and Y coordinates at the specified angle. File: RGraph.common.core.js
+
+
+ (null) RGraph.Text(context, font, size, x, y, text[, valign[, halign[, border[, angle[, background[, bold[, indicator]]]]]]])
+ This function acts as a wrapper around the canvas text functionality. The arguments are:
+
+
+
The context is the canvases 2D context.
+
The font is the name of the font you want to use (eg Arial).
+
The size is an integer specifying the size of the text, (measured in points).
+
The x and y arguments are the X/Y coordinates at which to draw the text.
+
The text argument is the text to draw.
+
The optional valign argument is the vertical alignment and can be either top, center or bottom.
+
The optional halign argument is the horizontal alignment and can be left, center or right.
+
The optional border argument is a boolean (true or false) controlling whether the text has a border.
+
The optional angle argument specifies the angle at which the text is drawn (rotated around the X/Y coordinates and measured in degrees).
+
The optional background argument is the color of the background, (eg #fff).
+
The optional bold argument is boolean which controls whether the text is bold or not.
+
And the optional indicator argument is a boolean which controls whether a placement indicator is shown.
+
+
+ File: RGraph.common.core.js
+
+
+
+
(null) RGraph.DrawTitle(canvas, text, gutter[, centerx[, size]]) This function draws the title. The centerx argument is the center point to use. If not given the center of the canvas is used. File: RGraph.common.core.js
+
(null) RGraph.Tooltip(canvas, text, x, y, idx) This function shows a tooltip. The idx value corresponds to the tooltip array that you give. File: RGraph.common.tooltips.js
+
(null) RGraph.DrawKey(object, key, colors) This function draws the key. The first argument is the graph object, the second is an array of key information and the last is an array of the colors to use. File: RGraph.common.core.js
+
(null) RGraph.DrawBars(object) This draws the horizontal background bars. The argument is the graph object. File: RGraph.common.core.js
+
(null) RGraph.DrawInGraphLabels(object) This draws the in-graph labels. The argument is the graph object. File: RGraph.common.core.js
+
(null) RGraph.DrawCrosshairs(object) This function draws the crosshairs. The argument is the graph object. File: RGraph.common.core.js
+
(null) RGraph.HideContext() This function clears the context menu. RGraph uses it to hide the context menu, but only AFTER your function/callback is run. You may wish to hide the context menu before your own function, in which case you can call this function. File: RGraph.common.context.js
+
+ (null) RGraph.showPNG([canvas[, event]])
+ This function allows you to easily facilitate getting a PNG image representation of your graph.
+ You can use it like this:
+
+
+ Optionally, you can pass in the canvas as an argument which will be used, meaning now you do not have to use a
+ context menu (there's an example here). It WAS originally designed to be used with a context menu, hence it's part of the RGraph.core.context.js
+ file.
+ File: RGraph.common.context.js
+
+
+
+
+ (number) RGraph.getGutterSuggest(obj, data)
+ This function returns a suggested gutter setting based on the vertical labels. If the bottom labels are larger, this
+ setting may be inappropriate. The data variable is a simple single dimension array, eg [1,2,3,4,5].
+
+
+ (boolean) RGraph.isIE8()
+ This function tests the useragent for MSIE8.
+ File: RGraph.common.core.js
+
+
+
+
+ (boolean) RGraph.isIE8up()
+ This function tests the useragent for MSIE8 or higher.
+ File: RGraph.common.core.js
+
+
+
+
+ (boolean) RGraph.isIE9()
+ This function tests the useragent for MSIE9.
+ File: RGraph.common.core.js
+
+
+
+
+ (boolean) RGraph.isIE9up()
+ This function tests the useragent for MSIE9 or higher.
+ File: RGraph.common.core.js
+
+
+
+
+ (null) RGraph.background.Draw(obj)
+ This function is used by the Bar, Gantt, Line and Scatter chart to draw the chart background (but not the axes).
+ It is passed the graph object which it uses to get the properties it uses:
+
+
+
+
+
chart.gutter
+
chart.variant
+
chart.text.size
+
chart.text.font
+
chart.title
+
chart.title.yaxis
+
chart.background.barcolor1
+
chart.background.barcolor2
+
chart.background.grid
+
chart.background.grid.autofit
+
+
+
+
+
chart.background.grid.autofit.numhlines
+
chart.background.grid.autofit.numvlines
+
chart.background.grid.hlines
+
chart.background.grid.vlines
+
chart.background.grid.hsize
+
chart.background.grid.vsize
+
chart.background.grid.width
+
chart.background.grid.color
+
chart.background.grid.color
+
+
+
+
+
+
+
+
+
+
+ Note that this function also calls RGraph.DrawTitle() in order to draw the title.
+ File: RGraph.common.core.js
+
+
+
+
+
+
+
+
+
The skeleton file
+
+ The skeleton object
+ (RGraph.skeleton.js) gives you a base for creating new graph types that
+ match the RGraph object system (eg getters, setters, RGraph names etc). Example usage of the skeleton object would be:
+
+
+
+<script>
+ var myObj = new RGraph.Skeleton('cvs', [3,3,4,5,3,8,3,2,1,9]);
+ myObj.Set('chart.colors', ['red']);
+ myObj.Draw();
+
+ var colors = myObj.Get('chart.colors');
+</script>
+
+
+
+
Questions
+
+
+ If you have a question regarding the API, you can ask it on the
+ mailing list
+
+
+
+
+
+ These images are here to pad the page and slow down loading so that the window.onload event is slowed. This makes the
+ difference far more visible.
+
+
+
+
+
+
+
+ Asynchronous processing can speed up the display of your graphs, because the browser gets to your code, sets it
+ going and then continues on rendering the page. Particularly if you have a weighty page,
+ it can make quite a difference. The RGraph.Async() function itself is very simple, but because it can make
+ a significant difference to the speed of your page, it is documented here. There's an example of it to the right.
+ One thing to remember is to ensure your canvas tag is defined first before you set the function that creates
+ the graph going.
+
+
+
+ Although asynchronous processing can speed up your pages, it can also give the appearance of slower pages due to partial
+ rendering, (ie your pages render a bit at a time). You therefore will need to experiment to get the best result for you.
+
All your libraries must be loaded first. In the pages <head> for example. If not, you won't be able to create your graphs.
+
Your <canvas> tag must be defined before setting the asynchronous code going. If not, then the canvas may be referenced before it exists, and thus your graphs will not be created.
+
+ The users connection speed may be a factor. Slower connections may mean, for example, that the onload event doesn't fire very
+ quickly. If you're using the onload event to create your graphs then asynchronous creation instead may give you more
+ apparent speed ups. Alternatively, careful placement of the <canvas> tag and the code that creates the graph may suffice
+ instead.
+
+
Since the MSIE/ExCanvas combo requires you to use the window.onload event, aynchronous graph creation in this case will probably not be any help.
+
+ Since a dev release of version 4, Google Chrome has had an issue when aynchronous processing is used, meaning that
+ text isn't always displayed. The solution here is simply to not use asynchronous processing. As of 27th March 2010,
+ Chrome 5 appears to be fine.
+
+
+
+
See also
+
+ You might also be interested in the alternative, DOMContentLoaded event.
+
+
+
\ No newline at end of file
diff --git a/RGraph/docs/bar.html b/RGraph/docs/bar.html
new file mode 100644
index 0000000..55df870
--- /dev/null
+++ b/RGraph/docs/bar.html
@@ -0,0 +1,603 @@
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - bar chart documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+chart.background.barcolor1
+ The color of the background bars, (1 of 2). Default: white
+
+chart.background.barcolor2
+ The color of the background bars, (2 of 2). Default: white
+
+chart.background.grid
+ Whether to show the background grid or not. Default: true
+
+chart.background.grid.color
+ The color of the background grid. Default: #ddd
+
+chart.background.grid.hsize
+ The horizontal background grid size. Default: 40
+
+chart.background.grid.vsize
+ The vertical background grid size. Default: 18
+
+chart.background.grid.width
+ The width that the background grid lines are. Decimals (eg 0.5) are permitted. Default: 1
+
+chart.background.grid.border
+ Determines whether a border line is drawn around the grid. Default: true
+
+chart.background.grid.hlines
+ Determines whether to draw the horizontal grid lines. Default: true
+
+chart.background.grid.vlines
+ Determines whether to draw the vertical grid lines. Default: true
+
+chart.background.grid.autofit
+ Instead of specifying a pixel width/height for the background grid, you can use autofit and specify how many horizontal and vertical lines you want. Default: false
+
+chart.background.grid.autofit.numhlines
+ When using autofit this allows you to specify how many horizontal grid lines you want. Default: 7
+
+chart.background.grid.autofit.numvlines
+ When using autofit this allows you to specify how many vertical grid lines you want. Default: 20
+
+chart.background.hbars
+ An array of information stipulating horizontal coloured bars. You can use these to indicate limits. Eg: myBar.Set('hbars', [[75, 10, 'yellow'], [85, 15, 'red']]); This would give you two bars, one red and a lower yellow bar. The units correspond to your scale, and are the starting point and the height. Default: null
+
+
Colors
+chart.strokecolor
+ The color of the outline of the bars. Default: #666
+
+chart.colors
+ An array of the colors of the actual bars. Default: An array - ['rgb(0,0,255)', '#0f0', '#00f', '#ff0', '#0ff', '#0f0']
+
+
Margins
+chart.hmargin
+ The horizontal margin (in pixels) of the graph. Default: 5
+
+chart.gutter
+ 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. Default: 25
+
+
Labels and text
+chart.text.color
+ The color of the labels. Default: black
+
+chart.text.size
+ The size (in points) of the labels. Default: 10
+
+chart.text.angle
+ The angle of the horizontal text labels (at the bottom of the graph). This can be one of three values - 0, 45 or 90. Default: 0 (Horizontal)
+
+chart.text.font
+ The font used to render the text. Default: Verdana
+
+chart.labels
+ An array of the labels to be used on the graph. Default: An empty array
+
+
+ chart.labels.above
+ If true, values will be shown above the bars. For regular and stacked bar charts units are included, whereas for
+ grouped bar charts they're not (usually there isn't enough space for them).
+ Default: false
+
+
+ chart.labels.above.decimals
+ This stipulates how many decimals are used in the above bar labels.
+ Default: 0
+
+
+ chart.labels.above.size
+ The font size of the above bar labels. Useful if you only have a few bars.
+ Default: false
+
+
+chart.labels.ingraph
+ An array of labels for the graph which are drawn "inside" the graph. If you have 5 data points then this should have a corresponding number of elements, though there is a shorthand available. Default: null
+
+chart.ylabels
+ Can be true or false and determines whether the chart has Y axis labels. Default: true
+
+chart.ylabels.count
+ A value that controls how many Y labels there are. Previously (prior to 8th August 2010) this could be 1,3,5. Now it can be any number, but keep in mind that if you use this it may result in decimals. Default: 5
+
+chart.xlabels.offset
+ This allows you finer grained control over the X label positioning if you need it. Default: 0
+
+chart.numyticks
+ The number of Y tickmarks. If you have changed the number of Y labels, you may also want to change this to match. Default: 10
+
+
+
Titles
+
+
+chart.title
+The title of the graph, if any.
+Default: null
+
+
+chart.title.background
+The background color (if any) for the title.
+Default: null
+
+
+chart.title.color
+ The color of the title. Default: black
+
+chart.title.hpos
+ 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. Default: null
+
+chart.title.vpos
+ 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. Default: null
+
+chart.title.xaxis
+ This allows to specify a title for the X axis. Default: none
+
+chart.title.yaxis
+ This allows to specify a title for the Y axis. Default: none
+
+chart.title.xaxis.pos
+ This is multiplied with the gutter to give the position of the X axis title. Default: 0.25
+
+chart.title.yaxis.pos
+ This is multiplied with the gutter to give the position of the Y axis title. Default: 0.25
+
+
Shadow
+chart.shadow
+ Whether a drop shadow is applied. Default: false
+
+chart.shadow.color
+ The color of the shadow. Default: #666
+
+chart.shadow.offsetx
+ The X offset of the shadow. Default: 3
+
+chart.shadow.offsety
+ The Y offset of the shadow. Default: 3
+
+chart.shadow.blur
+ The severity of the shadow blurring effect. Default: 3
+
+
Scale
+chart.scale.decimals
+ The number of decimal places to display for the Y scale. Default: 0
+
+chart.scale.point
+ The character used as the decimal point. Default: .
+
+
+ chart.scale.round
+ Whether to round the maximum scale value up or not. This will produce slightly better scales in some instances.
+ Default: null
+
+
+chart.units.pre
+ The units that the Y axis is measured in. This string is displayed BEFORE the actual number, allowing you to specify values such as "$50". Default: none
+
+chart.units.post
+ The units that the Y axis is measured in. This string is displayed AFTER the actual number, allowing you to specify values such as "50ms". Default: none
+
+chart.ymax
+ The optional maximum Y scale value. If not specified then it will be calculated. Default: null (It's calculated)
+
+
+
+
Key
+
+
+ chart.key
+ An array of key information.
+ Default: [] (An empty array)
+
+
+ chart.key.background
+ 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.
+ Default: white
+
+
+ chart.key.position
+ Determines the position of the key.Either graph (default), or gutter.
+ Default: graph
+
+ chart.key.position.x
+ This allows you to specify a specific X coordinate for the key.
+ Default: null
+
+ chart.key.position.y
+ This allows you to specify a specific Y coordinate for the key.
+ Default: null
+
+ chart.key.position.gutter.boxed
+ If you have the key in gutter mode (ie horizontal), this allows you to give a background color.
+ Default: true
+
+
+ chart.key.shadow
+ Whether a small drop shadow is applied to the key.
+ Default: false
+
+
+ chart.key.shadow.color
+ The color of the shadow.
+ Default: #666
+
+
+ chart.key.shadow.blur
+ The extent of the blurring effect used on the shadow.
+ Default: 3
+
+
+ chart.key.shadow.offsetx
+ The X offset of the shadow.
+ Default: 2
+
+
+ chart.key.shadow.offsety
+ The Y offset of the shadow.
+ Default: 2
+
+ chart.key.rounded
+ This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.
+ Default: false
+
+ chart.key.color.shape
+ This can be square, circle or line and controls how the color indicators in the key appear.
+ Default: square
+
+
+
+
+
Interactive features
+chart.contextmenu
+ An array of context menu items. More information on context menus is here. Default: [] (An empty array)
+
+chart.tooltips
+ A numerically indexed array of tooltips that are shown when a bar is clicked. These can contain HTML. Default: null
+
+chart.tooltips.effect
+ The animated effect used for showing tooltips. Can be either fade or expand. Default: fade
+
+chart.tooltips.event
+ This is the event that triggers the tooltips. It can be either onclick or onmousemove. Default: onclick
+
+chart.tooltips.css.class
+ This is the name of the CSS class the graph uses. Default: RGraph_tooltip
+
+chart.tooltips.override
+ If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the tooltips documentation page Default: null
+
+chart.tooltips.coords.adjust
+ When you translate (to make the best use of space for example) this allows you to adjust the tooltip coordinates accordingly. Default: [0,0]
+
+chart.crosshairs
+ If true, you will get a crosshair centering on the current mouse position. Default: false
+
+chart.crosshairs.linewidth
+ This controls the linewidth of the crosshairs. Default: 1
+
+chart.crosshairs.color
+ The color of the crosshairs. Default: #333
+
+chart.annotatable
+ Whether annotations are enabled for the chart (ie you can draw on the chart interactively. Default: false
+
+chart.annotate.color
+ If you do not allow the use of the palette, then this will be the only colour allowed for annotations. Default: black
+
+chart.resizable
+ 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). Default: false
+
+chart.adjustable
+ Defaulting to false, this determines whether your bar chart will be adjustable. Default: false
+
+
Zoom
+chart.zoom.mode
+ Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: thumbnail and canvas. Default: canvas
+
+chart.zoom.factor
+ This is the factor that the graph will be zoomed by (bigger values means more zoom) Default: 1.5
+
+chart.zoom.fade.in
+ Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.fade.out
+ Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.hdir
+ The horizontal direction of the zoom. Possible values are: left, center, right Default: right
+
+chart.zoom.vdir
+ The vertical direction of the zoom. Possible values are: up, center, down Default: down
+
+chart.zoom.delay
+ The delay (in milliseconds) between frames. Default: 50
+
+chart.zoom.frames
+ The number of frames in the zoom animation. Default: 10
+
+chart.zoom.shadow
+ Whether or not the zoomed canvas has a shadow or not. Default: true
+
+chart.zoom.thumbnail.width
+ When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.thumbnail.height
+ When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.background
+ Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page. Default: true
+
+
Miscellaneous
+chart.line
+ Formerly a boolean, this now stipulates a line graph object which is to be drawn on top of the bar chart. You can see an example here. Default: null
+
+chart.variant
+ This simply stipulates whether you want a regular bar chart, a dot chart, a pyramid chart a 3D chart, a sketch or a glassy chart. Possible values are:
bar
dot
pyramid
arrow
3d
sketch
glass
The pyramid, dot, arrow, sketch and glass variants are only effective for regular bar charts - not grouped or stacked charts. Default: bar
+
+chart.xaxispos
+ The position of the X axis. This can be bottom or center. Default: bottom
+
+chart.axis.color
+ The color of the axes. Default: black
+
+chart.grouping
+ How the bars are grouped, and it should be one of: grouped or stacked Default: grouped
+
+
+
+
+
Methods
+
+
+ obj.getBar()
+ This method makes it easier to get hold of which bar has been clicked on, or hovered over. It returns an array of:
+
+
The graph object
+
The X coordinate
+
The Y coordinate
+
The width of the bar
+
The height of the bar
+
The numerical index of the bar. This corresponds (for example) to the tooltips array, and the coordinates array
+
+
+ An example usage is:
+
+
+<canvas id="cvs" width="600" height="250">[No canvas support]</canvas>
+
+<script src="RGraph.common.core.js"></script>
+<script src="RGraph.bar.js"></script>
+
+<script>
+ myGraph = new RGraph.Bar('myCanvas', [1.2, 1.3, 1.4, 1.5,6,1.9,2,2.1,2.5]);
+ myGraph.Set('chart.labels', ['John', 'Barry', 'Rich', 'Craig', 'Tom', 'Frank', 'Helen', 'Joyce', 'Fred'])
+ myGraph.Draw();
+
+ RGraph.Register(myGraph);
+
+ myGraph.canvas.onclick = function (e)
+ {
+ RGraph.Redraw();
+
+ var canvas = e.target;
+ var context = canvas.getContext('2d');
+ var obj = canvas.__object__;
+ var coords = obj.getBar(e);
+
+ if (coords) {
+ var top = coords[1];
+ var left = coords[2];
+ var width = coords[3];
+ var height = coords[4];
+
+ context.beginPath();
+ context.strokeStyle = 'black';
+ context.fillStyle = 'rgba(255,255,255,0.5)';
+ context.strokeRect(top, left, width, height);
+ context.fillRect(top, left, width, height);
+ context.stroke();
+ context.fill();
+ }
+ }
+</script>
+
+chart.gutter
+ The space given over to the labels. Default: 25
+
+chart.margin
+ The space above and below each bar. Default: 2
+
+
Titles
+
+chart.title
+The main title of the chart.
+Default: (An empty string)
+
+
+chart.title.background
+The background color (if any) for the title.
+Default: null
+
+
+chart.title.hpos
+ 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. Default: null
+
+chart.title.vpos
+ 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. Default: null
+
+chart.title.color
+ The color of the title. Default: black
+
+
+chart.title.left
+ The left title. Default: An empty string
+
+chart.title.right
+ The right title. Default: An empty string
+
+
+
Colors
+
+
+ chart.colors
+ An array of colors. These too can be gradients that you make if you wish.
+ Default: ['#fcf', '#00f', '#f00', '#0f0', '#ff0', '#0ff', '#f0f', '#ff6101', '#b401ff', '#e4ff01', '#fb8195', '#ccc']
+
+
+ chart.strokestyle
+ This is the color used as the stroke style. If you didn't want it, you could set this to rgba(0,0,0,0)
+ Default: #333
+
+
+
Labels, text and axes
+chart.xtickinterval
+ The X tick mark interval. Default: null
+
+chart.axis.color
+ The color of the axes. Default: black
+
+chart.xmax
+ This allows you to set the maximum X value that the chart uses, instead of it being auto-generated. Default: null
+
+chart.scale.decimals
+ This allows you to set the precision of the X labels. Default: null
+
+chart.scale.point
+ The character used as the decimal point. Default: .
+
+chart.scale.thousand
+ The character used as the thousand separator Default: ,
+
+chart.labels
+ An array of the graphs labels (they go in the middle). Default: null
+
+chart.text.size
+ The size of the text used (in points). Default: 10
+
+chart.text.font
+ The font used to render the text. Default: Verdana
+
+chart.text.color
+ The color of the labels. Default: black
+
+
Scale
+
+
+
+ chart.scale.round
+ Whether to round the maximum scale value up or not. This will produce slightly better scales in some instances.
+ Default: null
+
+chart.units.pre
+ The units that are applied to the X axis labels (these are pre-pended to the number). Default: none
+
+chart.units.post
+ The units that are applied to the X axis labels (these are appended to the number). Default: none
+
+
Interactive features
+chart.tooltips
+ A numerically indexed array of tooltips that are shown when a bar is clicked. These can contain HTML. Default: An empty array
+
+chart.tooltips.effect
+ The animated effect used for showing tooltips. Can be either fade or expand. Default: fade
+
+chart.tooltips.css.class
+ This is the name of the CSS class the graph uses. Default: RGraph_tooltip
+
+chart.tooltips.override
+ If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the tooltips documentation page Default: null
+
+chart.contextmenu
+ An array of context menu items. Cannot be used in conjunction with tooltips. Default: [] (An empty array)
+
+chart.annotatable
+ Whether annotations are enabled for the chart (ie you can draw on the chart interactively. Default: false
+
+chart.annotate.color
+ If you do not allow the use of the palette, then this will be the only colour allowed for annotations. Default: black
+
+chart.resizable
+ 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). Default: false
+
+
Shadow
+chart.shadow
+ Turns the shadow on or off. Default: false
+
+chart.shadow.color
+ The color of the shadow. Default: #666
+
+chart.shadow.offsetx
+ The horizontal offset of the shadow. Default: 3
+
+chart.shadow.offsety
+ The vertical offset of the shadow. Default: 3
+
+chart.shadow.blur
+ How severe the blurring effect is for the shadow. Default: 3
+
+
Zoom
+chart.zoom.mode
+ Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: thumbnail and canvas. Default: canvas
+
+chart.zoom.factor
+ This is the factor that the graph will be zoomed by (bigger values means more zoom) Default: 1.5
+
+chart.zoom.fade.in
+ Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.fade.out
+ Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.hdir
+ The horizontal direction of the zoom. Possible values are: left, center, right Default: right
+
+chart.zoom.vdir
+ The vertical direction of the zoom. Possible values are: up, center, down Default: down
+
+chart.zoom.delay
+ The delay (in milliseconds) between frames. Default: 50
+
+chart.zoom.frames
+ The number of frames in the zoom animation. Default: 10
+
+chart.zoom.shadow
+ Whether or not the zoomed canvas has a shadow or not. Default: true
+
+chart.zoom.thumbnail.width
+ When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.thumbnail.height
+ When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.background
+ Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page. Default: true
+
+
+
+
\ No newline at end of file
diff --git a/RGraph/docs/color.html b/RGraph/docs/color.html
new file mode 100644
index 0000000..6929859
--- /dev/null
+++ b/RGraph/docs/color.html
@@ -0,0 +1,274 @@
+
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - About canvas color definitions
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
RGraph: HTML5 canvas graph library - About canvas color definitions
+
+
+
+
+ You will probably want to know the different ways you can define a color. There are a few
+ ways which you can use, all of which are quite straight-forward.
+
+ The first, and easiest, is to use named colors. This gives you a range of color values that have been predefined for you. Eg:
+
+
+
myObject.Set('chart.colors', ['red', 'blue']);
+
+
+
+
Hex values
+
+
+ The next, is straight forward hex values like you can use in normal CSS. These consist of a hash sign,
+ followed by three or six hexadecimal characters. Eg:
+
+ Probably new to most people, is rgba(). Similar to regular rgb() values, but with a fourth value that allows you to specify the
+ alpha value, which stipulates how transparent the color is. An alpha value of 0 is totally transparent, and a value of 1, is
+ totally opaque (ie. you can't see through it). With a value of 1, rgba() acts exactly like rgb(). This example gives you red
+ and blue colors that are semi-transparent:
+
+ Also probably quite new to you, are hsl() values. Much like rgb(), but instead of red green and blue, it allows you to specify
+ the Hue, Saturation and Light values instead. For example:
+
+ This creates a gradient that goes from red to blue. The gradient starts at 0,0, and finishes at 0,250. ie A vertical
+ gradient. You may not see the whole gradient - that depends on the extent of the shape you're filling. You can use the gradient
+ in place of a regular color definition. Eg:
+
+
+
myObject.Set('chart.colors', [myGradient]);
+
+
+
+
Radial gradients
+
+
+ Radial gradients are much like their linear counterparts, but circular, as the name suggests. Eg:
+
+ Instead of four arguments, it takes six - the coordinates of the start point along with the radius, and the coordinates
+ of the end point, along with the radius. After it has been created, you can treat as you would a linear gradient:
+
+
+
myObject.Set('chart.colors', [myGradient]);
+
+
+
+
More information
+
+
+ You can read more about CSS3 color definitions here.
+
+
+
\ No newline at end of file
diff --git a/RGraph/docs/combine.html b/RGraph/docs/combine.html
new file mode 100644
index 0000000..4aac7c8
--- /dev/null
+++ b/RGraph/docs/combine.html
@@ -0,0 +1,481 @@
+
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - combining bar and line graphs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This is an example of combining Bar and Line charts. It's quite straight-forward, and the code here shows you how it can be achieved.
+
+
+
+ If the values for the line and bar result in different Y scales you may need to specify the chart.ymax property for each graph
+ so that the scales are the same. The line turns off Y labels so as not to overwrite the Bars labels.
+
+
+ Tooltips
+
+
+ You can have tooltips on the Line chart by setting chart.tooltips.highlighting to false, like below.
+ The order in which you create the graphs is also important, you must define the Bar chart first, and subsequently the Line
+ chart.
+
+
+
line.Set('chart.tooltips.highlighting', false);
+
+
+ Because the tooltips are only triggered by the Line chart, you should put all of the information, for both the Line and the
+ Bar chart, in the tooltips.
+
+
+
+
Combining Line charts
+
+
+
+
+
+
+ Another type of chart you may want is a line chart with Y axes on both sides, as illustrated on the right. You should
+ be careful with this chart type as it can easily lead to confusion.
+
+
+
+ This chart is made up from two line charts, one with the Y axis on the left and one on the right. The code that makes up
+ this chart is below.
+
+
+
+ The only reason to combine line charts is to get Y axes on the left and right. If you simply want mutiple lines,
+ you can do this without combining any charts. See the line chart example page
+
+ Context menus are what you see when you click your right mouse button. With RGraph, you can specify custom menus
+ for your graphs if you wish. This way you can define custom actions to be associated with menu items. Context menus are a
+ very easy way to extend the functionality of your graphs, allowing you to associate presentation style functionality
+ with them.
+
+
+
+ Important: Opera does not allow you to customise the context menu, so with this browser you
+ should use the left mouse button on the graph, instead of the right.
+
+
+
+
+
What do they look like?
+
+
+
+
+ Context menus look like the image on the right. You can of course customise their look by using stylesheets. The CSS classes
+ you need to use are RGraph_contextmenu_background, RGraph_contextmenu and RGraph_contextmenu_item. Eg:
+
+ The "! important" is not necessary if you're not overriding a style that is set by the graph script. If you're having trouble,
+ it's a good idea to use it though.
+
+
+
+
+
Can I have multiple levels of menus?
+
+
+ Yes, as of 24th April 2010 you can have a dual level context menu, which can reduce "option overload" in your user interface.
+ This example defines a simple context menu:
+
+ As you can see, the value is a two dimension array. The second being an array consisting of a string which is used as the name of the
+ menu item, and a function object (NOT the function name as a string). The function object is the function called when the menu item is selected.
+
+
+
+
+
Can I have "separators"?
+
+
+ Yes. Simply pass null instead of an array as your menu item. Eg:
+
+ If for any reason you wish to access the browsers own context menu, you can hold down your CTRL key on your keyboard when you
+ click, and the canvas context menu will be bypassed. Try it on the graph below by holding your CTRL key whilst right clicking.
+
+
+
+
+
What can I use them for?
+
+
+ Since the context menu items run Javascript functions when selected, you can use them for pretty much
+ anything you want. For example you could make a presentation system, with the context menu controlling which
+ graph is shown on the canvas. For example:
+
+
+
+
+
+
+
+
Is there an example file that uses the CSS classes?
+ Mac Safari, Mac Firefox, Windows Safari and MSIE 9 (beta 1) can have trouble displaying the context menu. So for this reason, for these browsers,
+ the context menu is attached to a double click of the left mouse button. Opera doesn't support customising the context menu so
+ this browser also uses a left mouse button double click to trigger the context menu.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/RGraph/docs/css.html b/RGraph/docs/css.html
new file mode 100644
index 0000000..4bedc4f
--- /dev/null
+++ b/RGraph/docs/css.html
@@ -0,0 +1,326 @@
+
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - available CSS classes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This controls the appearance of the PNG image which is shown when you use the context menu option RGraph.showPNG().
+
+
+
+
+
RGraph_palette
+
+ This controls the appearance of the mini-palette that can be used with annotating.
+
+
+
+
+
RGraph_tooltip
+
+ This controls the appearance of tooltips. The default is to have them look like Windows tooltips.
+
+
+
+
+
RGraph_contextmenu
+
+ This controls how context menus appear. The default is similar to the look that Windows XP has.
+
+
+
+
+
RGraph_contextmenu_item
+
+ This controls how individual items on the context menu will appear, for example the default has roughly 25px padding-left
+ to accomodate the left bar.
+
+
+
+
+
RGraph_contextmenu_background
+
+ This is the Windows XP style left vertical bar. By default this is light grey.
+
+
+
+
+
RGraph_zoom_window
+
+ This is the class to use if you want to customise the mini-zoom window.
+
+
+
+
+
RGraph_zoomed_canvas
+
+ This is the class to use if you want to customise the full canvas zoom.
+
+
+
+
+
RGraph_zoomed_area
+
+ This is the class to use if you want to customise the zoomed area.
+
+
+
+
+
ModalDialog_background
+
+ This class controls the dark semi-opaque background for the ModalDialog.
+
+
+
+
+
ModalDialog_dialog
+
+ This class controls the ModalDialog itself.
+
+
+
+
+
ModalDialog_topbar
+
+ This class controls the top bar for the ModalDialog. You could, for example, use the display CSS property to
+ hide this if you don't want it.
+
+
+
+
+
Example usage
+
+ Here is an example of using the CSS classes. At the time of writing, some of the items here were only implemented in newer
+ web browsers:
+
+ If you're attempting to override default styles, then because of the ordering (ie the script is setting the style AFTER
+ your own CSS) you may need to use the "! important" modifier, for example:
+
RGraph: HTML5 canvas graph library - DOMContentLoaded example
+
+
+
+
Waiting for onload event...
+
+
+
+
+
+
+
+
+
+ These images are here to pad the page and slow down loading so that the window.onload event is slowed. This makes the
+ difference far more visible.
+
+
+
+
+
+ The DOMContentLoaded event is an extremely useful event and can make a big impact on the performance of your pages, hence this
+ example. The DOMContentLoaded event fires when the pages HTML and scripts have loaded, but not necessarily any images or CSS.
+ This can make a big improvement on the apparent speed of your page(s).
+
+
+
+ You can read more about the DOMContentLoaded event on the Mozilla site, here,
+ and the Microsoft site here.
+
RGraph: HTML5 canvas graph library - Updating your graphs dynamically
+
+
+
+
+
+
+
+ The example on the right shows a line chart that automatically updates itself every 250 milliseconds. An ideal
+ use for this could be showing a networks bandwidth usage, or a servers load value.
+
+
+
+ This particular example shows a stacked line chart with two data series, though if you're showing load/stress values, a
+ non-filled chart might be a better choice.
+
+
+
+ To get up-to-date data from your server you could simply have the page refresh itself, storing the data on the server,
+ or use AJAX if you want the data stored client-side.
+
+
+
+ Be careful of the data types you use to pass the data to RGraph - you should use numbers to represent values, not strings.
+
+
+
+
+
+<canvas id="cvs" width="600" height="250">[No canvas support]</canvas>
+
+<script>
+ d1 = [];
+ d2 = [];
+
+ // Pre-pad the arrays with 100 null values
+ for (var i=0; i< 100; ++i) {
+ d1.push(null);
+ d2.push(null);
+ }
+
+ function getGraph(id, d1, d2)
+ {
+ var graph = new RGraph.Line(id, d1, d2);
+ graph.Set('chart.gutter', 25);
+ graph.Set('chart.background.barcolor1', 'white');
+ graph.Set('chart.background.barcolor2', 'white');
+ graph.Set('chart.title.xaxis', 'Time');
+ graph.Set('chart.filled', true);
+ graph.Set('chart.fillstyle', ['#daf1fa', '#faa']);
+ graph.Set('chart.colors', ['rgb(169, 222, 244)', 'red']);
+ graph.Set('chart.linewidth', 3);
+ graph.Set('chart.ymax', 20);
+ graph.Set('chart.xticks', 25);
+
+ return graph;
+ }
+
+ function drawGraph (e)
+ {
+ // Clear the canvas and redraw the graph
+ RGraph.Clear(document.getElementById("cvs"));
+ var graph = getGraph('cvs', d1, d2);
+ graph.Draw();
+
+ // Add some data to the data arrays
+ d1.push(RGraph.random(5, 10));
+ d2.push(RGraph.random(5, 10));
+
+ // Get rid of the first values of the arrays
+ if (d1.length > 100) {
+ d1 = RGraph.array_shift(d1);
+ d2 = RGraph.array_shift(d2);
+ }
+
+ setTimeout(drawGraph,250);
+ }
+
+ drawGraph();
+</script>
+
+ Custom events allow you to easily interact with and extend RGraph for your own purposes. The list of available events is below,
+ as is an example of how to make use of them with the RGraph.AddCustomEventListener() function. Event handler functions (ie your
+ functions) are passed a single parameter - the graph object. With this you can get references to the canvas and context. There's
+ an example of this below.
+
+
+
<script>
+ window.onload = function ()
+ {
+ var line = new RGraph.Line('myLine', [45,12,16,18,44,54,23,21,56]);
+ line.Set('chart.tooltips', ['Fred', 'Barney', 'Jay', 'Pete', 'Frank', 'Bob', 'Ted', 'Lou', 'Kev']);
+ line.Set('chart.labels', ['Fred', 'Barney', 'Jay', 'Pete', 'Frank', 'Bob', 'Ted', 'Lou', 'Kev']);
+ line.Set('chart.hmargin', 5);
+ line.Set('chart.tickmarks', 'dot');
+ line.Draw();
+
+ /**
+ * This is the call to the RGraph function that registers the event listener
+ *
+ * line: The graph object
+ * ontooltip: The name of the event
+ * myFunc: The function that handles the event
+ */
+ RGraph.AddCustomEventListener(line, 'ontooltip', myFunc);
+ }
+
+ /**
+ * The function that is called when the ontooltip event fires. It is passed a single parameter - the graph object.
+ * With this you can get the ID and references to the canvas and context:
+ * o obj.id
+ * o obj.canvas
+ * o obj.context
+ */
+ function myFunc(obj)
+ {
+ var id = obj.id;
+ var canvas = obj.canvas;
+ var context = obj.context;
+
+ alert('This alert was triggered by the custom ontooltip event');
+ }
+</script>
+
+
+
+
Available events
+
+
+
+ ontooltip
+ This event fires immediately after a tooltip has been created. This event allows you to easily show graphs in your tooltips (tooltip
+ effects that involve moving the tooltip, eg. contract, expand & snap, will not function). You
+ can find the tooltip object in the RGraph registry - RGraph.Registry.Get('chart.tooltip'). Note that if you're testing and
+ using a function that pauses execution (eg alert()), this will also pause any timers (for animation effects etc). If you want to
+ avoid this you should use a function that doesn't block execution, eg the Firebug/WebKit function, console.log() (you can use the
+ cl() shortcut in RGraph).
+
+
+
+
+ oncontextmenu
+ This event fires immediately after the RGraph context menu is shown. If you want it, you can get at the context menu in the
+ RGraph registry: RGraph.Registry.Get('chart.contextmenu') Like the ontooltip event, using alert() can
+ pause the fade in timers, so you should consider using the Firebug/Webkit console.log functions instead.
+
+
+
+
+ onbeforedraw
+ Much like the ondraw event, however this fires at the start of the .Draw() method, in effect "before" the method.
+
+
+
+
+ ondraw
+ The ondraw event fires after the .Draw() method has run. Note that the interactive features of RGraph may call the .Draw()
+ method multiple times - the zoom in area mode is a prime example.
+ A graph with tooltips is also an example. In this case it would demonstrate that the .Draw() method is called twice (and
+ hence the ondraw event), whereas the ontooltip event only fires once.
+
+
+
+ Note: The ondraw event is not only fired by its own graph,
+ but (if you're using tooltips for example), can also be fired by other graphs on the page.
+
+
+
+
+ onzoom
+ The onzoom event fires whenever the canvas is zoomed. When the zoom is in area and canvas modes this fires once,
+ but when in thumbnail mode this event is like the onmousemove event in that it fires whenever the mouse is moved.
+
+
+
+
+ onmodaldialog
+ The onmodaldialog event fires when the ModalDialog is shown. This event is easily replicated yourself, though using this event
+ may help you to keep your code tidy. This event is utilised slightly differently to the other events:
+
+
ModalDialog.AddCustomEventListener('onmodaldialog', function () {alert('Hello world!');});
+
+
+
+
+ onresize
+ The onresize event fires when a canvas is resized. It also fires when the canvas is reset to the original size.
+
+
+
+
+ onadjust
+ The onadjust event fires whenever one of the supported graph types is adjusted. It usually fires in conjunction with the
+ onmousemove event, and can be blocked by alert(). You therefore may need to use a different function (eg console.log())
+ whilst debugging.
+
+
+
+
+ onannotatestart
+ The onannotatestart event fires at the beginning of the annotating procedure (ie in a similar vein to the onmousedown event).
+
+
+
+
+ onannotate
+ The onannotate event fires when the graph has been annotated. It fires during the annotate procedure.
+
+
+
+
+ onannotateend
+ The onannotateend event fires at the end of the annotating procedure (ie in a similar vein to the onmouseup event).
+
+ This page shows you how you can easily integrate the graphs with other external Javascript libraries. This particular example
+ attaches a context menu to the graph, of which the only option is to show a login dialog. This could, for example, be used to
+ allow logging in to an admin area.
+
+
+
+ The dialog doesn't need to require user input - it could just be a static "Please wait..." type dialog, which is shown while a
+ subsequent page loads that takes a few seconds.
+
+
+
+ The ModalDialog was originally an external library, however it's now part of the RGraph package. It's also covered by the
+ RGraph license - so if you have an RGraph license, then the ModalDialog is part of that.
+
+
+
+
+
+<script src="RGraph.common.core.js">
+<script src="RGraph.common.context.js">
+<script src="RGraph.line.js">
+<script src="RGraph.modaldialog.js">
+
+<script>
+ window.onload = function ()
+ {
+ /**
+ * Draw the line graph
+ */
+ var line = new RGraph.Line('myLine', [45,12,16,18,44,54,23,21,56,58,33,47]);
+ line.Set('chart.background.barcolor1', 'white');
+ line.Set('chart.background.barcolor2', 'white');
+ line.Set('chart.tickmarks', null);
+ line.Set('chart.hmargin', 10);
+ line.Set('chart.linewidth', 3);
+ line.Set('chart.shadow', true);
+ line.Set('chart.shadow.offset', 2);
+ line.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+ line.Set('chart.title', 'A line graph with context menu');
+
+ // This defines a context menu which calls the given function. This function in turn shows the dialog
+ line.Set('chart.contextmenu', [['Login to admin area...', function () {ModalDialog.Show('myDialog', 300);}}]]);
+
+ line.Draw();
+ }
+</script>
+
+
+ If you're interested in using this modal dialog, then you'll probably also want the CSS that styles it. This can be found in the
+ "css" directory.
+
+
+
+
Note about Microsoft Internet Explorer 8 and the ModalDialog
+
+
+ Microsoft Internet Explorer 8 only supports fixed positioning in strict rendering mode, therefore you must specify a DTD
+ when using this browser. Eg:
+
+
+
+<!DOCTYPE html >
+
+
+
+
Hiding the ModalDialog
+
+ To hide the ModalDialog (from a "Cancel" button for example), you can use the Close() method:
+
+ You can customise the appearance of the ModalDialog by using three CSS classes, which are documented here.
+ This page customises the dialog slightly by changing the shadow X/Y offsets:
+
+
+
+<style>
+ /*
+ * These are the CSS classes that you can use to customise the appearance of the ModalDialog. If you're trying to
+ * override something which the scripts set, then because of the ordering you may need to use the "! important"
+ * modifier.
+ */
+
+ /**
+ * This is the semi-opaque background
+ */
+ .ModalDialog_background {
+ }
+
+
+ /**
+ * This is the dialog itself
+ */
+ .ModalDialog_dialog {
+ -webkit-box-shadow: gray 0 0 15px ! important;
+ -moz-box-shadow: 0 0 15px gray ! important;
+ box-shadow: 0 0 15px gray ! important;
+ }
+
+
+ /**
+ * This is gray bar at the top of the dialog
+ */
+ .ModalDialog_topbar {
+ }
+</style>
+
+
+
+
ModalDialog integration
+
+ To integrate the ModalDialog look at the sample code above (the key line is where the context menu is defined). The method you should call is ModalDialog.Show(id, width).
+ The id is the id of the layer to use. Only the .innerHTML is used, not the layer itself, so it can be hidden by
+ setting the display CSS display property to none. The width is a number which is used as the width of the dialog.
+
+
+
+ The only library needed for the ModalDialog to work is RGraph.modaldialog.js - you do not need to use
+ RGraph.common.js. This makes for far smaller download requirements.
+
+
+ This is a funnel chart. It can be used to illustrate stages of a sales or order fulfillment process, and in doing so highlight any bottlenecks
+ or steps where large amounts of customers are lost.
+
+chart.gutter
+ The gutter of the chart. This is the whitespace area around the chart. Default: 25
+
+
Colors
+chart.colors
+ These are the colors used for each segment. Default: ['red', 'green', 'gray', 'blue', 'black', 'white']
+
+
Labels and text
+chart.labels
+ An array of the labels to be used on the graph. Default: An empty array
+
+chart.text.font
+ The font used to render the text. Default: Verdana
+
+chart.text.color
+ The color of the labels. Default: black
+
+chart.text.size
+ The size (in points) of the labels. Default: 10
+
+chart.text.boxed
+ Whether the text is contained within a white bounding box. In some cases this can help readability. Default: true
+
+chart.text.halign
+ The horizontal alignment of the text. Can be center or left. Default: left
+
+
Titles
+chart.title
+ The title of the graph, if any. Default: null
+
+
+chart.title.background
+The background color (if any) for the title.
+Default: null
+
+
+chart.title.hpos
+ 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. Default: null
+
+chart.title.vpos
+ 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. Default: null
+
+chart.title.color
+ The color of the title. Default: black
+
+
Shadow
+chart.shadow
+ 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. Default: false
+
+chart.shadow.color
+ The color of the drop shadow. Default: #666
+
+chart.shadow.blur
+ The severity of the shadow blurring effect. Default: 3
+
+chart.shadow.offsetx
+ The X offset of the shadow. Default: 3
+
+chart.shadow.offsety
+ The Y offset of the shadow. Default: 3
+
+
Interactive features
+chart.contextmenu
+ An array of context menu items. More information on context menus is here. Default: [] (An empty array)
+
+chart.tooltips
+ An array of tooltips for the Funnel chart segments. Default: null
+
+chart.tooltips.effect
+ The animated effect that tooltips use - fade or expand Default: fade
+
+chart.tooltips.css.class
+ This is the name of the CSS class the graph uses. Default: RGraph_tooltip
+
+chart.tooltips.override
+ If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the tooltips documentation page Default: null
+
+chart.annotatable
+ Whether annotations are enabled for the chart (ie you can draw on the chart interactively. Default: false
+
+chart.annotate.color
+ If you do not allow the use of the palette, then this will be the only colour allowed for annotations. Default: black
+
+chart.resizable
+ 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). Default: false
+
+
+
+
+
Key
+
+
+ chart.key
+ An array of key information.
+ Default: [] (An empty array)
+
+
+ chart.key.background
+ 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.
+ Default: white
+
+
+ chart.key.position
+ Determines the position of the key.Either graph (default), or gutter.
+ Default: graph
+
+ chart.key.position.x
+ This allows you to specify a specific X coordinate for the key.
+ Default: null
+
+ chart.key.position.y
+ This allows you to specify a specific Y coordinate for the key.
+ Default: null
+
+ chart.key.position.gutter.boxed
+ If you have the key in gutter mode (ie horizontal), this allows you to give a background color.
+ Default: true
+
+
+ chart.key.shadow
+ Whether a small drop shadow is applied to the key.
+ Default: false
+
+
+ chart.key.shadow.color
+ The color of the shadow.
+ Default: #666
+
+
+ chart.key.shadow.blur
+ The extent of the blurring effect used on the shadow.
+ Default: 3
+
+
+ chart.key.shadow.offsetx
+ The X offset of the shadow.
+ Default: 2
+
+
+ chart.key.shadow.offsety
+ The Y offset of the shadow.
+ Default: 2
+
+ chart.key.rounded
+ This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.
+ Default: false
+
+ chart.key.color.shape
+ This can be square, circle or line and controls how the color indicators in the key appear.
+ Default: square
+
+
+
+
+
Zoom
+chart.zoom.mode
+ Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: thumbnail and canvas. Default: canvas
+
+chart.zoom.factor
+ This is the factor that the graph will be zoomed by (bigger values means more zoom) Default: 1.5
+
+chart.zoom.fade.in
+ Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.fade.out
+ Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.hdir
+ The horizontal direction of the zoom. Possible values are: left, center, right Default: right
+
+chart.zoom.vdir
+ The vertical direction of the zoom. Possible values are: up, center, down Default: down
+
+chart.zoom.delay
+ The delay (in milliseconds) between frames. Default: 50
+
+chart.zoom.frames
+ The number of frames in the zoom animation. Default: 10
+
+chart.zoom.shadow
+ Whether or not the zoomed canvas has a shadow or not. Default: true
+
+chart.zoom.thumbnail.width
+ When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.thumbnail.height
+ When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.background
+ Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page. Default: true
+
+
+
\ No newline at end of file
diff --git a/RGraph/docs/gantt.html b/RGraph/docs/gantt.html
new file mode 100644
index 0000000..9f3f376
--- /dev/null
+++ b/RGraph/docs/gantt.html
@@ -0,0 +1,455 @@
+
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - gantt chart documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ chart.xmax
+ Required. This determines how many "units" wide the Gantt chart is. For example to represent a year, you would use 365, giving
+ a granularity of one day.
+ Default: none
+
+
+ chart.xmin
+ This option can sometimes make using a Gantt chart spread over several pages easier.
+ Default: 0
+
+
+
+
Background
+chart.background.barcolor1
+ Color of the background bars Default: white
+
+chart.background.barcolor2
+ Color of the background bars Default: white
+
+chart.background.grid
+ Whether a grid is shown as part of the background Default: true
+
+chart.background.grid.color
+ The color of the background grid. Default: #eee
+
+chart.background.grid.hsize
+ The size of the horizontal grid. Default: 20
+
+chart.background.grid.vsize
+ The size of the vertical grid. Default: 20
+
+chart.background.grid.width
+ The line width of the background grid. Default: 1
+
+chart.background.grid.autofit
+ Instead of specifying a pixel width/height for the background grid, you can use autofit and specify how many horizontal and vertical lines you want. Default: false
+
+chart.background.grid.autofit.numhlines
+ When using autofit this allows you to specify how many horizontal grid lines you want. Default: 7
+
+chart.background.grid.autofit.numvlines
+ When using autofit this allows you to specify how many vertical grid lines you want. Default: 20
+
+
Margins
+chart.gutter
+ How big the gutter is. This is the top, bottom and right gutters. The left gutter is three times the gutter wide, to accomodate the labels. Default: 25
+
+
Labels and text
+chart.text.size
+ The size of the text (in points). Default: 10
+
+chart.text.font
+ The font used to render the text. Default: Verdana
+
+chart.text.color
+ The color of the labels. Default: black
+
+chart.labels
+ An array of the labels which are applied to the chart. Default: [] (An empty array)
+
+
Titles
+chart.title
+ The title of the chart. Default: not set
+
+
+chart.title.background
+The background color (if any) for the title.
+Default: null
+
+
+chart.title.color
+ The color of the title. Default: black
+
+chart.title.hpos
+ 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. Default: null
+
+chart.title.vpos
+ 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. Default: null
+
+
Interactive features
+chart.tooltips
+ An array of tooltips that are shown when the bars are clicked. They can contain HTML. Default: [] (An empty array)
+
+chart.tooltips.effect
+ The animated effect used for showing tooltips. Can be either fade or expand. Default: fade
+
+chart.tooltips.css.class
+ This is the name of the CSS class the graph uses. Default: RGraph_tooltip
+
+chart.tooltips.override
+ If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the tooltips documentation page Default: null
+
+chart.contextmenu
+ An array of context menu items. Cannot be used in conjunction with tooltips. Default: [] (An empty array)
+
+chart.annotatable
+ Whether annotations are enabled for the chart (ie you can draw on the chart interactively. Default: false
+
+chart.annotate.color
+ If you do not allow the use of the palette, then this will be the only colour allowed for annotations. Default: black
+
+chart.resizable
+ 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). Default: false
+
+
Zoom
+chart.zoom.mode
+ Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: thumbnail and canvas. Default: canvas
+
+chart.zoom.factor
+ This is the factor that the graph will be zoomed by (bigger values means more zoom) Default: 1.5
+
+chart.zoom.fade.in
+ Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.fade.out
+ Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.hdir
+ The horizontal direction of the zoom. Possible values are: left, center, right Default: right
+
+chart.zoom.vdir
+ The vertical direction of the zoom. Possible values are: up, center, down Default: down
+
+chart.zoom.delay
+ The delay (in milliseconds) between frames. Default: 50
+
+chart.zoom.frames
+ The number of frames in the zoom animation. Default: 10
+
+chart.zoom.shadow
+ Whether or not the zoomed canvas has a shadow or not. Default: true
+
+chart.zoom.thumbnail.width
+ When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.thumbnail.height
+ When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.background
+ Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page. Default: true
+
+
Miscellaneous
+chart.borders
+ Whether a border is shown on the event bars Default: true
+
+chart.defaultcolor
+ The default color of bars. If you don't specify a color for the event, this will be used. Default: white
+
+chart.events
+ An array of event information that is displayed on the gantt. See below for further information. Default: [] (An empty array)
+
+chart.vbars
+ Vertical bars used for decorative purposes, or for marking something on the chart (an event for example). See below for further information. Default: [] (An empty array)
+
+
+
+
Adding events to your Gantt chart
+
+
+ To add events, you specify them using the chart.events property. You could use the following to set some events on your gantt chart:
+
+ The first value is the (zero indexed) start number relative to your chart.xmax. So if you have set your chart.xmax to 62, (to represent
+ two months), and this value is 31, the start will be the start of the second month. In this case you could give two labels -
+ ['July', 'August'].
+
+
+
+ The second value is the duration. So using the previous example, if you set this to 7, you would have an event lasting a week.
+
+
+
+ The third value is the "percentage complete" indicator. This is shown to the right of the event, and is optional - you can
+ specify null if you wish.
+
+
+
+ The fourth value is the label that is used on the left hand side.
+
+
+
+ The optional fifth value stipulates the background colour that the bar is. Default is white.
+
+
+
+ And the last optional 6th value is the foreground color of the bar. Defaulting to #0c0.
+
+ You can use these for decorative purposes, or to mark events/limits. The first value is the start index, as above.
+ The second value is the unit length, again as above. The third value is the color of the vertical bar.
+
+
+
+
\ No newline at end of file
diff --git a/RGraph/docs/hbar.html b/RGraph/docs/hbar.html
new file mode 100644
index 0000000..cd30f97
--- /dev/null
+++ b/RGraph/docs/hbar.html
@@ -0,0 +1,489 @@
+
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - horizontal bar chart documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
RGraph: HTML5 canvas graph library - Horizontal bar chart documentation
+
+
+
+
+ The horizontal bar graph is a variation on the bar chart which can be useful when you have larger labels, since you have
+ more space available to you for them.
+
+chart.gutter
+ 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. Default: 25
+
+
Colors
+chart.colors
+ An array of the colors of the actual bars. Default: An array - ['rgb(0,0,255)', '#0f0', '#00f', '#ff0', '#0ff', '#0f0']
+
+
Background
+chart.background.barcolor1
+ The color of the background bars, (1 of 2). Default: white
+
+chart.background.barcolor2
+ The color of the background bars, (2 of 2). Default: white
+
+chart.background.grid
+ Whether to show the background grid or not. Default: true
+
+chart.background.grid.color
+ The color of the background grid. Default: #ddd
+
+chart.background.grid.hsize
+ The horizontal background grid size. Default: 40
+
+chart.background.grid.vsize
+ The vertical background grid size. Default: 18
+
+chart.background.grid.width
+ The width that the background grid lines are. Decimals (eg 0.5) are permitted. Default: 0.5
+
+chart.background.grid.border
+ Determines whether a border line is drawn around the grid. Default: true
+
+chart.background.grid.hlines
+ Determines whether to draw the horizontal grid lines. Default: true
+
+chart.background.grid.vlines
+ Determines whether to draw the vertical grid lines. Default: true
+
+chart.background.grid.autofit
+ Instead of specifying a pixel width/height for the background grid, you can use autofit and specify how many horizontal and vertical lines you want. Default: false
+
+chart.background.grid.autofit.numhlines
+ When using autofit this allows you to specify how many horizontal grid lines you want. Default: 14
+
+chart.background.grid.autofit.numvlines
+ When using autofit this allows you to specify how many vertical grid lines you want. Default: 20
+
+
Labels and text
+chart.labels
+ An array of the labels to be used on the graph. Default: An empty array
+
+
+ chart.labels.above
+ This is a boolean which if true, will cause labels to be shown to the right of the bars. (It's called "above"
+ for API compatibility).
+ Default: false
+
+
+ chart.labels.above.decimals
+ This is a number which controls how many decimals are shown. It defaults to 0, and since it was added (4th December 2010)
+ you may need to set this, otherwise no decimals will be shown.
+ Default: 0
+
+
+chart.text.font
+ The font used to render the text. Default: Verdana
+
+chart.text.color
+ The color of the labels. Default: black
+
+chart.text.size
+ The size (in points) of the labels. Default: 10
+
+
Titles
+chart.title
+ The title of the graph, if any. Default: null
+
+
+chart.title.background
+The background color (if any) for the title.
+Default: null
+
+
+chart.title.hpos
+ 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. Default: null
+
+chart.title.vpos
+ 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. Default: null
+
+chart.title.xaxis
+ This allows to specify a title for the X axis. Default: none
+
+chart.title.yaxis
+ This allows to specify a title for the Y axis. Default: none
+
+chart.title.xaxis.pos
+ This is multiplied with the gutter to give the position of the X axis title. Default: 0.25
+
+chart.title.yaxis.pos
+ This is multiplied with the gutter to give the position of the Y axis title. Default: 0.5
+
+chart.title.color
+ The color of the title. Default: black
+
+
Scale and axes
+chart.scale.point
+ The character used as the decimal point. Default: .
+
+chart.scale.thousand
+ The character used as the thousand separator Default: ,
+
+
+ chart.scale.round
+ Whether to round the maximum scale value up or not. This will produce slightly better scales in some instances.
+ Default: null
+
+
+chart.xmax
+ (Optional) An optional max figure for the X scale. Default: none (one is calculated)
+
+chart.yaxispos
+ The position of the Y axis. Works with regular and grouped charts. Can be either center or left. Default: left
+
+chart.axis.color
+ The color of the axes. Default: black
+
+chart.units.pre
+ The units that the X axis is measured in. This string is displayed BEFORE the actual number, allowing you to specify values such as "$50". Default: none
+
+chart.units.post
+ The units that the X axis is measured in. This string is displayed AFTER the actual number, allowing you to specify values such as "50ms". Default: none
+
+chart.units.ingraph
+ If your units are long, setting this stipulates them to be used for ingraph labels only. Default: false
+
+
Miscellaneous
+chart.grouping
+ How the bars are grouped, and it should be one of: grouped or stacked Default: grouped
+
+chart.vmargin
+ The vertical margin that is applied to each individual bar. Default: 3
+
+chart.strokestyle
+ The color of the outlines of the bars. Default: black
+
+
Shadow
+chart.shadow
+ Whether a small drop shadow is applied. Default: false
+
+chart.shadow.color
+ The color of the shadow. Default: #666
+
+chart.shadow.offsetx
+ The X offset of the shadow. Default: 3
+
+chart.shadow.offsety
+ The Y offset of the shadow. Default: 3
+
+chart.shadow.blur
+ The severity of the shadow blurring effect. Default: 3
+
+
+
+
+
Key
+
+
+ chart.key
+ An array of key information.
+ Default: [] (An empty array)
+
+
+ chart.key.background
+ 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.
+ Default: white
+
+
+ chart.key.position
+ Determines the position of the key.Either graph (default), or gutter.
+ Default: graph
+
+ chart.key.position.x
+ This allows you to specify a specific X coordinate for the key.
+ Default: null
+
+ chart.key.position.y
+ This allows you to specify a specific Y coordinate for the key.
+ Default: null
+
+ chart.key.position.gutter.boxed
+ If you have the key in gutter mode (ie horizontal), this allows you to give a background color.
+ Default: true
+
+
+ chart.key.shadow
+ Whether a small drop shadow is applied to the key.
+ Default: false
+
+
+ chart.key.shadow.color
+ The color of the shadow.
+ Default: #666
+
+
+ chart.key.shadow.blur
+ The extent of the blurring effect used on the shadow.
+ Default: 3
+
+
+ chart.key.shadow.offsetx
+ The X offset of the shadow.
+ Default: 2
+
+
+ chart.key.shadow.offsety
+ The Y offset of the shadow.
+ Default: 2
+
+ chart.key.rounded
+ This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.
+ Default: false
+
+ chart.key.color.shape
+ This can be square, circle or line and controls how the color indicators in the key appear.
+ Default: square
+
+
+
+
Interactive features
+chart.contextmenu
+ An array of context menu items. You cannot have context menus AND tooltips, only one or the other. More information on context menus is here. Default: [] (An empty array)
+
+chart.tooltips
+ An array of tooltips for the chart. Default: An empty array
+
+chart.tooltips.effect
+ The visual effect used when showing tooltips. Can be either fade or expand. Default: fade
+
+chart.tooltips.css.class
+ This is the name of the CSS class the graph uses. Default: RGraph_tooltip
+
+chart.tooltips.override
+ If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the tooltips documentation page Default: null
+
+chart.annotatable
+ Whether annotations are enabled for the chart (ie you can draw on the chart interactively. Default: false
+
+chart.annotate.color
+ If you do not allow the use of the palette, then this will be the only colour allowed for annotations. Default: black
+
+chart.resizable
+ 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). Default: false
+
+
Zoom
+chart.zoom.mode
+ Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: thumbnail and canvas. Default: canvas
+
+chart.zoom.factor
+ This is the factor that the graph will be zoomed by (bigger values means more zoom) Default: 1.5
+
+chart.zoom.fade.in
+ Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.fade.out
+ Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.hdir
+ The horizontal direction of the zoom. Possible values are: left, center, right Default: right
+
+chart.zoom.vdir
+ The vertical direction of the zoom. Possible values are: up, center, down Default: down
+
+chart.zoom.delay
+ The delay (in milliseconds) between frames. Default: 50
+
+chart.zoom.frames
+ The number of frames in the zoom animation. Default: 10
+
+chart.zoom.shadow
+ Whether or not the zoomed canvas has a shadow or not. Default: true
+
+chart.zoom.thumbnail.width
+ When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.thumbnail.height
+ When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.background
+ Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page. Default: true
+
+
+
+
\ No newline at end of file
diff --git a/RGraph/docs/hprogress.html b/RGraph/docs/hprogress.html
new file mode 100644
index 0000000..a5a2e4d
--- /dev/null
+++ b/RGraph/docs/hprogress.html
@@ -0,0 +1,327 @@
+
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - horizontal progress bar documentation
+
+
+
+
+
+
+
+
+
+
+
+
+chart.tickmarks
+ Whether the tickmarks are drawn. Default: true
+
+chart.tickmarks.color
+ The color used for tickmarks. Default: black
+
+chart.tickmarks.inner
+ This controls whether the bar has inner tickmarks Default: false
+
+chart.value
+ The indicated value. You don't need to set this because it's one of the arguments to the constructor.
+
+chart.max
+ The maximum value. You don't need to set this because it's one of the arguments to the constructor.
+
+chart.numticks
+ How many tick marks there are. Default: 10
+
+chart.numticks.inner
+ How many inner tick marks there are. Default: 50
+
+chart.arrows
+ This stipulates that two indicator arrows are drawn. It works best if you have tickmarks off, and no title. Default: false
+
+
Margins
+chart.gutter
+ The size of the gutter. Default: 25
+
+
Colors
+chart.colors
+ The colors of the bar(s). This can be a solid color, or a gradient that you create. Default: [#0c0]
+
+chart.background.color
+ The background color. Default: #eee
+
+
Shadow
+chart.shadow
+ Whether the progress bar has a shadow. This uses the canvas shadow API and therefore is only supported on Chrome 2, Safari 3.1 and Firefox 3.1 (and above). Default: false
+
+chart.shadow.offsetx
+ The X offset of the progress bar shadow. Default: 3
+
+chart.shadow.offsety
+ The Y offset of the progress bar shadow. Default: 3
+
+chart.shadow.color
+ The color of the shadow. Default: rgba(0,0,0,0.5)
+
+chart.shadow.blur
+ The blurring effect that is applied to the shadow. Default: 3
+
+
Labels and text
+chart.text.font
+ The font used to render the text. Default: Verdana
+
+chart.text.color
+ The color of the labels. Default: black
+
+chart.text.size
+ The size of the text (in points). Default: 10
+
+chart.labels
+ Labels that are applied to the graph. Default: An empty array
+
+
Scale
+chart.units.pre
+ The units that the Y scale is measured in (these are preppend to the number). Default: none
+
+chart.units.post
+ The units that the Y scale is measured in (these are appended to the number). Default: none
+
+
Titles
+chart.title
+ The title of the progress bar. Default: An empty string
+
+
+chart.title.background
+The background color (if any) for the title.
+Default: null
+
+
+chart.title.hpos
+ 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. Default: null
+
+chart.title.vpos
+ 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. Default: null
+
+chart.title.color
+ The color of the title. Default: black
+
+
Interactive features
+chart.tooltips
+ An array, albeit one element only. This is shown when the progress bar is clicked on. This can contain HTML. Default: An empty array
+
+chart.tooltips.effect
+ The animated effect used for showing the tooltip. Can be either fade or expand. Default: fade
+
+chart.tooltips.css.class
+ This is the name of the CSS class the graph uses. Default: RGraph_tooltip
+
+chart.tooltips.override
+ If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the tooltips documentation page Default: null
+
+chart.contextmenu
+ An array of context menu items. More information on context menus is here. Default: [] (An empty array)
+
+chart.annotatable
+ Whether annotations are enabled for the chart (ie you can draw on the chart interactively. Default: false
+
+chart.annotate.color
+ If you do not allow the use of the palette, then this will be the only colour allowed for annotations. Default: black
+
+chart.resizable
+ 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). Default: false
+
+chart.adjustable
+ Defaulting to false, this determines whether your progress bar will be adjustable (click the bar and drag it). Default: false
+
+
Zoom
+chart.zoom.factor
+ This is the factor that the graph will be zoomed by (bigger values means more zoom) Default: 1.5
+
+chart.zoom.fade.in
+ Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.fade.out
+ Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.hdir
+ The horizontal direction of the zoom. Possible values are: left, center, right Default: right
+
+chart.zoom.vdir
+ The vertical direction of the zoom. Possible values are: up, center, down Default: down
+
+chart.zoom.delay
+ The delay (in milliseconds) between frames. Default: 50
+
+chart.zoom.frames
+ The number of frames in the zoom animation. Default: 10
+
+chart.zoom.shadow
+ Whether or not the zoomed canvas has a shadow or not. Default: true
+
+chart.zoom.background
+ Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page. Default: true
+ HTML5 introduces a new HTML element - the CANVAS tag. This tag allows for two dimensional drawing easily using Javascript.
+ This makes it perfect for producing graphs. Because Javascript runs on your users computer, none of the stress on your server
+ normally associated with producing graphs is incurred. Not only that but because
+ of the greater processing power that is typically available on users' computers, they will be much faster. And,
+ because the code can be both compressed (for example if you're using Apache, mod_gzip will do this automatically for you) and
+ cached, bandwidth usage can be massively reduced. This makes it economically attractive to employ, (ie it can save you
+ money...).
+
+
+
+ Imagine, you are creating 100,000 graphs a day and the data is such that the resulting graphs cannot be cached. With the RGraph
+ library you can reduce that figure to zero. All the processing and graph creation is done by each individual client, much like
+ rendering the HTML you send to them. So you don't have to send any images, you simply send them the Javascript libraries once.
+ So, much lower bandwidth bills and far less strain on your webserver.
+
+
+
+ And if that wasn't enough, because the graphs are created using Javascript, they will work offline if you view a .html page
+ on your own PC. Download the archive and see! Useful if you need to do a presentation for example and want to use the same
+ graph(s) as your website.
+
+ Since the graphs are produced using HTML5 features (the new canvas tag), client support is currently:
+
+
+
+
Mozilla Firefox 3.0+
+
Google Chrome 1+
+
Apple Safari 3+
+
Opera 9.5+
+
Microsoft Internet Explorer 8+ (see note)
+
iPhone (text support from iOS v4+)
+
iPad (text support from iOS v4.2+)
+
+
+
+ The HTML5 canvas tag is part of the HTML5 specification,
+ and all of the above browsers have some sort of support for it.
+
+
+
+ Canvas & Microsoft Internet Explorer (MSIE)
+ Microsoft Internet Explorer 8 doesn't natively support the HTML5 <canvas> tag. To support
+ MSIE 8 you will need to use either
+ Google Chrome Frame or
+ ExCanvas from Google
+ (which is included in the RGraph archive). Read more about Internet Explorer compatibility
+ here.
+
+
+
+
+ Starting with preview 3 Microsoft Internet Explorer 9 has full support for <canvas>. You can view some screenshots
+ here.
+ MSIE 6 and 7 are supported by way of Google Chrome Frame.
+
+
+
+
+ RGraph and older browsers
+ Older browsers (eg Chrome 1, Firefox 3, Safari 3, Opera 9.5) are supported, however if they don't support the canvas shadow or
+ text APIs, these will naturally be unavailable. Earlier versions of these browsers may work, but are untested.
+
+
+
+
+
Improving the performance of your graphs
+
+
+ Although performance is excellent, (traditionally your webserver has been
+ producing all of your graphs, and now the client produces them, and typically only one at a time), you may still want to tune
+ RGraph further. The biggest thing you can do is use compression, which reduces the initial download time of the libraries, but
+ there are a number of things you can do:
+
+
+
+
+ Compression HTTP compression can dramatically reduce your bandwidth bills and increase the speed
+ of your website. The RGraph.common.core.js file for example used to be over 100k, but with compression this was reduced
+ to around 17k. Less than a fifth of the original size! If you do only one thing to aid performance,
+ then it should be this.
+
+
+ To achieve this with Apache you have a few options:
+
+
+
+
You can use the Apache module mod_gzip which compresses the libraries on the fly.
+
+ You can compress the libraries manually using the gzip command, rename them to remove the .gz suffix
+ and add the header using an Apache directive
+ (eg AddEncoding gzip .js). If you have some sort of
+ release process/script, it would make sense to add this to it to automate the procedure.
+
+
+
+
+
+
+ Minification
+ Minification reduces the size of the library before compression takes effect, removing unnecessary spaces and comments etc.
+ A combination of minification and compression will give superb results. For example, before being split up into seperate files,
+ minification combined with compression reduced the common library from over 100k to roughly 10k (!). There is a PHP shell
+ script that you can use to minify the libraries in the scripts directory.
+
+
+ You can get pre-minified versions of the libraries here.
+
+
+
+
+
+
+ Pre-emptive caching
+ Slightly different to caching itself, is pre-emptive caching. This involves downloading the libraries before the page that requires
+ them is shown. This way, they're already in the users browser cache and the graph will subsequently appear to be much much
+ quicker. An example of this would be having the library included at the bottom of your index page of your website (optionally
+ with the defer="defer" attribute). The script can be downloaded at will because the page doesn't actually use it, but
+ for subsequent pages it will already be in the users browser cache.
+
+
+
+
+
+ Caching
+ Since the libraries you're using won't change that often, you can set distant Expires: headers on them, or appropriate
+ Cache-Control: headers, and the client will not even have to contact your server for it. When you want to make sure
+ the library is re-downloaded (eg. you update the library), then simply change the filename.
+
+
+
+
+
+ Script tag placement
+ According to Yahoo! guidelines placing the <SCRIPT>
+ tag at the bottom of the page can increase the percieved load time. If you do this, then your graphs should be
+ created in the window.onload event, otherwise the browser may try to create them without the library
+ having been loaded, and will therefore subsequently fail.
+
+
+
+ You should also consider the effect that this has when your page is rather weighty. If the page is weighty there
+ will be a small delay before the onload event fires, and therefore creates the graph. This might not be so bad if the
+ graph is not immediately visible, however if it is then you should carefully consider using the onload event. You
+ may wish to load the library in the page header, define the canvas tag and then immediately define the javascript that creates the graph. This way
+ the graph will be created and shown, and then the rest of the page loads. The end result is that your graph
+ appears to be faster.
+
+
+
+ Between the onload event, asychronous Javascript and careful tag placement, you will need to experiment to get the right result
+ for you.
+
+
+
+ Document structure
+ The structure of your document can have a significant impact on how fast your graphs are displayed. If, for example, you use
+ tables for layout, this can delay the display of elements that are affected by the size of the table. Where possible, you
+ should consider trying to convert your layout to DIVs. An example of this is the front page of this website. The graphs
+ were right aligned using a table as a container. This caused a visible delay when showing them. In this case it was a
+ simple matter to convert the page to use DIVs, and the page subsequently displays much faster.
+
+
+
+
+ Creating your graphs asynchronously
+ Where possible, you may wish to create your graphs asynchronously. This allows the browser to continue rendering the page
+ immediately after getting to the code that creates the graph. This might not be perceptible if you don't have a lot of
+ graphs, or your page is small. You can read a little more about this and see example code here.
+
+
+
+ Note that recent releases of Google Chrome (from a dev release of version 4) have had an issue with creating graphs
+ asynchronously, which presents itself by not drawing text sometimes (it's not consistent). Simply not using
+ asynchronous graph production in this case resolves the issue.
+
+
+
+ DOMContentLoaded event
+ Using this event can speed up the display of your graphs signifcantly compared to the more well known onload event.
+ It is supported by Chrome, Gecko based browsers (ie Firefox), Safari, Opera and Internet Explorer 9. This event fires when
+ the structure of the page is loaded, but not necessarily the images or CSS. This means that if your page is laden with
+ images, this event will fire before the onload event, thus creating your graphs quicker. The effect can be very noticeable.
+
+
+ You can read more about the DOMContentLoaded event on the Mozilla site, here,
+ and the Microsoft site here.
+ There's an example here.
+
+
+
+
+ AJAX requests
+ If you can take advantage of AJAX, you can use this method to retrieve data from your server. If, for example, you have a graph that
+ shows ongoing information, instead of simply refreshing the entire page, you could use an AJAX request to just retrieve the
+ data that you want and update the graph that way. This reduces the amount of data needed to be transferred, thus reducing the
+ bandwidth used, and will be quicker than a full page refresh, particularly if your page is weighty. There's a simple AJAX
+ function that you can use below.
+
+
+
+
+ Combining libraries
+ If your performance requirements are extreme, then you may wish to consider combining the libraries into a single file.
+ This won't save on the size of the individual libraries, but will save on the headers that are sent as part of the response.
+ If a typical response sends 500 bytes worth of headers, and you send four graph libraries, then combining the libraries
+ would save 1500 bytes. Multiple factors need to be considered though, including things like caching, which can circumvent
+ the unneccessary repeated downloading of the libraries.
+
+
+ Another effect of combining libraries is reducing the amount of HTTP connections needed to retrieve them. Most browsers
+ have a limit on how many connections they can create simultaneously, so if they're not being used to retrieve your
+ graph libraries, they can be used for something else. Reducing the number of HTTP connections also eliminates the time
+ spent setting up those connections.
+
+
+
+
+ A reasonable performance strategy
+
+
+ Although there's a lot you can do in regards to performance, a few of the points here will suffice for most
+ websites:
+
+
+
Compression
+
Minification
+
Pre-emptive caching
+
Caching
+
+
+ The number one thing you should do is compress your libraries. This has multiple benefits and provides by far the most gain,
+ effectively for free. Secondly, use the minified libraries. Since you can download them here,
+ you might as well use them. Then we have pre-emptive caching. Since most websites won't show graphs on the front page or will
+ have a login page that is shown before any graphs, this effectively eliminates the graph library download. And lastly caching
+ should be done as a matter of course. There's no reason to keep downloading the same library so even caching for only 30 minutes
+ (or the duration of an average visit to your website) will produce results.
+
+
+
+
+
+
+
+
+
Implementing RGraph
+
+
+ Getting RGraph up and running is very easy and consists of three steps. If you're having trouble I suggest you get hold of a copy of
+ Firefox along with Firebug - its
+ Javascript error console will make debugging your issue much easier. Many problems are down to a library not having been included or
+ not using the onload event when you need to. You might also benefit from using the Web Developer toolbar
+ for Firefox. This allows you to easily disable caching, thus eliminating any problems that that causes. You could equally use
+ the Chrome developer tools (CTRL+SHIFT+J), optionally in docked mode, which also provides a good quality Javascript console.
+
+
+
+
+ Include the libraries (put this in your documents <HEAD>):
+
+<script src="RGraph.common.core.js"></script>
+
+<script src="RGraph.common.adjusting.js"></script> <!-- Just needed for adjusting -->
+<script src="RGraph.common.annotate.js"></script> <!-- Just needed for annotating -->
+<script src="RGraph.common.context.js"></script> <!-- Just needed for context menus -->
+<script src="RGraph.common.resizing.js"></script> <!-- Just needed for resizing -->
+<script src="RGraph.common.tooltips.js"></script> <!-- Just needed for tooltips -->
+<script src="RGraph.common.zoom.js"></script> <!-- Just needed for zoom -->
+
+<script src="RGraph.bar.js"></script> <!-- Just needed for bar graphs -->
+<script src="RGraph.bipolar.js"></script> <!-- Just needed for bi-polar graphs -->
+<script src="RGraph.funnel.js"></script> <!-- Just needed for funnel charts -->
+<script src="RGraph.gantt.js"></script> <!-- Just needed for gantt charts -->
+<script src="RGraph.hbar.js"></script> <!-- Just needed for horizontal bar charts -->
+<script src="RGraph.hprogress.js"></script> <!-- Just needed for horizontal progress bars -->
+<script src="RGraph.led.js"></script> <!-- Just needed for LED charts -->
+<script src="RGraph.line.js"></script> <!-- Just needed for line graphs -->
+<script src="RGraph.meter.js"></script> <!-- Just needed for meter charts -->
+<script src="RGraph.odo.js"></script> <!-- Just needed for odometers -->
+<script src="RGraph.pie.js"></script> <!-- Just needed for pie AND donut charts -->
+<script src="RGraph.rose.js"></script> <!-- Just needed for rose charts -->
+<script src="RGraph.rscatter.js"></script> <!-- Just needed for rscatter charts -->
+<script src="RGraph.scatter.js"></script> <!-- Just needed for scatter graphs -->
+<script src="RGraph.tradar.js"></script> <!-- Just needed for traditional radar charts -->
+<script src="RGraph.vprogress.js"></script> <!-- Just needed for vertical progress bars -->
+
+
+
+
+ Add the canvas tag (put it where you want the graph to appear):
+
+ Create the graph (since it is using the onload event, you can put this anywhere):
+
+
+<script>
+ window.onload = function ()
+ {
+ var data = [280, 45, 133, 166, 84, 259, 266, 960, 219, 311, 67, 89];
+
+ var bar = new RGraph.Bar('myCanvas', data);
+ bar.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+ bar.Set('chart.gutter', 35);
+ bar.Draw();
+ }
+</script>
+
+
+
+
+
+ There's also a very basic example of using RGraph, that does very little. It can be helpful to
+ illustrate how you can get RGraph up and running.
+
+
+
Common library split (17th April 2010)
+
+ The common library has now been split into separate files. This was because the single common library had become far too large.
+ If you don't use any of the dynamic features, then you still need to change your code, as RGraph.common.js is now
+ called RGraph.common.core.js.
+
+
+
+
+
Suggested structure for RGraph
+
+
+
+
+ The suggested layout structure for the RGraph libraries is shown on the right. The www.example.com folder represents
+ the root/top level of your website with the javascript directory beneath that. The css and images
+ folders are shown for
+ illustrative purposes only. If you follow this layout then your URLs to the RGraph libraries would be:
+
+ By using this structure you make RGraph easy to update should you need to, and also keep all the RGraph libraries in
+ one, easy to find, place.
+
+
+
+
+
+
+
Integration with server side scripting
+
+
+ This is a very easy process, as easy as sending content to the browser. All you need to do is make the data variable
+ (as in the example below) contain the data you want to be displayed. Eg:
+
<?php
+ // This simply makes a string out of the array of data
+ $myData = join(',', array(78,16,26,23,25,51,34,64,84,84));
+
+ // This prints out the required HTML markup
+ print('<script src="RGraph.common.core.js"></script>' . "\n");
+ print('<script src="RGraph.line.js"></script>' . "\n\n");
+ print('<canvas id="myCanvasTag" width="600" height="200">[No canvas support]</canvas>' . "\n\n");
+ print('<script>' . "\n");
+ print(' var data = [' . $myData . '];' . "\n\n");
+ print(' var line = new RGraph.Line("myCanvasTag", data);' . "\n");
+ print(' line.Set("chart.labels", ["Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov"]);' . "\n");
+ print(' line.Draw();' . "\n");
+ print('</script>');
+?>
+
+
+
+ Strictly speaking the var isn't necessary, however if you put the code inside a
+ function (like window.onload), it's probably best to do so as using var will
+ make the variable local, and not global. So doing so will help prevent naming clashes.
+
+
+
+
+
+
Integration with PHP & MySQL
+
+
+ This is a simple matter of formatting what you get back from MySQL into a string, as the MySQL dump and PHP code
+ below shows (it's based on a database called RGraph_example):
+
+
+
+#
+# Table structure for table `daily_statistics`
+#
+
+CREATE TABLE `daily_statistics` (
+ `st_day` char(9) NOT NULL,
+ `st_statistics` tinyint(4) NOT NULL,
+ UNIQUE KEY `st_day` (`st_day`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+#
+# Dumping data for table `daily_statistics`
+#
+
+INSERT INTO `daily_statistics` VALUES ('Mon', 124);
+INSERT INTO `daily_statistics` VALUES ('Tue', 95);
+INSERT INTO `daily_statistics` VALUES ('Wed', 64);
+INSERT INTO `daily_statistics` VALUES ('Thu', 94);
+INSERT INTO `daily_statistics` VALUES ('Fri', 75);
+INSERT INTO `daily_statistics` VALUES ('Sat', 98);
+INSERT INTO `daily_statistics` VALUES ('Sun', 84);
+
+
+
+<?php
+ /**
+ * Change these to your own credentials
+ */
+ $hostname = "localhost";
+ $username = "root";
+ $password = "PASSWORD";
+ $database = "RGraph_example";
+
+ $connection = mysql_connect($hostname, $username, $password) OR die('Could not connect to MySQL: ' . mysql_error());
+ mysql_select_db($database);
+
+ $result = mysql_query("SELECT st_day, st_statistics FROM daily_statistics");
+ if ($result) {
+
+ $labels = array();
+ $data = array();
+
+ while ($row = mysql_fetch_assoc($result)) {
+ $labels[] = $row["st_day"];
+ $data[] = $row["st_statistics"];
+ }
+
+ // Now you can aggregate all the data into one string
+ $data_string = "[" . join(", ", $data) . "]";
+ $labels_string = "['" . join("', '", $labels) . "']";
+ } else {
+ print('MySQL query failed with error: ' . mysql_error());
+ }
+?>
+<html>
+<head>
+
+ <!-- Don't forget to update these paths -->
+
+ <script src="libraries/RGraph.common.core.js" ></script>
+ <script src="libraries/RGraph.line.js" ></script>
+
+</head>
+<body>
+
+ <canvas id="cvs" width="600" height="250">[No canvas support]</canvas>
+ <script>
+ graph = new RGraph.Line('cvs', <?php print($data_string) ?>);
+ graph.Set('chart.background.grid.autofit', true);
+ graph.Set('chart.gutter', 17);
+ graph.Set('chart.hmargin', 10);
+ graph.Set('chart.tickmarks', 'endcircle');
+ graph.Set('chart.labels', <?php print($labels_string) ?>);
+
+ graph.context.translate(12, 0);
+
+ graph.Draw();
+ </script>
+
+</body>
+</html>
+
+
+
+ This PHP code provides the data in two strings - $labels_string and $data_string. These variables are then used
+ in the RGraph code to provide the data and the labels.
+
+
+
Remember:
+
+
+
Change the database hostname/username/password/database to match your own.
+
Ensure you have the correct paths to the RGraph libraries.
+
+
+
+
+
Making AJAX requests
+
+
+ Note:
+ It is important that you're careful with types when making AJAX requests. Since the response is initially a string,
+ and your AJAX function/library may not do conversions for you, you may need to convert these strings to numbers. To
+ do this you can use the Number() or parseInt() functions. For example:
+
+
+
+<script>
+ num = Number('23');
+ num = parseInt('43');
+</script>
+
+
+
+ Here is a simple function that you could use to get data from your server using AJAX:
+
+
+
+<script>
+ /**
+ * Makes an AJAX call. It calls the given callback (a function) when ready
+ *
+ * @param string url The URL to retrieve
+ * @param function callback A function object that is called when the response is ready, there's an example below
+ * called "myCallback".
+ */
+ function AjaxCall (url, callback)
+ {
+ // Mozilla, Safari, ...
+ if (window.XMLHttpRequest) {
+ var httpRequest = new XMLHttpRequest();
+
+ // MSIE
+ } else if (window.ActiveXObject) {
+ var httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
+ }
+
+ httpRequest.onreadystatechange = callback;
+
+ httpRequest.open('GET', url, true);
+ httpRequest.send();
+ }
+
+
+ /**
+ * This sample callback function is called when the data is ready (readyState=4)
+ */
+ function myCallback ()
+ {
+ if (this.readyState == 4 && this.status == 200) {
+ // Everything is good, the response is received
+ alert(this.responseText);
+ }
+ }
+</script>
+
+ Support is available via a Google Groups forum. If you think that the issue you have is common, try the issues
+ page first, and then try searching the forum in case your question has been answered previously. If that all yields nothing,
+ post a question to the forum.
+
+
+
+ If you want to keep up-to-date on RGraph, then subscribe to the group, as I post update notifications here. You can also follow me on
+ Twitter. I post update notifications here along with HTML5 related news.
+
+ These are some common issues that you should be aware of. If you're having trouble, you may want to look through these to see
+ if any apply to you or may be the source of your problem.
+
+
+
+
Tooltips not working as of the October 2010 release
+
+
+ If you're specifying numbers instead of strings for your tooltips, they will not work any more. Simply cast them to
+ strings, like this:
+
+
+
+
+// This WILL NOT work any more
+myBar.Set('chart.tooltips', [56, 67, 53]);
+
+
+// Do any of these instead
+myBar.Set('chart.tooltips', ['56', (67).toString(), String(53)]);
+
+
+
+
Annotations aren't saved when running locally in Mozilla Firefox
+
+
+ The solution here is to run the graphs using a web server. At this time (March 2010) only Safari, Chrome and Opera
+ support saving annotations when running locally.
+
+
+
+
Missing text in Google Chrome
+
+
+ Since one of the Chrome 4 dev releases there has been an issue with Google Chrome 4 and 5, asynchronous processing and not rendering
+ graph labels. This has been remedied by simply not using asynchronous processing. Because of the tag placement on the front page,
+ the effect shouldn't be apparent. Other browsers (eg Firefox, Safari, Opera, MSIE) are fine.
+
+
+
+
Firefox, tooltips and the clipboard
+
+
+ Firefox, tooltips and using the clipboard is a little convoluted. To copy the text in a tooltip you must do the following:
+
+
+
+
Select the text you want with the mouse.
+
Press CTRL+C (it may be a different key combination if you're not using Windows) to copy the text to the clipboard.
+
+
+
+ Note: Recent versions of Firefox 4 (from beta 6 onwards) appear to work as expected, and you can copy text with the mouse as normal.
+
+
+
Shadows in Google Chrome and the line chart
+
+
+ Shadows in recent versions of Google Chrome are somewhat broken. Firefox, MSIE, Opera and Safari are fine. The reason for this
+ error is a combination of factors it seems - shadow blurring and line width. Fixes have been added to allow shadow blurring and
+ a 1 pixel linewidth, though some graph types may still be affected.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/RGraph/docs/keys.html b/RGraph/docs/keys.html
new file mode 100644
index 0000000..ee26238
--- /dev/null
+++ b/RGraph/docs/keys.html
@@ -0,0 +1,211 @@
+
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - Examples of keys
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
RGraph: HTML5 canvas graph library - Examples of keys
+
+
+
+
+
+
+
+ As of 4th December 2010 the code that produces the keys has been rewritten. There are two variants of keys available,
+ a horizontal one designed to sit in the gutter, and a vertical one that is designed to sit on top of (ie over) the graph.
+
+
+
+ The actual positioning is now configurable though, so you could have a horizontal key and position it to sit on top
+ of the chart.
+
+
+
Key properties
+
+
+ The available key properties and their defaults are listed below (some graph types have slightly different defaults to
+ suit):
+
+
+
+
+
chart.key ([] (An empty array))
+
chart.key.position (graph)
+
chart.key.position.gutter.boxed (true)
+
chart.key.position.x (null)
+
chart.key.position.y (null)
+
chart.key.shadow (false)
+
chart.key.shadow.offsetx (2)
+
chart.key.shadow.offsety (2)
+
chart.key.shadow.color (#666)
+
chart.key.shadow.blur (3)
+
chart.key.color.shape (square)
+
chart.key.background (white)
+
chart.key.rounded (true)
+
chart.key.text.size (10)
+
+
+
+
\ No newline at end of file
diff --git a/RGraph/docs/led.html b/RGraph/docs/led.html
new file mode 100644
index 0000000..da51561
--- /dev/null
+++ b/RGraph/docs/led.html
@@ -0,0 +1,230 @@
+
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - LED Grid documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+chart.dark
+ Color of the darkened (ie unlit) lights Default: #eee
+
+chart.light
+ Color of lit lights Default: #f66
+
+chart.background
+ The color of the background. Default: white
+
+
Interactive features
+chart.resizable
+ 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). Default: false
+
+
Zoom
+chart.zoom.mode
+ Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: thumbnail and canvas. Default: canvas
+
+chart.zoom.factor
+ This is the factor that the graph will be zoomed by (bigger values means more zoom) Default: 1.5
+
+chart.zoom.fade.in
+ Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.fade.out
+ Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.hdir
+ The horizontal direction of the zoom. Possible values are: left, center, right Default: right
+
+chart.zoom.vdir
+ The vertical direction of the zoom. Possible values are: up, center, down Default: down
+
+chart.zoom.delay
+ The delay (in milliseconds) between frames. Default: 50
+
+chart.zoom.frames
+ The number of frames in the zoom animation. Default: 10
+
+chart.zoom.shadow
+ Whether or not the zoomed canvas has a shadow or not. Default: true
+
+chart.zoom.thumbnail.width
+ When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.thumbnail.height
+ When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.background
+ Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page. Default: true
+
+
+
+
\ No newline at end of file
diff --git a/RGraph/docs/licensing.html b/RGraph/docs/licensing.html
new file mode 100644
index 0000000..8190e8a
--- /dev/null
+++ b/RGraph/docs/licensing.html
@@ -0,0 +1,258 @@
+
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - Licensing FAQs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ For commercial/business use yes, you need a license to use RGraph. RGraph is not free software.
+ For non-commercial use (eg personal, charity and educational), RGraph is freely usable and you
+ don't need to buy a license though. You can read the license itself
+ here.
+
+
+
+
+
+
+ How much is a license?
+ A license is a one-time fee of £49 (UK pounds). That's roughly $70 (US dollars) at
+ the time of writing.
+
+
+
+
+
+ Where can I read the license?
+ The license is further down this page.
+
+
+
+
+
+ What does the license cover?
+ The RGraph license covers RGraph as a whole. Excepting ExCanvas, all code that you find in the RGraph archive is
+ covered by the RGraph license. The license also covers code that I've written that is available from phpguru.org.
+ This is a mainly
+ PHP focused website, but also plays host to a fair amount of Javascript too. So if your development language of choice is not PHP,
+ you may still find something of use there.
+
+
+
+
+
+ Can you send me an invoice?
+ Of course, simply go here: http://www.rgraph.net/invoice.html, enter your email
+ address and you'll be sent an invoice that you can use for tax purposes.
+
+
+
+
+
+ Can I use PayPal?
+
+
+
+ Yes, you can use PayPal if you prefer. Please use the PayPal button shown here to start the process.
+
+
+
+
+
+
+
Contact
+
+ If you have a question about RGraph licensing, you can send it to licensing@rgraph.net
+ or you can order directly using Google Checkout.
+
+
+
+
+
License
+
+
+ The license text:
+
+
+
+
+
\ No newline at end of file
diff --git a/RGraph/docs/line.html b/RGraph/docs/line.html
new file mode 100644
index 0000000..049da0d
--- /dev/null
+++ b/RGraph/docs/line.html
@@ -0,0 +1,745 @@
+
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - line chart documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+chart.background.barcolor1
+ The color of the background bars (1 of 2). Default: rgba(0,0,0,0)
+
+chart.background.barcolor2
+ The color of the background bars (2 of 2). Default: rgba(0,0,0,0)
+
+chart.background.grid
+ Whether to show the background grid or not. Default: true
+
+chart.background.grid.color
+ The color of the background grid. Default: #eee
+
+chart.background.hbars
+ An array of information stipulating horizontal colored bars. You can use these to indicate limits. Eg: myLine.Set('hbars', [[75, 10, 'yellow'], [85, 15, 'red']]); This would give you two bars, one red and a lower yellow bar. The units correspond to your scale, and are the starting point and the height. Default: null
+
+chart.background.grid.hsize
+ The horizontal size of the grid. Default: 25
+
+chart.background.grid.vsize
+ The vertical size of the grid. Default: 25
+
+chart.background.grid.width
+ The width of the background grid. Default: 1
+
+chart.background.grid.border
+ Determines whether a border line is drawn around the grid. Default: true
+
+chart.background.grid.hlines
+ Determines whether to draw the horizontal grid lines. Default: true
+
+chart.background.grid.vlines
+ Determines whether to draw the vertical grid lines. Default: true
+
+chart.background.grid.autofit
+ Instead of specifying a pixel width/height for the background grid, you can use autofit and specify how many horizontal and vertical lines you want. Default: false
+
+chart.background.grid.autofit.numhlines
+ When using autofit this allows you to specify how many horizontal grid lines you want. Default: 7
+
+chart.background.grid.autofit.numvlines
+ When using autofit this allows you to specify how many vertical grid lines you want. Default: 20
+
+chart.backdrop
+ When enabled this specifies that the line(s) will have a backdrop effect. You can control the transparency with the other backdrop settings). Default: false
+
+chart.backdrop.size
+ This controls the size/extent of the backdrop effect. Default: 30
+
+chart.backdrop.alpha
+ This controls how much transparency the backdrop effect has. It can go from 0 - 1. Default: 0.2
+
+
Labels and text
+
+
+ chart.labels.above
+ Whether the values are shown in labels drawn above the line.
+ Default: false
+
+
+ chart.labels.above.size
+ The size of the labels which are drawn above the line.
+ Default: 8
+
+
+ chart.labels
+ An array of the X labels for the graph.
+ Default: [] (An empty array)
+
+
+chart.labels.ingraph
+ An array of labels for the graph which are drawn "inside" the graph. If you have 5 data points then this should have a corresponding number of elements, though there is a shorthand available. Default: null
+
+chart.ylabels
+ Can be true or false and determines whether the chart has Y axis labels. Default: true
+
+chart.ylabels.invert
+ Reverses the Y axis so that 0 is at the top, instead of the bottom. Default: false
+
+chart.ylabels.count
+ A value (1, 3 or 5) that controls how many Y labels there are. Default: 5
+
+chart.ylabels.inside
+ This controls whether the Y labels are drawn inside the Y axis or not. If your labels are large, this may help. Default: false
+
+chart.ylabels.inside.color
+ If the Y labels are to be drawn inside the Y axis, this is used as the background color. Default: rgba(255,255,255,0.5)
+
+chart.xlabels.inside
+ This controls whether the X labels are drawn inside the X axis or not. By using this you can significantly reduce the size of the gutter needed. Default: false
+
+chart.xlabels.inside.color
+ If the X labels are to be drawn inside the X axis, this is used as the background color. Default: rgba(255,255,255,0.5)
+
+chart.text.size
+ The size of the text (in points). Default: 10
+
+chart.text.angle
+ The angle of the horizontal text labels (at the bottom of the graph). Previously this could be 0, 45 or 90, but now (31st July 2010) this can be any angle. Default: 0 (Horizontal)
+
+chart.text.font
+ The font used to render the text. Default: Verdana
+
+chart.text.color
+ The color of the labels. Default: black
+
+
Margins
+chart.gutter
+ The gutter of the graph. This is the bit of the graph that the labels are in. Default: 25
+
+chart.hmargin
+ The size of the horizontal margin. This is on the inside of the axes. Default: 0
+
+
Colors
+chart.colors
+ An array of line colors. Default: ['#f00', '#0f0', '', '#00f', '#f0f', '#ff0', '#0ff'] 9
+
+chart.colors.alternate
+ Set this to true if you want your line color(s) to be alternated. See note Default: false
+
+chart.fillstyle
+ A single color or an array of colors that filled line charts will use.
Important: This used to be a string, and still can be, but can now also be an array. Default: null
+
+chart.filled
+ Whether the area under the graph is filled or not. This looks best when there is no horizontal margin. Default: false
+
+chart.filled.range
+ This is useful for indicating a range. Exactly two datasets are required, with the space between them filled. This is useful for indicating a range.The line chart examples page demonstrates this in action. Default: false
+
+
Shadow
+chart.shadow
+ If true a shadow will be applied to the line. Default: false
+
+chart.shadow.color
+ The color of the shadow. As well as a single color definition, this can also be an array of colors. This means that if you have multiple lines on your chart, each can have a different shadow color. Default: rgba(0,0,0,0.5)
+
+chart.shadow.offsetx
+ The X offset in pixels for the shadow. Default: 3
+
+chart.shadow.offsety
+ The Y offset in pixels for the shadow. Default: 3
+
+chart.shadow.blur
+ The severity of the shadow blurring effect. Default: 3
+
+
Interactive features
+chart.tooltips
+ These are tooltips for the line(s). It should be an array of tooltips. If you have multiple lines, simply pass multiple arrays to the Set() method. Default: [] (An empty array)
+
+chart.tooltips.effect
+ The animated effect used for showing tooltips. Can be either fade or expand. Default: fade
+
+chart.tooltips.coords.adjust
+ If you translate() before drawing your graph to reduce wasted space, the coords used for tooltips may need adjusting by how much you translate() by. This setting is how to do it. It should be an array of the X/Y adjustments. There's an example of this on the misc documentation page. Default: [0,0]
+
+chart.tooltips.css.class
+ This is the name of the CSS class the graph uses. Default: RGraph_tooltip
+
+chart.tooltips.override
+ If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the tooltips documentation page Default: null
+
+chart.tooltips.highlight
+ If you don't want/need the graph to be highlighted and thus avoid redrawing, (eg When combining charts), then set this to false. Default: true
+
+chart.crosshairs
+ If true, you will get a crosshair centering on the current mouse position. Default: false
+
+chart.crosshairs.linewidth
+ This controls the linewidth of the crosshairs. Default: 1
+
+chart.crosshairs.color
+ The color of the crosshairs. Default: #333
+
+chart.contextmenu
+ An array of context menu items. Unlike the bar chart, you CAN have context menus at the same time as tooltips. More information on context menus is here. Default: [] (An empty array)
+
+chart.annotatable
+ Whether annotations are enabled for the chart (ie you can draw on the chart interactively. Default: false
+
+chart.annotate.color
+ If you do not allow the use of the palette, then this will be the only color allowed for annotations. Default: black
+
+chart.resizable
+ 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). Default: false
+
+chart.adjustable
+ Defaulting to false, this determines whether your graph will be adjustable (click a point and drag it). Default: false
+
+
Titles
+chart.title
+ The title of the chart. Default: none
+
+
+chart.title.background
+The background color (if any) for the title.
+Default: null
+
+
+chart.title.vpos
+ 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. Default: null
+
+chart.title.color
+ The color of the title. Default: black
+
+chart.title.xaxis
+ This allows to specify a title for the X axis. Default: none
+
+chart.title.yaxis
+ This allows to specify a title for the Y axis. Default: none
+
+chart.title.xaxis.pos
+ This is multiplied with the gutter to give the position of the X axis title. Default: 0.25
+
+chart.title.yaxis.pos
+ This is multiplied with the gutter to give the position of the Y axis title. Default: 0.25
+
+
+
+
+
Key
+
+
+ chart.key
+ An array of key information.
+ Default: [] (An empty array)
+
+
+ chart.key.background
+ 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.
+ Default: white
+
+
+ chart.key.position
+ Determines the position of the key.Either graph (default), or gutter.
+ Default: graph
+
+ chart.key.position.x
+ This allows you to specify a specific X coordinate for the key.
+ Default: null
+
+ chart.key.position.y
+ This allows you to specify a specific Y coordinate for the key.
+ Default: null
+
+ chart.key.position.gutter.boxed
+ If you have the key in gutter mode (ie horizontal), this allows you to give a background color.
+ Default: true
+
+
+ chart.key.shadow
+ Whether a small drop shadow is applied to the key.
+ Default: false
+
+
+ chart.key.shadow.color
+ The color of the shadow.
+ Default: #666
+
+
+ chart.key.shadow.blur
+ The extent of the blurring effect used on the shadow.
+ Default: 3
+
+
+ chart.key.shadow.offsetx
+ The X offset of the shadow.
+ Default: 2
+
+
+ chart.key.shadow.offsety
+ The Y offset of the shadow.
+ Default: 2
+
+ chart.key.rounded
+ This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.
+ Default: false
+
+ chart.key.color.shape
+ This can be square, circle or line and controls how the color indicators in the key appear.
+ Default: square
+
+
+
Scale
+chart.units.post
+ The units (if any) that the Y axis is measured in (gets appended to the number) Default: none
+
+chart.units.pre
+ The units (if any) that the Y axis is measured in (gets preppended to the number) Default: none
+
+chart.scale.decimals
+ Determines the precision of the numbers used as the scale. Default: 0
+
+chart.scale.point
+ The character used as the decimal point. Default: .
+
+
+ chart.scale.thousand
+ The character used as the thousand separator Default: ,
+
+
+ chart.scale.round
+ Whether to round the maximum scale value up or not. This will produce slightly better scales in some instances.
+ Default: null
+
+
+chart.ymin
+ The optional minimum Y scale value. If not specified then it will be zero. Default: null
+
+
+ chart.ymax
+ The optional maximum Y scale value. If not specified then it will be calculated.
+ Default: null (It's calculated)
+
+ chart.outofbounds
+ Normally, out-of-bounds values are not drawn. By setting this to true you can change this behaviour.
+ Default: false
+
+
+
Axis properties
+chart.xticks
+ The number of X tickmarks. Default: null (linked to number of datapoints)
+
+chart.ticksize
+ The size of the tick marks. This only affects certain styles of tickmarks. Default: 3
+
+chart.tickdirection
+ Whether the ticks are above or below the axis. Default: -1 (-1 is below, 1 is above)
+
+chart.axis.color
+ The color of the axes. Default: black
+
+chart.xaxispos
+ The position of the X axis. It can be either bottom or center. Default: bottom
+
+chart.yaxispos
+ Specifies the Y axis position. Can be left or right. Default: left
+
+chart.axesontop
+ A minor option, this sets the axes to be redrawn after the graph has been drawn. This is only useful in a certain set of circumstances - the graph is filled and the line width is small. Default: false
+
+chart.noaxes
+ Whether the axes are drawn Default: false (the axes ARE drawn)
+
+
Zoom
+chart.zoom.mode
+ Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: thumbnail and canvas. Default: canvas
+
+chart.zoom.factor
+ This is the factor that the graph will be zoomed by (bigger values means more zoom) Default: 1.5
+
+chart.zoom.fade.in
+ Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.fade.out
+ Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.hdir
+ The horizontal direction of the zoom. Possible values are: left, center, right Default: right
+
+chart.zoom.vdir
+ The vertical direction of the zoom. Possible values are: up, center, down Default: down
+
+chart.zoom.delay
+ The delay (in milliseconds) between frames. Default: 50
+
+chart.zoom.frames
+ The number of frames in the zoom animation. Default: 10
+
+chart.zoom.shadow
+ Whether or not the zoomed canvas has a shadow or not. Default: true
+
+chart.zoom.thumbnail.width
+ When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.thumbnail.height
+ When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.background
+ Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page. Default: true
+
+
Miscellaneous
+chart.tickmarks
+ What kind of tickmarks to use on the graph. This can be:
dot
circle
filledcircle
endcircle
square
endsquare
filledsquare
filledendsquare
tick
halftick
endtick
cross
borderedcircle (same as dot)
arrow
filledarrow
Note that "arrow" and "filledarrow" look better with a thinner (1 or 2) linewidth setting. Also note that now (10th August 2010) as well as a string, this can be an array of different tickmark styles. Default: null
+
+chart.tickmarks.dot.color
+ This is the color of the BORDER around the dot/borderedcircle style tickmarks. Default: #fff
+
+chart.stepped
+ Draws the line as stepped. Useful for showing stock performance for example. Default: false
+
+chart.linewidth
+ The width of the line (ie the actual line on the line graph). Note: If your line is stepped and filled, and you don't want a trailing line indicating the last value, you can set this to zero. Default: 1
+
+chart.variant
+ At present this can only be 3d, and gives a small 3D effect. Default: null
+
+
+ chart.chromefix
+ Since version 6, Chrome has had a shadow bug, which becomes apparent when you use shadow blurring. This value defaults
+ to true and means that RGraph will skirt the bug with a small fix. Default: true
+
+
+
+
+
+
Methods
+
+
+ obj.getPoint()
+ This method makes it easier to get hold of which point on the Line chart has been hovered over. It returns an array of:
+
+
+
The graph object
+
The X coordinate
+
The Y coordinate
+
The numerical index of the point. This corresponds (for example) to the tooltips array, and the coordinates array
+
+
+ An example usage is:
+
+
+<canvas id="cvs" width="600" height="300">[No canvas support]</canvas>
+
+<script src="RGraph.common.core.js"></script>
+<script src="RGraph.line.js"></script>
+
+<script>
+ myGraph = new RGraph.Line('cvs', [10,4,2,4,1]);
+ myGraph.Set('chart.hmargin', 10);
+ myGraph.Set('chart.tickmarks', 'endcircle');
+ myGraph.Set('chart.labels', ['Fred','John','Kev','Lou','Pete']);
+ myGraph.Draw();
+
+
+ RGraph.Register(myGraph);
+
+ myGraph.canvas.onmousemove = function (e)
+ {
+ RGraph.FixEventObject(e);
+
+ var canvas = e.target;
+ var context = canvas.getContext('2d');
+ var obj = e.target.__object__;
+
+ // This is the new method which simplifies getting coordinates
+ var point = obj.getPoint(e);
+
+
+ if (point) {
+
+ canvas.style.cursor = 'pointer';
+
+ // Is this the same tooltip as the one (if any) that's already being shown
+ if (RGraph.Registry.Get('chart.tooltip') && RGraph.Registry.Get('chart.tooltip').__index__ == point[3]) {
+ return;
+ }
+
+ // Start afresh
+ RGraph.Redraw();
+
+ // Show the tooltip
+ RGraph.Tooltip(canvas, obj.Get('chart.labels')[point[3]], e.pageX, e.pageY, point[3]);
+
+ // Highlight the point
+ context.strokeStyle = 'gray';
+ context.fillStyle = 'white';
+ context.beginPath();
+ context.moveTo(point[1], point[2]);
+ context.arc(point[1], point[2], 2, 0, 6.26, 0);
+ context.stroke();
+ context.fill();
+
+ return;
+ }
+
+ canvas.style.cursor = 'default';
+ }
+
+ window.onclick = function ()
+ {
+ RGraph.Redraw();
+ }
+</script>
+
+
+
+
Combining the Line and Bar charts
+
+
+ You can combine the Bar and Line charts with a bit of magic. It's actually quite easy to do. Find out more here.
+ In the same vein, you can have Y axes on both the left and right.
+
+
+
+
+
Alternative colors
+
+
+ Instead of a string stipulating the color, each element of the colors array can itself be a two element array,
+ stipulating the up color, and the down color. To use alternating colors you must also stipulate the alternate property:
+
+ If none of the available tickmark styles are suitable, you can instead specify a function object that draws the tickmark,
+ enabling you to draw the tickmark yourself. For example:
+
+
+
+<script>
+ line.Set('chart.tickmarks', myTick);
+
+ /**
+ * The function that is called once per tickmark, to draw it
+ *
+ * @param object obj The graph object
+ * @param array data The entire line data
+ * @param number value The individual points value
+ * @param number index The current index, in the data array
+ * @param number x The X coordinate
+ * @param number y The Y coordinate
+ * @param string color The color of the line
+ * @param number prevX The previous X coordinate
+ * @param number prevY The previous Y coordinate
+ */
+ function myTick (obj, data, value, index, x, y, color, prevX, prevY)
+ {
+ // Draw your custom tick here
+ }
+</script>
+
+
+
\ No newline at end of file
diff --git a/RGraph/docs/meter.html b/RGraph/docs/meter.html
new file mode 100644
index 0000000..212edfc
--- /dev/null
+++ b/RGraph/docs/meter.html
@@ -0,0 +1,344 @@
+
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - meter documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
RGraph: HTML5 canvas graph library - Meter documentation
+
+
+
+
+ This is the Meter chart. Similar to half the Odometer. The difference is purely visual, but may well be more suited to
+ a control panel type application.
+
+chart.gutter
+ The gutter of the graph. Default: 25
+
+
Colors
+chart.border.color
+ The color of the outline (including tickmarks). Default: black
+
+chart.green.start
+ The value that the green area should begin at. Default: 35% of the maximum value
+
+chart.green.end
+ The value that the green area should end at. Default: The maximum value
+
+chart.green.color
+ The color of the green area, (can be any color).. Default: #207A20
+
+chart.yellow.start
+ The value that the yellow area should begin at. Default: 10% of the maximum value
+
+chart.yellow.end
+ The value that the yellow area should end at. Default: 35% of the maximum value
+
+chart.green.color
+ The color of the yellow area, (can be any color).. Default: #D0AC41
+
+chart.red.start
+ The value that the red area should begin at. Default: The minimum value
+
+chart.red.end
+ The value that the red area should end at. Default: 10% of the maximum value
+
+chart.red.color
+ The color of the red area, (can be any color).. Default: #9E1E1E
+
+
Labels and text
+chart.text.color
+ The color of the labels. Default: black
+
+chart.text.size
+ The size (in points) of the labels. Default: 10
+
+chart.text.font
+ The font used to render the text. Default: Verdana
+
+
Titles
+chart.title
+ The title of the graph, if any. Default: null
+
+
+chart.title.background
+The background color (if any) for the title.
+Default: null
+
+
+chart.title.color
+ The color of the title. Default: black
+
+chart.title.hpos
+ 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. Default: null
+
+chart.title.vpos
+ 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. Default: null
+
+
Scale
+chart.units.pre
+ The units that the labels are measured in. This string is displayed BEFORE the actual number, allowing you to specify values such as "$50". Default: none
+
+chart.units.post
+ The units that the labels are measured in. This string is displayed AFTER the actual number, allowing you to specify values such as "50ms". Default: none
+
+
Interactive features
+chart.contextmenu
+ An array of context menu items. More information on context menus is here. Default: [] (An empty array)
+
+chart.resizable
+ 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). Default: false
+
+chart.annotatable
+ Whether annotations are enabled for the chart (ie you can draw on the chart interactively). Default: false
+
+chart.annotate.color
+ If you do not allow the use of the palette, then this will be the only color allowed for annotations. Default: black
+
+
Shadow
+chart.shadow
+ If true a shadow will be applied to the meter. Default: false
+
+chart.shadow.color
+ The color of the shadow. Default: rgba(0,0,0,0.5)
+
+chart.shadow.offsetx
+ The X offset in pixels for the shadow. Default: 3
+
+chart.shadow.offsety
+ The Y offset in pixels for the shadow. Default: 3
+
+chart.shadow.blur
+ The severity of the shadow blurring effect. Default: 3
+
+
Zoom
+chart.zoom.mode
+ Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: thumbnail and canvas. Default: canvas
+
+chart.zoom.factor
+ This is the factor that the graph will be zoomed by (bigger values means more zoom) Default: 1.5
+
+chart.zoom.fade.in
+ Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.fade.out
+ Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.hdir
+ The horizontal direction of the zoom. Possible values are: left, center, right Default: right
+
+chart.zoom.vdir
+ The vertical direction of the zoom. Possible values are: up, center, down Default: down
+
+chart.zoom.delay
+ The delay (in milliseconds) between frames. Default: 50
+
+chart.zoom.frames
+ The number of frames in the zoom animation. Default: 10
+
+chart.zoom.shadow
+ Whether or not the zoomed canvas has a shadow or not. Default: true
+
+chart.zoom.thumbnail.width
+ When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.thumbnail.height
+ When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.background
+ Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page. Default: true
+
+
Miscellaneous
+chart.linewidth
+ The width of the outline of the Meter. Default: 2
Canvas fallback content and visually impaired users
+
+
+ When using the canvas element you should be aware of the accessibility of your graphs, for example where vision limited users are
+ concerned. Screen readers, for example, may not be able to convert a graph into something that is reasonable, so you should
+ consider
+ doing this yourself, possibly using the canvas fallback content (ie the content in between the canvas tags). A possible example
+ would be to put a table of data inside the canvas tag that the graph on the canvas represents. Doing this goes a long way
+ towards making the data available to everyone. You might also wish to consider using the full canvas
+ zoom or the resizing feature to enable people to enlarge the graph.
+
+
+
+
+
Upper and lower limits for horizontal bars
+
+
+ If you don't wish to specify an upper or lower limit for horizontal bars, and you just want them to extend to the upper or lower
+ limits of the graph, whatever they may be, you can specify null for the value determining how far they extend. For cases where
+ the X axis is in the middle and you're specifying a negative start value, or you want the bar to extend all the way to the
+ bottom, you can simply specify an arbitrary length (eg -999999). Eg:
+
+ To set the canvas width and height you must use the HTML width/height attributes and NOT CSS. If you do use CSS, the canvas
+ will be scaled, and not enlarged, to fit the new width/height. Eg:
+
+ Older versions of browsers are supported (assuming they have canvas support), however, if they don't support the canvas text
+ or shadow APIs these will naturally be unavailable. The graphs will still be drawn, though without shadows or text.
+
+
+
+
+
RGraph and Microsoft Internet Explorer
+
+
+ You can now use RGraph with Internet Explorer 8 in conjunction with ExCanvas, (which brings a degree of <canvas> support to MSIE).
+ Bear in mind though that shadows are not available and thus are simulated. Microsoft Internet Explorer 9 has native <canvas>
+ support. You can see some screenshots of it here.
+
+
+
+
+
Debugging tips
+
+
+ If you're having a hard time debugging your graph, try these:
+
+
+
+
Ensure you have only one graph on the page
+
Make sure you have disabled your web browsers cache (the Firefox Web Developer toolbar can do this for Firefox)
+
Try using Firebug (for Firefox) or the Webkit developer tools (for Google Chrome and Safari)
+
Reduce the page to the bare minimum.
+
Start with a very basic graph and build it up slowly.
+
+
+
+
+
+
+
Inspecting an RGraph graph
+
+
+ To help when debugging your RGraph graphs and canvas elements, you can use you browsers built in debugging tools.
+ An example is the WebKit developer tools which are available in Google Chrome and Apple Safari. There is a screenshot
+ of these tools (in docked mode) here. To view these
+ tools in Google Chrome press CTRL+SHIFT+J. Inspect the canvas, and then the associated object can be found via
+ the __object__ property.
+
+
+
+
+
+
Double click context menus
+
+
+ Windows Opera, Windows Safari, Mac Safari and Mac Firefox all attach the context menu to the double click event (left mouse button),
+ not the right, in order to make it more reliable.
+
+
+
+
+
+
Adding your own event handlers
+
+
+ Because each RGraph object exposes the canvas element (the same as what you get from document.getElementById()),
+ you can use normal procedures to add your own event handlers. Eg If you wanted to add your own onclick handler you could
+ do this:
+
+
+
+<script>
+ var myBar = new RGraph.Bar('cvs', [7,4,2,6,3,4,8]);
+ myBar.Draw();
+
+ myBar.canvas.onclick = function ()
+ {
+ }
+</script>
+
+
+ But what if, for example, you're using an RGraph feature which
+ uses the event handler that you need? In this case you can use the standard DOM method addEventListener(). This will add
+ your new event handler without replacing any existing one (ie the one installed by RGraph). For example:
+
+
+
+<script>
+ var myBar = new RGraph.Bar('cvs', [7,4,2,6,3,4,8]);
+ myBar.Draw();
+
+ function myFunc ()
+ {
+ }
+
+ myBar.canvas.addEventListener('click', myFunc, false)
+</script>
+
+
+
+
+
+
Carriage returns and newlines in labels
+
+
+ You can put carriage returns in your labels by using the string \r\n. This means your labels will span multiple lines.
+ Like so:
+
+ Historical reasons. There used to be two Radar charts in RGraph - the TRadar and an older one called the Pseudo radar chart.
+ The Pseudo Radar chart was converted into the Rose chart. Renaming the TRadar will only cause problems and there's no pressing
+ reason to do so, so for the moment it remains the TRadar chart.
+
+
+
+
+
+
Character set issues
+
+
+ If you're seeing strange, unrecognised characters in your text labels or titles, you may need to specify the correct
+ character set that the browser should use. In PHP you can do this with the header() function (which, as the
+ name suggests, sends a HTTP header):
+
+ If you use Apache, you could use the header directive, though this may be overridden by other directives,
+ eg AddDefaultCharset.
+
+
+
+
+
How to identify an RGraph object
+
+
+ Because identity can sometimes be a tricky affair, there are a few RGraph properties that you can use to check whether an object
+ is an RGraph object:
+
+
+
+
obj.isRGraph - This is a boolean that you can use to clearly identify an RGraph object.
+
obj.type - This identifies the type of an RGraph object. It is a string which contains a one word description of the objects graph type, eg bar/line/pie.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Static Y axis
+
+
+
+
+ A static Y axis is useful if you have a wide chart but limited space. Whilst not part of the RGraph libraries itself, it can be
+ achieved with a little HTML, like the graph shown. The HTML and the script to achieve this is documented in the source
+ of this page. It involves placing an extra canvas above the graph with the Y axis drawn on it. This canvas doesn't
+ move when the main canvas scrolls left and right.
+
+
+
+ Note: Because Firefox doesn't support the event.offsetX and event.offsetY properties, and they have to be simulated,
+ scrolling and tooltips in this case and this browser doesn't work.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Reducing white space
+
+
+
+
+
+
+ If the labels that you have require a large gutter you can reduce the amount of wasted space by using the standard 2D
+ context method translate(). This effectively moves the coordinate system so that (0,0) is no longer in the top
+ left corner, but whereever you put it. For example if you translate by (15,-15), the origin will then be 15 pixels right and
+ 15 pixels up compared to where it was.
+
+
+
+ Because the coordinate system is being changed things that rely on coordinates, eg tooltips, will be affected. For this reason
+ there is the property chart.tooltips.coords.adjust which you can use to tell RGraph that you've translated and the
+ tooltip coordinates will be adjusted appropriately.
+
+
+
+// This moves the graph to the right by 15px, and up by 15px. Do this before the call to .Draw()
+myObject.context.translate(15,-15);
+
+ You can read more information about this here.
+
+
+
+
+
Shorthand for in-graph labels
+
+ Instead of providing a full array of null elements for in-graph labels which may get a little unwieldy,
+ you can instead specify an integer that specifies how many elements to skip. Like this:
+
+ All the graphs have now (1st October 2010) been converted to DOM2 for tooltips event registration. This allows them to
+ be far more co-operative if you're using events. Tooltips will not be compatible with MSIE8 - the graphs will still be
+ drawn, albeit without tooltips.
+
+
+
+
+
+
+
+
+
Gutter suggestion function
+
+ RGraph now contains a function (RGraph.getGutterSuggest()) that will provide a simple suggestion for the gutter setting. This function is based on the
+ left gutter and labels and should be considered an approximate value.
+
+
+
+
+
+
+
+
+
Data types
+
+ If your data values aren't the correct type - ie numbers - it can cause problems. Pay particular attention to this
+ when you're getting your data from data sources which may be classed as strings, such as JSON or AJAX requests.
+
+
+
+
+
+
+
+
Creating your own Graph type
+
+ If you wish to create your own graph type, there is a skeleton file
+ here that you can use as a starting point.
+ This file contains the bare bones of an RGraph object, such as the .Get() and .Set() methods, as well as examples
+ of common properties.
+
RGraph: HTML5 canvas graph library - Microsoft Internet Explorer (MSIE) support
+
+
+
+
+
+
+ Microsoft Internet Explorer 9
+
+
+ Starting from preview 3, Internet Explorer 9 has support for canvas, including the text and shadow APIs. It also
+ benefits from hardware acceleration, and quick rendering times. You can see some screenshots
+ here.
+
+ As of December 2009 RGraph now works partially with Internet Explorer without Google Chrome Frame.
+ Graphs are rendered as VML. You are still recommended to use
+ Google Chrome Frame to get the best results.
+ The interactive features are unlikely to work correctly. RGraph only works with Microsoft
+ Internet Explorer 8.
+
+
+
+ Thanks go to everyone involved with the ExCanvas project for providing the ExCanvas library.
+
+
+
+
Getting hold of ExCanvas
+
+
+ Google ExCanvas is distributed with RGraph in the "excanvas" directory. There is a minified gzip compressed version, along
+ with the original.
+
+
+
+
Caveats
+
+
+
The interactive features of RGraph are unlikely to work correctly with MSIE 8.
+
Shadows are now available (on some graph types), albeit without blurring.
+
You must reference the Javascript libraries in the documents <head>.
+
You must use the window.onload event to create your graph.
+
+ Inside the window.onload function your graph must be created as a local variable (ie you must use the var keyword). Eg:
+
+<script>
+ window.onload = function ()
+ {
+ var myGraph = new RGraph.Bar('myCanvas', [1,9,8,7,3,4,8,4,9,5,7,8]);
+ myGraph.Set('chart.labels', ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']);
+ myGraph.Draw();
+ }
+</script>
+
+
+
If your page is large, there may be a slight pause before the window.onload event fires and thus creates the graph.
+
Changing the font that text is shown in is not available.
+
+
+
+
Google Chrome Frame
+
+ Instead of ExCanvas you can also use Google Chrome Frame. This basically turns Internet Explorer into Google Chrome, and fully
+ supports RGraph. Since it involves a plugin installation, this is a better option if you can fully influence the users PC. If you
+ can fully influence the users PC however, a better option might be to simply use one of the browsers with native
+ support.
+
+
+
+
+
+
+
+
Using a dynamically created canvas
+
+ If you're creating your canvas dynamically there is an extra step that you must perform to allow it to be recognised by
+ ExCanvas:
+
+chart.value.text
+ Controls whether the value is indicated as a text label in the center of the dial. Default: false
+
+chart.value.units.pre
+ The pre units used on the textual value. Default: nothing (An empty string)
+
+chart.value.units.post
+ The post units used on the textual value. Default: nothing (An empty string)
+
+chart.border
+ This controls the gray border of the Odometer. Default: false
+
+chart.tickmarks.highlighted
+ This controls whether the tickmarks are highlighted in red/yellow/green. Default: false
+
+chart.zerostart
+ If you want the top value on your chart to be zero instead of the maximum value, set this to true. Default: false
+
+
Margins
+chart.gutter
+ The width of the area outside the odometer. Default: 25
+
+
Colors
+chart.green.max
+ This is the point at which the green area ends. Default: 75% of the maximum value
+
+chart.red.min
+ This is the point at which the red area starts. The yellow area is between the green and red areas. Default: 90% of the maximum value
+
+
Labels and text
+chart.labels
+ Instead of using computed numbers, which uses the maximum value, you can specify the Odometer to use textual labels instead, with this option. Default: null
+
+chart.label.area
+ The width of the area that labels are put in. Default: 35
+
+chart.text.size
+ The size of the text (in points). Default: 10
+
+chart.text.font
+ The font used to render the text. Default: Verdana
+
+chart.text.color
+ The color of the labels. Default: black
+
+
Needle
+chart.needle.width
+ How thick the needle is. Default: 2
+
+chart.needle.color
+ The color that is applied to the needle. Default: black
+
+chart.needle.head
+ This controls whether the arrow head on the end of the needle is displayed. Default: true
+
+chart.needle.type
+ This determines which type of needle is used. It can be pointer or triangle. Default: pointer
+
+chart.needle.extra
+ With this you can specify a number of extra pointers that will be drawn on the Odometer. An example would be a meter that's used to show upload and download data. An example use:
+chart.title
+ The title text. Default: no title set
+
+
+chart.title.background
+The background color (if any) for the title.
+Default: null
+
+
+chart.title.color
+ The color of the title. Default: black
+
+chart.title.hpos
+ 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. Default: null
+
+chart.title.vpos
+ 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. Default: null
+
+
Shadow
+chart.shadow.inner
+ Whether a drop shadow is applied to the inner circle of the Odometer Default: false
+
+chart.shadow.outer
+ Whether a drop shadow is applied to the whole Odometer. Default: false
+
+
Interactive features
+chart.contextmenu
+ An array of context menu items. More information on context menus is here. Default: [] (An empty array)
+
+chart.annotatable
+ Whether annotations are enabled for the chart (ie you can draw on the chart interactively. Default: false
+
+chart.annotate.color
+ If you do not allow the use of the palette, then this will be the only colour allowed for annotations. Default: black
+
+chart.resizable
+ 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). Default: false
+
+
Zoom
+chart.zoom.mode
+ Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: thumbnail and canvas. Default: canvas
+
+chart.zoom.factor
+ This is the factor that the graph will be zoomed by (bigger values means more zoom) Default: 1.5
+
+chart.zoom.fade.in
+ Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.fade.out
+ Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.hdir
+ The horizontal direction of the zoom. Possible values are: left, center, right Default: right
+
+chart.zoom.vdir
+ The vertical direction of the zoom. Possible values are: up, center, down Default: down
+
+chart.zoom.delay
+ The delay (in milliseconds) between frames. Default: 50
+
+chart.zoom.frames
+ The number of frames in the zoom animation. Default: 10
+
+chart.zoom.shadow
+ Whether or not the zoomed canvas has a shadow or not. Default: true
+
+chart.zoom.thumbnail.width
+ When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.thumbnail.height
+ When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.background
+ Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page. Default: true
+
+
Scale
+chart.units.pre
+ The units that the value is measured in. This string is displayed BEFORE the actual value, allowing you to specify values such as "$50". Default: none
+
+chart.units.post
+ The units that the value is measured in. This string is displayed AFTER the actual value, allowing you to specify values such as "50ms". Default: none
+
+chart.scale.decimals
+ The number of decimal places to display for the labels. Default: 0
+
+
+
+
\ No newline at end of file
diff --git a/RGraph/docs/pie.html b/RGraph/docs/pie.html
new file mode 100644
index 0000000..ee53f12
--- /dev/null
+++ b/RGraph/docs/pie.html
@@ -0,0 +1,498 @@
+
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - Pie chart documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
RGraph: HTML5 canvas graph library - Pie chart documentation
+
+
+
+
+ The pie chart can be used, for example, to represent something that is akin to percentages. ie A set of data that
+ should be taken as part of a whole.
+
+chart.gutter
+ The gutter of the graph (for text labels). Default: 25
+
+
Colors
+chart.colors
+ Colors to be used for the pie segments. Default: ['rgb(255,0,0)', '#ddd', 'rgb(0,255,0)', 'rgb(0,0,255)', 'rgb(255,255,0)', 'rgb(0,255,255)', 'red', 'pink', 'black', 'white']
+
+chart.strokestyle
+ The color of the seperating lines. By setting this to your background color, and setting the linewidth to approx. 5, it will make the pie chart look "exploded". Default: #999
+
+
Labels and text
+chart.text.size
+ The size of the text (in points). Default: 10
+
+chart.text.font
+ The font used to render the text. Default: Verdana
+
+chart.text.color
+ The color of the labels. Default: black
+
+chart.labels
+ An array of labels to be used for the chart. Default: [] (an empty array)
+
+chart.labels.sticks
+ Stipulates that small sticks for the labels are shown. The example page has an example of this. Default: false
+
+chart.labels.sticks.color
+ Sets the color of the label sticks. Default: #aaa
+
+
Titles
+chart.title
+ The title of the pie chart. Default: none
+
+
+chart.title.background
+The background color (if any) for the title.
+Default: null
+
+
+chart.title.color
+ The color of the title. Default: black
+
+chart.title.hpos
+ 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. Default: null
+
+chart.title.vpos
+ 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. Default: null
+
+
Shadows
+chart.shadow
+ Whether a simple shadow effect is applied. Default: false
+
+chart.shadow.color
+ The color of the shadow. Default: rgba(0,0,0,0.5)
+
+chart.shadow.blur
+ The severity of the shadow blurring effect. Default: 3
+
+chart.shadow.offsetx
+ The X offset of the shadow. Default: 3
+
+chart.shadow.offsety
+ The Y offset of the shadow. Default: 3
+
+
Interactive features
+
+
+ chart.tooltips
+ An array of tooltips, starting from the middle right (ie east) axis, and going clockwise sequentially.
+ Default: [] (An empty array)
+
+
+ chart.tooltips.event
+ This can be onclick or onmousemove and determines which event is used for tooltips.
+ Default: onclick
+
+
+ chart.tooltips.effect
+ The animated effect used for showing tooltips. Can be either fade or expand.
+ Default: fade
+
+
+ chart.tooltips.css.class
+ This is the name of the CSS class the graph uses.
+ Default: RGraph_tooltip
+
+
+ chart.tooltips.override
+ If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more
+ information on the tooltips documentation page
+ Default: null
+
+
+
+chart.contextmenu
+ An array of context menu items. More information on context menus is here. Default: [] (An empty array)
+
+chart.annotatable
+ Whether annotations are enabled for the chart (ie you can draw on the chart interactively. Default: false
+
+chart.annotate.color
+ If you do not allow the use of the palette, then this will be the only colour allowed for annotations. Default: black
+
+chart.resizable
+ 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). Default: false
+
+
+
+
+
+
Key
+
+
+ chart.key
+ An array of key information.
+ Default: [] (An empty array)
+
+
+ chart.key.background
+ 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.
+ Default: white
+
+
+ chart.key.position
+ Determines the position of the key.Either graph (default), or gutter.
+ Default: graph
+
+ chart.key.position.x
+ This allows you to specify a specific X coordinate for the key.
+ Default: null
+
+ chart.key.position.y
+ This allows you to specify a specific Y coordinate for the key.
+ Default: null
+
+ chart.key.position.gutter.boxed
+ If you have the key in gutter mode (ie horizontal), this allows you to give a background color.
+ Default: true
+
+
+ chart.key.shadow
+ Whether a small drop shadow is applied to the key.
+ Default: false
+
+
+ chart.key.shadow.color
+ The color of the shadow.
+ Default: #666
+
+
+ chart.key.shadow.blur
+ The extent of the blurring effect used on the shadow.
+ Default: 3
+
+
+ chart.key.shadow.offsetx
+ The X offset of the shadow.
+ Default: 2
+
+
+ chart.key.shadow.offsety
+ The Y offset of the shadow.
+ Default: 2
+
+ chart.key.rounded
+ This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.
+ Default: false
+
+ chart.key.color.shape
+ This can be square, circle or line and controls how the color indicators in the key appear.
+ Default: square
+
+
+
+
+
Zoom
+chart.zoom.mode
+ Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: thumbnail and canvas. Default: canvas
+
+chart.zoom.factor
+ This is the factor that the graph will be zoomed by (bigger values means more zoom) Default: 1.5
+
+chart.zoom.fade.in
+ Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.fade.out
+ Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.hdir
+ The horizontal direction of the zoom. Possible values are: left, center, right Default: right
+
+chart.zoom.vdir
+ The vertical direction of the zoom. Possible values are: up, center, down Default: down
+
+chart.zoom.delay
+ The delay (in milliseconds) between frames. Default: 50
+
+chart.zoom.frames
+ The number of frames in the zoom animation. Default: 10
+
+chart.zoom.shadow
+ Whether or not the zoomed canvas has a shadow or not. Default: true
+
+chart.zoom.thumbnail.width
+ When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.thumbnail.height
+ When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.background
+ Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page. Default: true
+
+
Scale
+chart.units.pre
+ The units that the value is measured in. This string is displayed BEFORE the actual number, allowing you to specify values such as "$50" and is only used if chart.value.text is true. Default: none
+
+chart.units.post
+ The units that the value is measured in. This string is displayed AFTER the actual number, allowing you to specify values such as "50ms" and is only used if chart.value.text is true. Default: none
+
+
Miscellaneous
+chart.align
+ Whether to left, center or right align the pie chart. Default: center
+
+chart.linewidth
+ By setting this to roughly 5, and setting the strokestyle to the same colour as your background colour,you will get a segment separation effect. Default: 1
+
+chart.variant
+ This can be either pie (the default) or donut. Setting this to donut is how you get a donut chart. Default: pie
+
+chart.value.text
+ Set this to true if you want the value displayed in text beow the center of the pointer. Default: false
+
+
+ chart.highlight.style
+ Can be either 2d or 3d and determines which style of segment highlighting is used in
+ conjunction with tooltips.
+ Default: 2d
+
+
+ chart.highlight.style.2d.color
+ When 2D highlighting for tooltips is used, this controls the color of the highlighting.
+ Default: rgba(255,255,255,0.5)
+
+
+
+
+
Methods
+
+ RGraph.getSegment()
+
+ RGraph.getSegment() makes it easy to determine which segment of the Pie chart was clicked on. It provides:
+
+
+
Originating X coordinate
+
Originating Y coordinate
+
The radius of the segment
+
The starting angle (in degrees)
+
The ending angle (in degrees)
+
+
+
+<script>
+ RGraph.Register(myGraph);
+
+ myGraph.canvas.onclick = function (e)
+ {
+ RGraph.FixEventObject(e);
+ RGraph.Redraw();
+
+ var canvas = e.target;
+ var context = canvas.getContext('2d');
+ var obj = canvas.__object__;
+ var segment = RGraph.getSegment(e);
+
+ if (segment) {
+ context.fillStyle = 'rgba(255,255,255,0.5)';
+ context.beginPath();
+
+ // Angles are provided in degrees, so convert them to radians
+ segment[3] /= 57.29;
+ segment[4] /= 57.29;
+
+ context.moveTo(segment[0], segment[1]);
+ context.arc(segment[0], segment[1], segment[2], segment[3], segment[4], 0);
+ context.stroke();
+ context.fill();
+
+ e.stopPropagation();
+ }
+ }
+
+ window.onclick = function (e)
+ {
+ RGraph.Redraw();
+ }
+</script>
+
+
+
+
\ No newline at end of file
diff --git a/RGraph/docs/png.html b/RGraph/docs/png.html
new file mode 100644
index 0000000..1c4c676
--- /dev/null
+++ b/RGraph/docs/png.html
@@ -0,0 +1,249 @@
+
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - Retrieving a PNG of your graph
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
RGraph: HTML5 canvas graph library - Retrieving a PNG of your graph
+
+
+
+
+
+
+ Get PNG
+
+
+
+
+
+ RGraph provides an easy way to get a PNG image of your graph. This allows you to
+ easily save the image locally to use in (for example) a document, spreadsheet or presentation.
+
+
+
+ Originally, the function was designed to be used with a context menu, so it is located in the RGraph.common.context.js.
+ Now though, you do not have to use the function with a context menu, and can instead pass in the canvas as the optional argument. There's an
+ example of its usage on the first Tradar example.
+
+ If you want to use the function with a piece of text (or an image) as the "link", optionally positioned over the canvas, you can pass
+ the canvas into the function as an argument, along with the event object.
+
+
+
+<!-- This CSS positions the link over the top right of the canvas -->
+<style>
+ span#png_link {
+ position: absolute;
+ left: 450px;
+ top: 30px;
+ border: 1px black solid;
+ padding: 1px;
+ background-color: #eee;
+ cursor: pointer;
+ }
+</style>
+
+<div style="position: relative">
+ <span id="png_link" onclick="RGraph.showPNG(myCanvas, event)">Get PNG</span>
+ <canvas id="cvs" width="600" height="250">[No canvas support]</canvas>
+</div>
+
RGraph: HTML5 canvas graph library - Resizing your graphs
+
+
+
+
+
+
+
+
+ RGraph has the facility to allow you to resize your graphs. This is new as of 10th April 2010. Because of the
+ numerous events it has to install code on, it is unlikely to work with other dynamic features. The context
+ menu does though, and now that tooltips use DOM2 events, so do they. It can be useful if you are,
+ for example, doing a presentation and need to enlarge the graph.
+
+
+
+ All you need to do to enable it is set chart.resizable to true. There are certain caveats that you should be aware of though:
+
+
+
+
+
+
+ Graphs can only be enlarged down and to the right, so you will get better results if your graph is not placed at the
+ right of the page.
+
+
+
+ The minimum you can resize your graphs to is 50% of the original graph width/height.
+
+
+
+ Note: Resizing can change the layout of your page (reflows). As such you will need to be careful when laying out your
+ page, and you may need to experiment with things like CSS float:, width, height etc so that the effect is either not apparent
+ or is minimal.
+
+
+
+ If your canvas is nested within a table, resizing can result in very minor (1-2px for example) positioning changes. These
+ can be mitigated by turning off table borders, setting the cellspacing to 0 and also setting the cellpadding to 0.
+
+
+
+
+
\ No newline at end of file
diff --git a/RGraph/docs/rose.html b/RGraph/docs/rose.html
new file mode 100644
index 0000000..e965c3b
--- /dev/null
+++ b/RGraph/docs/rose.html
@@ -0,0 +1,442 @@
+
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - rose chart documentation
+
+
+
+
+
+
+
+
+
+
+
+
+chart.gutter
+ The gutter used on the chart Default: 25
+
+
Colors
+chart.colors
+ An array of colors to be used by the chart. Default: ['rgb(255,0,0)', 'rgb(0,255,255)', 'rgb(0,255,0)', 'rgb(127,127,127)', 'rgb(0,0,255)', 'rgb(255,128,255)']
+
+chart.colors.alpha
+ Instead of using rgba(), you can use color definitions such as red along with this setting to add transparency. Default: null
+
+
Labels and text
+chart.text.font
+ The font used to render the text. Default: Verdana
+
+chart.text.color
+ The color of the labels. Default: black
+
+chart.text.size
+ The size of the text (in points). Default: 10
+
+chart.labels
+ The labels, if any, for the graph. Default: none
+
+chart.labels.axes
+ This controls the axes that show the scale labels. Each letter stands for the appropriate axis (North, South, East and West) Default: nsew
+
+chart.labels.position
+ This can be either center or edge and determines the position of the labels. Default: center
+
+
Titles
+chart.title
+ The title of the chart. Default: none
+
+
+chart.title.background
+The background color (if any) for the title.
+Default: null
+
+
+chart.title.color
+ The color of the title. Default: black
+
+chart.title.hpos
+ 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. Default: null
+
+chart.title.vpos
+ 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. Default: null
+
+
+
Axis properties
+ chart.ymax
+ This can be set to control the maximum value of the scale. It's so called to maintain a degree of API compatibility across graph libraries. Default: null
+
+
+
Scale
+
+
+ chart.scale.round
+ Whether to round the maximum scale value up or not. This will produce slightly better scales in some instances.
+ Default: null
+
+
+
+
+
Key
+
+
+ chart.key
+ An array of key information.
+ Default: [] (An empty array)
+
+
+ chart.key.background
+ 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.
+ Default: white
+
+
+ chart.key.position
+ Determines the position of the key.Either graph (default), or gutter.
+ Default: graph
+
+ chart.key.position.x
+ This allows you to specify a specific X coordinate for the key.
+ Default: null
+
+ chart.key.position.y
+ This allows you to specify a specific Y coordinate for the key.
+ Default: null
+
+ chart.key.position.gutter.boxed
+ If you have the key in gutter mode (ie horizontal), this allows you to give a background color.
+ Default: true
+
+
+ chart.key.shadow
+ Whether a small drop shadow is applied to the key.
+ Default: false
+
+
+ chart.key.shadow.color
+ The color of the shadow.
+ Default: #666
+
+
+ chart.key.shadow.blur
+ The extent of the blurring effect used on the shadow.
+ Default: 3
+
+
+ chart.key.shadow.offsetx
+ The X offset of the shadow.
+ Default: 2
+
+
+ chart.key.shadow.offsety
+ The Y offset of the shadow.
+ Default: 2
+
+ chart.key.rounded
+ This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.
+ Default: false
+
+ chart.key.color.shape
+ This can be square, circle or line and controls how the color indicators in the key appear.
+ Default: square
+
+
+
+
+
Interactive features
+chart.tooltips
+ An array of tooltips. You can use HTML if you so wish. Default: [] (An empty array)
+
+chart.tooltips.effect
+ The tooltip effect used. Can be either fade or expand. Default: fade
+
+chart.tooltips.css.class
+ This is the name of the CSS class the graph uses. Default: RGraph_tooltip
+
+chart.tooltips.override
+ If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the tooltips documentation page Default: null
+
+chart.contextmenu
+ An array of context menu items. More information on context menus is here. Default: [] (An empty array)
+
+chart.annotatable
+ Whether annotations are enabled for the chart (ie you can draw on the chart interactively. Default: false
+
+chart.annotate.color
+ If you do not allow the use of the palette, then this will be the only colour allowed for annotations. Default: black
+
+chart.resizable
+ 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). Default: false
+
+chart.adjustable
+ Defaulting to false, this determines whether your rose chart will be adjustable (click the edge of a segment and drag to adjust it). Default: false
+
+
Zoom
+chart.zoom.mode
+ Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: thumbnail and canvas. Default: canvas
+
+chart.zoom.factor
+ This is the factor that the graph will be zoomed by (bigger values means more zoom) Default: 1.5
+
+chart.zoom.fade.in
+ Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.fade.out
+ Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.hdir
+ The horizontal direction of the zoom. Possible values are: left, center, right Default: right
+
+chart.zoom.vdir
+ The vertical direction of the zoom. Possible values are: up, center, down Default: down
+
+chart.zoom.delay
+ The delay (in milliseconds) between frames. Default: 50
+
+chart.zoom.frames
+ The number of frames in the zoom animation. Default: 10
+
+chart.zoom.shadow
+ Whether or not the zoomed canvas has a shadow or not. Default: true
+
+chart.zoom.thumbnail.width
+ When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.thumbnail.height
+ When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.background
+ Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page. Default: true
+
+
+
+
+
Methods
+
+ RGraph.getSegment()
+
+ RGraph.getSegment() makes it easy to determine which segment of the Rose chart was clicked on. It provides:
+
+
+
Originating X coordinate
+
Originating Y coordinate
+
The radius of the segment
+
The starting angle (in degrees)
+
The ending angle (in degrees)
+
+
+
+<script>
+ RGraph.Register(myGraph);
+
+ myGraph.canvas.onclick = function (e)
+ {
+ RGraph.FixEventObject(e);
+ RGraph.Redraw();
+
+ var canvas = e.target;
+ var context = canvas.getContext('2d');
+ var obj = canvas.__object__;
+ var segment = RGraph.getSegment(e);
+
+ if (segment) {
+ context.fillStyle = 'rgba(255,255,255,0.5)';
+ context.beginPath();
+
+ // Angles are provided in degrees, so convert them to radians
+ segment[3] /= 57.29;
+ segment[4] /= 57.29;
+
+ context.moveTo(segment[0], segment[1]);
+ context.arc(segment[0], segment[1], segment[2], segment[3], segment[4], 0);
+ context.stroke();
+ context.fill();
+
+ e.stopPropagation();
+ }
+ }
+
+ window.onclick = function (e)
+ {
+ RGraph.Redraw();
+ }
+</script>
+
+
+
+
\ No newline at end of file
diff --git a/RGraph/docs/rscatter.html b/RGraph/docs/rscatter.html
new file mode 100644
index 0000000..e72ee56
--- /dev/null
+++ b/RGraph/docs/rscatter.html
@@ -0,0 +1,370 @@
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - Radial scatter chart documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+chart.gutter
+ 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. Default: 25
+
+
Labels and text
+chart.text.color
+ The color of the labels. Default: black
+
+chart.text.size
+ The size (in points) of the labels. Default: 10
+
+chart.text.font
+ The font used to render the text. Default: Verdana
+
+chart.labels
+ The labels, if any, for the graph. Default: none
+
+chart.labels.axes
+ This controls the axes that show the scale labels. Each letter stands for the appropriate axis (North, South, East and West) Default: nsew
+
+chart.labels.position
+ This can be either center or edge and determines the position of the labels. Default: center
+
+
Titles
+chart.title
+ The title of the graph, if any. Default: null
+
+
+chart.title.background
+The background color (if any) for the title.
+Default: null
+
+
+chart.title.color
+ The color of the title. Default: black
+
+chart.title.hpos
+ 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. Default: null
+
+chart.title.vpos
+ 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. Default: null
+
+
+
+
+
+
+
Key
+
+
+ chart.key
+ An array of key information.
+ Default: [] (An empty array)
+
+
+ chart.key.background
+ 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.
+ Default: white
+
+
+ chart.key.position
+ Determines the position of the key.Either graph (default), or gutter.
+ Default: graph
+
+ chart.key.position.x
+ This allows you to specify a specific X coordinate for the key.
+ Default: null
+
+ chart.key.position.y
+ This allows you to specify a specific Y coordinate for the key.
+ Default: null
+
+ chart.key.position.gutter.boxed
+ If you have the key in gutter mode (ie horizontal), this allows you to give a background color.
+ Default: true
+
+
+ chart.key.shadow
+ Whether a small drop shadow is applied to the key.
+ Default: false
+
+
+ chart.key.shadow.color
+ The color of the shadow.
+ Default: #666
+
+
+ chart.key.shadow.blur
+ The extent of the blurring effect used on the shadow.
+ Default: 3
+
+
+ chart.key.shadow.offsetx
+ The X offset of the shadow.
+ Default: 2
+
+
+ chart.key.shadow.offsety
+ The Y offset of the shadow.
+ Default: 2
+
+ chart.key.rounded
+ This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.
+ Default: false
+
+ chart.key.color.shape
+ This can be square, circle or line and controls how the color indicators in the key appear.
+ Default: square
+
+
+
+
+
Interactive features
+chart.contextmenu
+ An array of context menu items. More information on context menus is here. Default: [] (An empty array)
+
+chart.tooltips.effect
+ The animated effect used for showing tooltips. Can be either fade or expand. Default: fade
+
+chart.tooltips.event
+ This is the event that triggers the tooltips. It can be either onclick or onmousemove. Default: onclick
+
+chart.tooltips.css.class
+ This is the name of the CSS class the graph uses. Default: RGraph_tooltip
+
+chart.tooltips.override
+ If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the tooltips documentation page Default: null
+
+chart.annotatable
+ Whether annotations are enabled for the chart (ie you can draw on the chart interactively. Default: false
+
+chart.annotate.color
+ If you do not allow the use of the palette, then this will be the only colour allowed for annotations. Default: black
+
+chart.resizable
+ 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). Default: false
+
+
Zoom
+chart.zoom.mode
+ Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: thumbnail and canvas. Default: canvas
+
+chart.zoom.factor
+ This is the factor that the graph will be zoomed by (bigger values means more zoom) Default: 1.5
+
+chart.zoom.fade.in
+ Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.fade.out
+ Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.hdir
+ The horizontal direction of the zoom. Possible values are: left, center, right Default: right
+
+chart.zoom.vdir
+ The vertical direction of the zoom. Possible values are: up, center, down Default: down
+
+chart.zoom.delay
+ The delay (in milliseconds) between frames. Default: 50
+
+chart.zoom.frames
+ The number of frames in the zoom animation. Default: 10
+
+chart.zoom.shadow
+ Whether or not the zoomed canvas has a shadow or not. Default: true
+
+chart.zoom.thumbnail.width
+ When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.thumbnail.height
+ When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.background
+ Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page. Default: true
+
+
+
+
+
+
\ No newline at end of file
diff --git a/RGraph/docs/scatter.html b/RGraph/docs/scatter.html
new file mode 100644
index 0000000..c269758
--- /dev/null
+++ b/RGraph/docs/scatter.html
@@ -0,0 +1,683 @@
+
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - scatter graph documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This would give you two bars, one red and a lower yellow bar. The units correspond to your scale, and are the
+ starting point and the height.
+ Default: null
+
+ chart.background.vbars
+ An array of vertical bar information. They're specified like his:
+
+
+
+chart.background.grid.border
+ Determines whether a border line is drawn around the grid. Default: true
+
+chart.background.grid.hlines
+ Determines whether to draw the horizontal grid lines. Default: true
+
+chart.background.grid.vlines
+ Determines whether to draw the vertical grid lines. Default: true
+
+chart.background.grid.autofit
+ Instead of specifying a pixel width/height for the background grid, you can use autofit and specify how many horizontal and vertical lines you want. Default: false
+
+chart.background.grid.autofit.numhlines
+ When using autofit this allows you to specify how many horizontal grid lines you want. Default: 7
+
+chart.background.grid.autofit.numvlines
+ When using autofit this allows you to specify how many vertical grid lines you want. Default: 20
+
+
Labels and text
+chart.labels
+ An array of the X labels for the graph. Default: [] (An empty array)
+
+chart.ylabels
+ A boolean (true or false) that controls whether the graph has Y labels. Default: true
+
+chart.ylabels.count
+ A value (1, 3 or 5) that controls how many Y labels there are. Default: 5
+
+chart.text.font
+ The font used to render the text. Default: Verdana
+
+chart.text.color
+ The color of the labels. Default: black
+
+chart.text.size
+ The size of the text (in points). Default: 10
+
+chart.text.angle
+ The angle of the horizontal text labels (at the bottom of the graph). This can be one of three values - 0, 45 or 90. Default: 0 (Horizontal)
+
+
Margins
+chart.gutter
+ The gutter on the graph (the area outside of the axes). Default: 25
+
+
Axis properties
+chart.xmax
+ The maximum X axis value you wish to set. For example if you're displaying products sold in a year, you might use 365. Default: none - must be supplied
+
+chart.ymax
+ The optional maximum Y scale value. If not specified then it will be calculated. Default: null (It's calculated)
+
+chart.ymin
+ The optional minimum Y scale value. If not specified it will be zero. Default: null
+
+chart.ticksize
+ The size of the tickmarks. Default: 3
+
+chart.tickmarks
+ The style of the tickmarks. Can be: cross, plus, circle, diamond, square or null (no tickmarks). Default: cross
+
+chart.xticks
+ This controls whether the X axis tickmarks are drawn. Default: true
+
+chart.noendxtick
+ Whether to draw an end X tick. Usually used when combining Scatter charts Default: false
+
+chart.xaxis
+ This controls whether the X axis is drawn. Default: true
+
+chart.xaxispos
+ Where the X axis should be drawn. Can be either center or bottom. Default: bottom
+
+chart.yaxispos
+ Where the Y axis should be drawn. Can be either left or right. Default: left
+
+chart.yaxispos
+ Where the Y axis should be drawn. Can be either left or right. Default: left
+
+chart.axis.color
+ The color of the axes. Default: black
+
+chart.noaxes
+ If this is set to true, no axes will be drawn. Default: false
+
+
Titles
+chart.title
+ The title of the scatter graph. Default: none
+
+
+chart.title.background
+The background color (if any) for the title.
+Default: null
+
+
+chart.title.hpos
+ 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. Default: null
+
+chart.title.vpos
+ 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. Default: null
+
+chart.title.color
+ The color of the title. Default: black
+
+chart.title.xaxis
+ This allows to specify a title for the X axis. Default: none
+
+chart.title.yaxis
+ This allows to specify a title for the Y axis. Default: none
+
+chart.title.xaxis.pos
+ This is multiplied with the gutter to give the position of the X axis title. Default: 0.25
+
+chart.title.yaxis.pos
+ This is multiplied with the gutter to give the position of the Y axis title. Default: 0.25
+
+
+
Scale
+chart.scale.decimals
+ The number of decimal places to display for the Y scale. Default: 0
+
+chart.scale.point
+ The character used as the decimal point. Default: .
+
+chart.scale.thousand
+ The character used as the thousand separator Default: ,
+
+
+ chart.scale.round
+ Whether to round the maximum scale value up or not. This will produce slightly better scales in some instances.
+ Default: null
+
+
+chart.units.pre
+ The units (if any) that the Y axis is measured in (these are preppended to the number). Default: none
+
+chart.units.post
+ The units (if any) that the Y axis is measured in (these are appended to the number). Default: none
+
+
+
Interactive features
+
+
+ Note: Unlike other charts, the Scatter chart tooltips are specified as part of the data array. See above.
+
+
+
+ chart.tooltips.effect
+ The animated effect used for showing tooltips.
+ Default: fade
+
+
+chart.tooltips.hotspot
+ This controls the size of the hotspot on the chart for tooltips. Default: 3
+
+chart.tooltips.css.class
+ This is the name of the CSS class the graph uses. Default: RGraph_tooltip
+
+chart.tooltips.override
+ If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the tooltips documentation page Default: null
+
+chart.tooltips.coords.adjust
+ If you translate() before drawing your graph to reduce wasted space, the coords used for tooltips may need adjusting by how much you translate() by. This setting is how to do it. It should be an array of the X/Y adjustments. There's an example of this on the misc documentation page. Default: [0,0]
+
+chart.crosshairs
+ If true, you will get a crosshair centering on the current mouse position. Default: false
+
+chart.crosshairs.linewidth
+ This controls the linewidth of the crosshairs. Default: 1
+
+chart.crosshairs.color
+ The color of the crosshairs. Default: #333
+
+chart.crosshairs.coords
+ If true, this will show the coordinates that the crosshairs are currently over. Default: false
+
+chart.crosshairs.fixed
+ If true, this makes the coordinates static (attached), instead of following the pointer around. Default: false
+
+chart.crosshairs.fadeout
+ If true, when you move your mouse off of the canvas the coordinates will fade out. Default: false
+
+chart.crosshairs.labels.x
+ Instead ox X and Y, you can specify more meaningful labels. Default: X
+
+chart.crosshairs.labels.y
+ Instead ox X and Y, you can specify more meaningful labels. Default: Y
+
+chart.contextmenu
+ An array of context menu items. More information on context menus is here. Default: null
+
+chart.annotatable
+ Whether annotations are enabled for the chart (ie you can draw on the chart interactively. Default: false
+
+chart.annotate.color
+ If you do not allow the use of the palette, then this will be the only colour allowed for annotations. Default: #000
+
+chart.resizable
+ 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). Default: false
+
+
Line properties
+chart.line
+ Whether to show a connecting line (like in the sixth example). Default: false
+
+chart.line.colors
+ The colors of the lines connecting the tick marks. Default: ['green', 'red']
+
+chart.line.shadow.color
+ The color of the lines shadow (if any). Default: rgba(0,0,0,0) (invisible)
+
+chart.line.shadow.offsetx
+ The X offset of the lines shadow. Default: 3
+
+chart.line.shadow.offsety
+ The Y offset of the lines shadow. Default: 3
+
+chart.line.shadow.blur
+ The severity of the line shadows blurring effect. Default: 2
+
+chart.line.stepped
+ Like the line chart, Scatter chart lines can be stepped by setting this to true Default: false
+
+
+
+
+
+
Key
+
+
+ chart.key
+ An array of key information.
+ Default: [] (An empty array)
+
+
+ chart.key.background
+ 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.
+ Default: white
+
+
+ chart.key.position
+ Determines the position of the key.Either graph (default), or gutter.
+ Default: graph
+
+ chart.key.position.x
+ This allows you to specify a specific X coordinate for the key.
+ Default: null
+
+ chart.key.position.y
+ This allows you to specify a specific Y coordinate for the key.
+ Default: null
+
+ chart.key.position.gutter.boxed
+ If you have the key in gutter mode (ie horizontal), this allows you to give a background color.
+ Default: true
+
+
+ chart.key.shadow
+ Whether a small drop shadow is applied to the key.
+ Default: false
+
+
+ chart.key.shadow.color
+ The color of the shadow.
+ Default: #666
+
+
+ chart.key.shadow.blur
+ The extent of the blurring effect used on the shadow.
+ Default: 3
+
+
+ chart.key.shadow.offsetx
+ The X offset of the shadow.
+ Default: 2
+
+
+ chart.key.shadow.offsety
+ The Y offset of the shadow.
+ Default: 2
+
+ chart.key.rounded
+ This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.
+ Default: false
+
+ chart.key.color.shape
+ This can be square, circle or line and controls how the color indicators in the key appear.
+ Default: square
+
+
+
+
+
+
+
Zoom
+chart.zoom.mode
+ Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: thumbnail and canvas. Default: canvas
+
+chart.zoom.factor
+ This is the factor that the graph will be zoomed by (bigger values means more zoom) Default: 1.5
+
+chart.zoom.fade.in
+ Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.fade.out
+ Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.hdir
+ The horizontal direction of the zoom. Possible values are: left, center, right Default: right
+
+chart.zoom.vdir
+ The vertical direction of the zoom. Possible values are: up, center, down Default: down
+
+chart.zoom.delay
+ The delay (in milliseconds) between frames. Default: 50
+
+chart.zoom.frames
+ The number of frames in the zoom animation. Default: 10
+
+chart.zoom.shadow
+ Whether or not the zoomed canvas has a shadow or not. Default: true
+
+chart.zoom.thumbnail.width
+ When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.thumbnail.height
+ When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.background
+ Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page. Default: true
+
+
Miscellaneous
+chart.defaultcolor
+ This is the default color of tick marks, which is used if a color isn't given. Default: #000
+
+chart.boxplot.width
+ This stipulates the default width of boxes. For more on boxplots, see here. Default: 8
+
+
+
+
Box plots
+
+
+ Instead of a single Y value, you have the ability to specify an array of 5, 6, 7 or 8 values, which will be used to make a box plot.
+ The example page shows a box plot. These values are (in order):
+
+
+
Lower whisker
+
Bottom of box
+
Middle value (which isn't necessarily in the center of the box - this depends on your data)
+ Instead of a simple string which is used as the label, each entry of the chart.labels array can be a two element array
+ consisting of the label, and the X value that the label should be placed at. For example:
+
+ If none of the available tickmark styles are suitable, you can instead specify a function object that draws the tickmark,
+ enabling you to draw the tickmark yourself. For example:
+
+
+
+<script>
+ line.Set('chart.tickmarks', myTick);
+
+ /**
+ * The function that is called once per tickmark, to draw it
+ *
+ * @param object obj The graph object
+ * @param object data The graph data
+ * @param number x The X coordinate
+ * @param number y The Y coordinate
+ * @param number xVal The X value
+ * @param number yVal The Y value
+ * @param number xMax The maximum X scale value
+ * @param number xMax The maximum Y scale value
+ * @param string color The color of the tickmark
+ */
+ function myTick (obj, data, x, y, xVal, yVal, xMax, yMax, color)
+ {
+ // Draw your custom tick here
+ }
+</script>
+
+
+
+
Note about colors and the key
+
+
+ If you're using a key you may need to set chart.line.colors to allow it to use the correct colors. For example:
+
RGraph: HTML5 canvas graph library - The RGraph.SetConfig() function
+
+
+
+
+
+ A graph showing RGraph.SetConfig()
+
+
+
+
+
+
+ Instead of using a number of .Set() calls, you may find that using the RGraph.SetConfig() method more to your tastes. The
+ method is an alternative to setting the configuration of your graph. It can also facilitate reuse better, so that the
+ appearance of all of your websites charts is the same. There's an example of its use below:
+
+
+
+
+
+<script>
+ window.onload = function ()
+ {
+ /**
+ * This configuration could be stored in a central configuration file, making its reuse easier. You could also have
+ * several different configurations that you pick and choose from depending on the requirements. Values in
+ * subsequent calls to .SetConfig() will overwrite previous ones.
+ */
+ var config = {
+ 'chart.colors': ['red', 'green'],
+ 'chart.labels': ['John','Fred','June','Charles','Lou', 'Olga'],
+ 'chart.title.yaxis': 'Amount',
+ 'chart.title.yaxis.pos': -0.2,
+ 'chart.title.xaxis': 'Person',
+ 'chart.background.grid.autofit': true
+ }
+ var bar = new RGraph.Bar('cvs', [48,56,52,49,43,51]);
+ RGraph.SetConfig(bar, config);
+ bar.context.translate(20,-20);
+ bar.Draw();
+ }
+</script>
+
+ Tooltips are a very effective and straight forward way to extend your graphs and add more information to them, without overloading
+ the user.
+
+
+
+
What can they hold?
+
+
+ At the base level, tooltips are DIVs, so they can hold a multitude of HTML - images, videos etc. See below
+ for information on showing graphs in tooltips.
+
+
+
+
How can I specify them?
+
+
+ You can specify them by including the tooltips code and then using the chart.tooltips property. For example:
+
+ The tooltips that you specify are usually strings (which can contain HTML). They can however also be functions which are called when they're about
+ to be displayed. The function should return the text that is used as the tooltip. You have the option to either specify
+ one function per data point, or just one function for all of the tooltips. You can mix functions and strings if you wish.
+ These functions are passed the numerical, zero-indexed tooltip index and the return value is used as the tooltip
+ text. So to summarise:
+
+
+
+
+ An array of strings. The string is used as the tooltip. Eg:
+
+ A single function object. This is probably the most useful. This function is called whenever a tooltip
+ is about to be displayed, and passed the numerical, zero-indexed tooltip index of the graph. The function should
+ return the text to be used as the tooltip. Note that the function you specify is called before
+ the tooltip DIV has been created, so you cannot access it. If you wish to customise the appearance
+ of the tooltip, you can use either the tooltip CSS class or a call to setTimeout(). Eg:
+
myGraph.Set('chart.tooltips', getTooltip);
+
+
+
+ An array of DIV ids. This will make working with large tooltips easier. You basically specify the id of a DIV whose
+ .innerHTML is then used as the tooltip. Only the contents of the DIV are used, not the DIV itself, so you can hide
+ the DIV by setting its display CSS value to none. An example of this in action is the
+ first line chart. For example:
+
+
myBar.Set('chart.tooltips', ['id:myDiv', ...])
+
+
+
+
+
Can I show graphs in tooltips?
+
+
+
+
+ You can, and with the custom event support that RGraph has (as of 10th July 2010), it's reasonably easy. Simply attach your function that
+ creates the graph to the ontooltip event. This allows the tooltip HTML to be created and added to the page
+ so that the code that creates the graph can run. The sequence is:
+
+
+
+
Specify the HTML for the tooltip as normal (including the <canvas> tag).
+
Use the ontooltip RGraph event so that a function is called when a tooltip is shown.
+
This function should subsequently create the graph.
+
+
+
+ The tooltip DIV is to be found in the RGraph registry - RGraph.Registry.Get('chart.tooltip'). And if you want it the
+ numerical zero indexed count of the tooltip is to be found in the __index__ property:
+ RGraph.Registry.Get('chart.tooltip').__index__
+
+
+
+<script src="RGraph.common.core.js" ></script>
+<script src="RGraph.common.tooltips.js" ></script>
+<script src="RGraph.bar.js" ></script>
+<script src="RGraph.line.js" ></script>
+
+<style>
+ .RGraph_tooltip {
+ background-color: white ! important;
+ }
+</style>
+
+<canvas id="cvs" width="600" height="250">[No canvas support]</canvas>
+
+<script>
+ window.onload = function ()
+ {
+ labels = ['Gary','Pete','Lou','Ned','Kev','Fred'];
+
+ bar = new RGraph.Bar("cvs", [4.5,28,13,26,35,36]);
+ bar.Set('chart.tooltips', function (idx) {return labels[idx] + 's stats<br/><canvas id="__tooltip_canvas__" width="400" height="150">[No canvas support]</canvas>';});
+ bar.Set('chart.hmargin', 10);
+ bar.Set('chart.tickmarks', 'endcircle');
+ bar.Set('chart.colors', ['blue']);
+ bar.Set('chart.ymax', 100);
+ bar.Set('chart.gutter', 30);
+ bar.Set('chart.labels', labels);
+ bar.Draw();
+
+ RGraph.AddCustomEventListener(line, 'ontooltip', CreateTooltipGraph);
+ }
+
+
+
+ /**
+ * This is the function that is called by the ontooltip event to create the tooltip charts
+ *
+ * @param obj object The graph object
+ */
+ function CreateTooltipGraph(obj)
+ {
+ // This data could be dynamic
+ var line = new RGraph.Line('__tooltip_canvas__', [5,8,7,6,9,5,4,6,3,5,4,4]);
+ line.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+ line.Set('chart.gutter', 20);
+ line.Set('chart.hmargin', 5);
+ line.Set('chart.tickmarks', 'endcircle');
+ line.Set('chart.background.grid.autofit', true);
+ line.Draw();
+ }
+
+</script>
+
+
+
+ If you want to see more source code, simply view the source of this page and look at the code that creates the bar chart.
+
+
+
+
+
+
Can I customise the appearance of tooltips?
+
+
+ Yes. You can either use the default CSS class RGraph_tooltip, or you can specify a specific CSS class that a
+ graphs tooltips should use with the property chart.tooltips.css.class. The two graphs on this page have
+ different looking tooltips by using this method - the line graph uses the default look, whilst the bar chart
+ overrides the CSS class name and sets it to bar_chart_tooltips_css. For example:
+
+ You can read more about RGraph CSS classes here.
+
+
+
+
What tooltip effects are available?
+
+
+ These effects are available to you:
+
+
+
+
fade
+
expand
+
contract
+
snap
+
none
+
+
+
+ All of them are as their names imply. fade is a straight forward fade in effect, expand is another effect
+ which expands outward from the center of the tooltip, contract is like the expand effect but in reverse, snap is an effect which can be used in a limited set of circumstances
+ and "snaps" to the current mouse position and none is simply no effect at all. The default effect used
+ by all graph types is fade. Note: If you're showing canvases in your tooltips then the expand, contract and snap
+ effects will not work - you must use fade or none.
+
+
+
+ Note: The snap effect is only available to graph types where the tooltip is triggered using the onmousemove event.
+ Currently this means the Line chart, Rscatter graph, Scatter graph and Tradar chart. It can also
+ be negatively effected when using multiple graphs on one page.
+
+
+
+
+
Tooltips, the clipboard and Firefox
+
+
+ If you're using Firefox, there's a note about tooltips and the clipboard (ie copying text) on the issues page.
+
+
+
+
Can I override the tooltip function?
+
+
+ You can by stipulating chart.tooltips.override. This should be a function object that handles everything with regard
+ to showing the tooltip. Highlighting the graph is still done for you - the override function is only concerned with showing
+ the tooltip. The override function is passed these arguments:
+
+
+
+
canvas - The HTML canvas element, the same as what you get from document.getElementById()
+
text - The tooltip text (id:xxx strings are NOT expanded)
+
x - The X coordinate in relation to the entire page
+
y - The Y coordinate in relation to the entire page
+
index - The numerical index of the tooltip in the original tooltip array
+
+
+
+ Note: Although "id:xxx" strings are not expanded for you, you can easily do this yourself by using the
+ RGraph.getTooltipText('id:xxx') function.
+
+chart.gutter
+ The gutter that the chart uses. This is effectively the margin. Default: 25
+
+
Colors
+chart.color
+ The color of the radar chart. Default: rgba(255,0,0,0.5)
+
+
Title
+chart.title
+ The title, if any, of the chart. Default: Not set
+
+chart.title.color
+ The color of the title. Default: black
+
+chart.title.vpos
+ 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. Default: null
+
+chart.title.hpos
+ 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. Default: null
+
+
Labels and text
+chart.labels
+ The labels to use for the chart. Default: An empty array
+
+chart.labels.axes
+ This controls the axes that show the scale labels. Each letter stands for the appropriate axis (North, South, East and West) Default: nsew
+
+chart.labels.offsetx
+ The X pixel offset for the labels. Default: 10
+
+chart.labels.offsety
+ The Y pixel offset for the labels. Default: 10
+
+chart.text.font
+ The font used to render the text. Default: Verdana
+
+chart.text.color
+ The color of the labels. Default: black
+
+chart.text.size
+ The size of the text (in points). Default: 10
+
+
+
Scale
+ chart.ymax
+ The optional maximum Y scale value. If not specified then it will be calculated. Default: null (It's calculated)
+
+
+ chart.scale.round
+ Whether to round the maximum scale value up or not. This will produce slightly better scales in some instances.
+ Default: null
+
+
+
Miscellaneous
+chart.background.circles
+ Whether to draw the grey background circles. Default: true
+
+chart.linewidth
+ The width of the outline. Default: 1
+
+chart.circle
+ What value to draw a circle at. Defaults to zero (off). You could use this to represent a threshold of some sort. Default: 0
+
+chart.circle.fill
+ What color to fill the circle with. Default: red
+
+chart.circle.stroke
+ What color to stroke (ie The outline) the circle with. Default: black
+
+
+
+
+
+
+
+
Key
+
+
+ chart.key
+ An array of key information.
+ Default: [] (An empty array)
+
+
+ chart.key.background
+ 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.
+ Default: white
+
+
+ chart.key.position
+ Determines the position of the key.Either graph (default), or gutter.
+ Default: graph
+
+ chart.key.position.x
+ This allows you to specify a specific X coordinate for the key.
+ Default: null
+
+ chart.key.position.y
+ This allows you to specify a specific Y coordinate for the key.
+ Default: null
+
+ chart.key.position.gutter.boxed
+ If you have the key in gutter mode (ie horizontal), this allows you to give a background color.
+ Default: true
+
+
+ chart.key.shadow
+ Whether a small drop shadow is applied to the key.
+ Default: false
+
+
+ chart.key.shadow.color
+ The color of the shadow.
+ Default: #666
+
+
+ chart.key.shadow.blur
+ The extent of the blurring effect used on the shadow.
+ Default: 3
+
+
+ chart.key.shadow.offsetx
+ The X offset of the shadow.
+ Default: 2
+
+
+ chart.key.shadow.offsety
+ The Y offset of the shadow.
+ Default: 2
+
+ chart.key.rounded
+ This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.
+ Default: false
+
+ chart.key.color.shape
+ This can be square, circle or line and controls how the color indicators in the key appear.
+ Default: square
+
+
+
+
+
+
+
+
+
Interactive features
+chart.contextmenu
+ An array of context menu items. More information on context menus is here. Default: [] (An empty array)
+
+chart.annotatable
+ Whether annotations are enabled for the chart (ie you can draw on the chart interactively. Default: false
+
+chart.annotate.color
+ If you do not allow the use of the palette, then this will be the only colour allowed for annotations. Default: black
+
+chart.tooltips
+ A numerically indexed array of tooltips that are shown when a hotspot is hovered over. These can contain HTML. Default: An empty array
+
+chart.tooltips.effect
+ The visual effect used when showing tooltips. Can be either fade or expand. Default: fade
+
+chart.tooltips.css.class
+ This is the name of the CSS class the graph uses. Default: RGraph_tooltip
+
+chart.tooltips.override
+ If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the tooltips documentation page Default: null
+
+chart.resizable
+ 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). Default: false
+
+
Zoom
+chart.zoom.mode
+ Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: thumbnail and canvas. Default: canvas
+
+chart.zoom.factor
+ This is the factor that the graph will be zoomed by (bigger values means more zoom) Default: 1.5
+
+chart.zoom.fade.in
+ Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.fade.out
+ Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.hdir
+ The horizontal direction of the zoom. Possible values are: left, center, right Default: right
+
+chart.zoom.vdir
+ The vertical direction of the zoom. Possible values are: up, center, down Default: down
+
+chart.zoom.delay
+ The delay (in milliseconds) between frames. Default: 50
+
+chart.zoom.frames
+ The number of frames in the zoom animation. Default: 10
+
+chart.zoom.shadow
+ Whether or not the zoomed canvas has a shadow or not. Default: true
+
+chart.zoom.thumbnail.width
+ When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.thumbnail.height
+ When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail. Default: 75
+
+chart.zoom.background
+ Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page. Default: true
+
+
+
\ No newline at end of file
diff --git a/RGraph/docs/vprogress.html b/RGraph/docs/vprogress.html
new file mode 100644
index 0000000..9bcd2e7
--- /dev/null
+++ b/RGraph/docs/vprogress.html
@@ -0,0 +1,363 @@
+
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - progress bar documentation
+
+
+
+
+
+
+
+
+
+
+
+
+chart.tickmarks
+ Whether the tickmarks are drawn. Default: true
+
+
+ chart.labels.count
+ This controls how many labels there are.
+ Default: 10
+
+
+chart.tickmarks.color
+ The color used for tickmarks. Default: black
+
+
+chart.tickmarks.inner
+ This controls whether the bar has inner tickmarks Default: false
+
+
+ chart.value
+ The indicated value. You don't need to set this because it's one of the arguments to the constructor.
+ Default: none (An argument to the constructor)
+
+
+
+ chart.min
+ The minimum value. Setting a minimum value allows to show a more detailed progress bar.
+ Default: 0
+
+
+ chart.max
+ The maximum value. You don't need to set this because it's one of the arguments to the constructor.
+
+
+chart.numticks
+ How many tick marks there are. Default: 10
+
+chart.numticks.inner
+ How many inner tick marks there are. Default: 50
+
+chart.arrows
+ This stipulates that two indicator arrows are drawn. It works best if you have tickmarks off, and no title. Default: false
+
+
Margins
+chart.gutter
+ The size of the gutter. Default: 25
+
+
Colors
+chart.color
+ The color of the bar. This can be a solid color, or a gradient that you create. Default: #0c0
+
+chart.background.color
+ The background color. Default: #eee
+
+
Shadow
+chart.shadow
+ Whether the progress bar has a shadow. This uses the canvas shadow API and therefore is only supported on Chrome 2, Safari 3.1 and Firefox 3.1 (and above). Default: false
+
+chart.shadow.offsetx
+ The X offset of the progress bar shadow. Default: 3
+
+chart.shadow.offsety
+ The Y offset of the progress bar shadow. Default: 3
+
+chart.shadow.color
+ The color of the shadow. Default: rgba(0,0,0,0.5)
+
+chart.shadow.blur
+ The blurring effect that is applied to the shadow. Default: 3
+
+
Labels and text
+chart.text.font
+ The font used to render the text. Default: Verdana
+
+chart.text.color
+ The color of the labels. Default: black
+
+chart.text.size
+ The size of the text (in points). Default: 10
+
+
+ chart.labels
+ Labels that are applied to the graph. Default: An empty array
+
+
+ chart.labels.position
+ Can be left or right and controls which side the labels are positioned on.
+ Default: right
+
+
+
+
Scale
+ chart.units.pre
+ The units that the Y scale is measured in (these are preppend to the number). Default: none
+
+
+ chart.units.post
+ The units that the Y scale is measured in (these are appended to the number). Default: none
+
+
+ chart.scale.decimals
+ This stipulates how many decimal places there are.
+ Default: 0
+
+
+
+
Titles
+chart.title
+ The title of the progress bar. Default: An empty string
+
+chart.title.hpos
+ 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. Default: null
+
+chart.title.vpos
+ 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. Default: null
+
+chart.title.color
+ The color of the title. Default: black
+
+
Interactive features
+chart.tooltips
+ An array, albeit one element only. This is shown when the progress bar is clicked on. Tooltips can contain HTML. Default: An empty array
+
+chart.tooltips.effect
+ The animated effect used for showing the tooltip. Can be either fade or expand. Default: fade
+
+chart.tooltips.css.class
+ This is the name of the CSS class the graph uses. Default: RGraph_tooltip
+
+
+ chart.tooltips.override
+ If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the tooltips documentation page
+ Default: null
+
+
+ chart.tooltips.coords.adjust
+ If you translate to gain space, then you can use this to tell RGraph that you have, so that the coordinates for the
+ tooltip(s) are accurate.
+ Default: [0, 0]
+
+
+chart.contextmenu
+ An array of context menu items. More information on context menus is here. Default: [] (An empty array)
+
+chart.annotatable
+ Whether annotations are enabled for the chart (ie you can draw on the chart interactively. Default: false
+
+chart.annotate.color
+ If you do not allow the use of the palette, then this will be the only colour allowed for annotations. Default: black
+
+chart.resizable
+ 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). Default: false
+
+chart.adjustable
+ Defaulting to false, this determines whether your progress bar will be adjustable (click the bar and drag it). Default: false
+
+
Zoom
+chart.zoom.factor
+ This is the factor that the graph will be zoomed by (bigger values means more zoom) Default: 1.5
+
+chart.zoom.fade.in
+ Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.fade.out
+ Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode. Default: true
+
+chart.zoom.hdir
+ The horizontal direction of the zoom. Possible values are: left, center, right Default: right
+
+chart.zoom.vdir
+ The vertical direction of the zoom. Possible values are: up, center, down Default: down
+
+chart.zoom.delay
+ The delay (in milliseconds) between frames. Default: 50
+
+chart.zoom.frames
+ The number of frames in the zoom animation. Default: 10
+
+chart.zoom.shadow
+ Whether or not the zoomed canvas has a shadow or not. Default: true
+
+chart.zoom.background
+ Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page. Default: true
+ As of November 2009 RGraph has had the ability to provide a zoom facility. It's designed to be used in
+ conjunction with a context menu as in the example to the right.
+
+
+
+ You can control the zoom using these properties:
+
+
+
+
chart.zoom.modeDefault: canvas
+
chart.zoom.factorDefault: 1.5
+
chart.zoom.fade.in Default: true
+
chart.zoom.fade.out Default: true
+
chart.zoom.hdir Default: right
+
chart.zoom.vdir Default: down
+
chart.zoom.delay Default: 50
+
chart.zoom.frames Default: 10
+
chart.zoom.shadow Default: true
+
chart.zoom.mode Default: canvas
+
chart.zoom.thumbnail.width Default: 75
+
chart.zoom.thumbnail.height Default: 75
+
chart.zoom.background Default: true
+
+
+
+
+
+
+
+
+
+
+ The possible values of chart.zoom.hdir are: left, center, right.
+ The possible values of chart.zoom.vdir are: up, center, down. chart.zoom.delay
+ is the delay in between frames (in milliseconds) and chart.zoom.frames is the number of frames in the zoom. chart.zoom.shadow
+ is whether the zoomed canvas has a shadow or not. The possible values of chart.zoom.mode are canvas (default)
+ and thumbnail.
+
+ The zoom has an alternative thumbnail mode, which displays a small thumbnail zoom instead of zooming the entire canvas.
+ The graph to the left shows an example of this.
+
+
+
+ It uses some of the same properties as the regular zoom, eg chart.fade.in, chart.fade.out, chart.zoom.shadow
+
+
+ It is possible to make the zoom in area mode circular by utilising the border-radius CSS property. Currently support for
+ this is limited to FireFox 4b7+, so it's not part of the main RGraph software. The CSS ncessary to achieve this is
+ thus:
+
+
+
+<style>
+ .RGraph_zoom_window {
+ border-radius: 50px ! important;
+ }
+</style>
+
+
+ This a graph demonstrating this technique here. Note that browser support for this technique is limited.
+
+
+
+
+
+
Area mode
+
+
+
+
+ Another type of zoom available is area. This is somewhat similar to thumbnail, but allows you to draw a rectangle around
+ the specific area that you want to zoom.
+
+
+
+ Again, this uses some common zoom properties, such as chart.zoom.factor.
+
+
+
+ Once visible, you can drag the zoomed area around with the left mouse button (a left drag), and drag the zoomed canvas around
+ within the zoom by using the right mouse button (a right-drag). And a double click will expand the zoomed area to cover the
+ whole canvas.
+
+
+
+
+
+<script>
+ var myLine = new RGraph.Line('myc3', [15,30,62,26,46,86,48,51,51,35,32, 35]);
+ myLine.Set('chart.zoom.mode', 'area');
+ myLine.Set('chart.hmargin', 10);
+ myLine.Set('chart.linewidth', 1);
+ myLine.Set('chart.title', 'A graph with zoom in area mode');
+ myLine.Set('chart.tickmarks', 'endcircle');
+ myLine.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+ myLine.Draw();
+<script>
+
+
+
+
\ No newline at end of file
diff --git a/RGraph/docs/zoom_thumbnail.html b/RGraph/docs/zoom_thumbnail.html
new file mode 100644
index 0000000..cef8b78
--- /dev/null
+++ b/RGraph/docs/zoom_thumbnail.html
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - Zooming your graphs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
RGraph: HTML5 canvas graph library - A circular thumbnail demonstration
+
+
+
+
+
+
+
+
+ This is a demonstration of the zoom in thumbnail mode with some custom CSS (the border-radius property) which facilitates
+ making the thumbnail circular.
+
+
+
+ Remember that browser support for this is limited - currently (18th December 2010) only Firefox 4b7+ supports this.
+
+ The bar chart is probably one of the most widely used of charts, and also one of the most versatile. It's defined as a chart with
+ rectangular bars with lengths proportional to the values they represent. The bar chart can be used to represent two
+ or more values. With grouped and stacked bar charts, you can visualise two or more sets of data. For example two years
+ worth of sales figures. Doing this you will be able to easily see differences, for example a better year when it comes
+ to sales. You can also show negative values by having the X axis in the center, like the examples shown. If you use a
+ grouped or stacked bar chart, a key may be helpful to your users.
+
+
+
+ By using the tooltips feature, you can provide more detail about what a particular bar represents. The tooltips in
+ RGraph can contain wide range of HTML, so you can use them to show photos or movies for example.
+
+
+
+
\ No newline at end of file
diff --git a/RGraph/examples/basic.html b/RGraph/examples/basic.html
new file mode 100644
index 0000000..ce2be6c
--- /dev/null
+++ b/RGraph/examples/basic.html
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - a basic example
+
+
+
+
+
+
+
+
+
+
+
+
+
+
RGraph: HTML5 canvas graph library - A basic example
+
+
+
+
+
+
+
+
+ This is a very basic example that does little more than display a graph. If you're trying to understand how RGraph
+ works, this should help as there is very little happening on this page. To see the source code of this
+ page simply view the source (Right click > View Source).
+
+ The Bi-polar chart is also (possibly more commonly) known as an age-frequency chart or a population pyramid. It allows you to very straight forwardly
+ compare two sets of data. For example two years worth of sales figues. Using this type of chart abnormalities will become
+ apparent. Other charts that would also be comparable, include a grouped bar chart, a stacked bar chart, and a multiple
+ line graph.
+
+ Formerly the Donut chart was a separate class, though now it's a variant of the Pie chart. This means smaller downloads and
+ a much simpler implementation. Essentially it's a Pie chart with a big hole in the middle. If you want to compare multiple
+ datasets you will probably be better off with something like a stacked or grouped bar chart, as you will be able to make
+ comparisons easier.
+
+ The funnel chart can be used to show stages in a sales or order process, from initial lead/contact through to actual sale.
+ It works well if you have a diminishing process, like that shown below. It can show potential revenue in each stage, or
+ like below, it can show actual numbers. It can also highlight potential problems in an organisations sales and/or order fulfillment
+ processes.
+
+ A Gantt chart is used to show scheduling information. It is commonly used in project management but can also be used,
+ for example, to show holiday schedule information. In this case it would be easy to see when someone is unavailable.
+ The Gantt chart can have clickable bars that can be used to provide more detail. It can also show vertical bars
+ that can be used to indicate events, or as in the cases below, can be decorative.
+
+
+
+ The chart is made of "units", in this case 365. This represents days in a year. The labels are separate, being equally
+ spaced across the chart. This means you can use more meaningful labels, which are easier to comprehend. As in the
+ example charts.
+
RGraph: HTML5 canvas graph library - Horizontal Progress bar
+
+
+
+
+ This is a Progress Bar for showing state. You can show anything with it - use it to show load on your server,
+ or percentage space free on your servers disk drive. You could even incorporate it with some AJAX to retrieve status information
+ from your webserver dynamically, making the Progress Bar realtime. To redraw the progress bar simply call RGraph.Clear()
+ (which clears the canvas) and then call myProgress.Draw() again.
+
+
+
+ The colours, title and scale are configurable, allowing you to represent a wide range of values.
+
+ An LED grid, that could be used to show a multitude of things. Could be used as a website counter for example.
+ It supports the A-Z, 0-9 and space characters. As you can see the colors are also user-definable. It also
+ supports the context menu, and therefore the zoom. The first LED grid demonstrates this.
+
+ Like the Bar chart, the line chart is one of the most versatile chart types. It is similar, but can indicate chronological
+ data better. The line chart is good if, for example, you want to illustrate sales figures over a year (or any period of
+ time). You'll then be able to easily see whether sales are going up, down or are stagnant. It will also become apparent
+ which months are busier than others. By using a multiple line chart you can add multiple sets of data (eg two or more years
+ of figures) to your chart. You can customise the line chart by stipulating it as being filled, having drop shadows, keys,
+ having the X axis in the centre, different colors, different tickmark styles and tooltips etc.
+
+
+
+ The first graph uses external DIVs for the tooltip contents. The DIVs are at the bottom of this page (they're set not to
+ be visible). Using external DIVs for tooltips can make maintenance easier.
+
+ The Meter is similar to the Odometer albeit only a semi-circle and not a full circle. It can be better when trying illustrate
+ a particular level, but only have a limited amount of space. It could also be quite effective as part of a control panel.
+
+ The Odometer can be used to provide an indication of a particular value. For example you could easily use it to
+ represent values for a control panel that shows information about a server. An Odometer indicating how much disk
+ space is used for example, would be more visual than a simple number.
+
+
+
+ The green, yellow and red areas are configurable, allowing you to add some level of urgency into your figures. The
+ figures are also configurable, so it can go from 0-10, or from 0-100.
+
+ The Pie chart can be used when you need to represent value as part of a whole. It is commonly used to represent percentages,
+ relative magnitudes or relative frequencies. If your intent is to compare a particular value (slice) against the whole of
+ the Pie chart, then it can be quite effective. If however you want to compare two seperate segments, then it can get
+ more difficult. If this is the case, you may want to consider a bar chart for example.
+
+
+
+ The colours can of course be customised, as can the borders (using the same color as the background and a line width of
+ about 5 gives the effect of segment separation. The chart can also have a drop shadow if you want one, but this shouldn't
+ be used in conjunction with segment seperation.
+
+
+
+ The first pie chart has a fade-in effect. This not part of the RGraph library but is very easy to implement.
+
+ The Radial scatter chart is a circular variant of the regular Scatter chart, and as the name suggests, circular. It
+ may be more suited to your dataset than the regular scatter chart.
+
+ The Scatter graph uses two variables to plot points and makes it clear where there are congregations. The data points
+ make up the X and Y coordinates. The labels on the X axis are separate from the X units, allowing you to "group" them. For
+ example, like the example, you could set the maxium X value to be 365, but only have four labels. That way you would
+ have a granularity of a day, but the X axis would only have four labels. Like the example.
+
RGraph: A text function that does horizontal and vertical alignment (and spins)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ RGraph.Text() is a text drawing function that allows vertical and horizontal alignment, and allows you to specify the angle of the
+ text too. The animation is done by a simple gobal variable, setTimeout() and redrawing the entire
+ canvas every frame. Perhaps not the most efficient of methods, but remember that your Javascript will likely be
+ running on computers that have more processing power than
+ some small countries... Reset the page
+
+
+
+ In a similar vein you could easily make some text that bounces from one side of the screen to the other,
+ hurrah - the return of <marquee>!
+
+
+
+ More examples can be found on the individual example pages, and a more complete
+ reference to the Text() function can be found in the API docs.
+
+
+
+
\ No newline at end of file
diff --git a/RGraph/examples/tradar.html b/RGraph/examples/tradar.html
new file mode 100644
index 0000000..fc28a35
--- /dev/null
+++ b/RGraph/examples/tradar.html
@@ -0,0 +1,240 @@
+
+
+
+
+
+
+
+ RGraph: HTML5 canvas graph library - Traditional radar chart
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
RGraph: HTML5 canvas graph library - Traditional radar chart
+
+
+
+
+
+
+
+ A traditional radar chart, that is similar to the Rose chart. Each of the data points is
+ arranged equally in terms of angle, whilst the magnitude of each point is shown by the distance from the centre. Thus,
+ data points of a higher magnitude can be seen as they are more distant from the centre.
+
+
+
+ Suitable for many datasets, but not all. If not, then the Rose chart may be more apt.
+
+
+
+ The circle, as can be seen in the second example, could be used to indicate a threshold of sorts. In the example,
+ it could be minimum sales required for a particular month. Months that fall below this threshold can be clearly seen.
+
RGraph: HTML5 canvas graph library - Vertical Progress bar
+
+
+
+
+ This is a Progress Bar for showing state. You can show anything with it - use it to show load on your server,
+ or percentage space free on your servers disk drive. You could even incorporate it with some AJAX to retrieve status information
+ from your webserver dynamically, making the Progress Bar realtime. To redraw the progress bar simply call RGraph.Clear()
+ (which clears the canvas) and then call myProgress.Draw() again.
+
+
+
+ The colours, title and scale are configurable, allowing you to represent a wide range of values.
+