From 770ba5201f5c60b2bb36602ff9d359f641e33125 Mon Sep 17 00:00:00 2001
From: Yves Fischer
Date: Sun, 23 Oct 2011 21:14:40 +0200
Subject: Charting with flask, rgraph and custom "timeseries database"
---
schall/static/RGraph/docs/.BC.txt | 237 ++
schall/static/RGraph/docs/.CHANGELOG.txt | 1847 ++++++++++++++
schall/static/RGraph/docs/adjusting.html | 141 +
schall/static/RGraph/docs/adjusting_bar.html | 153 ++
schall/static/RGraph/docs/adjusting_gantt.html | 228 ++
schall/static/RGraph/docs/adjusting_hprogress.html | 141 +
schall/static/RGraph/docs/adjusting_line.html | 150 ++
schall/static/RGraph/docs/adjusting_radar.html | 140 +
schall/static/RGraph/docs/adjusting_rose.html | 147 ++
.../static/RGraph/docs/adjusting_thermometer.html | 151 ++
schall/static/RGraph/docs/adjusting_vprogress.html | 145 ++
schall/static/RGraph/docs/animation-effects.html | 19 +
schall/static/RGraph/docs/animation_segments.html | 147 ++
schall/static/RGraph/docs/annotate_persist.html | 303 +++
schall/static/RGraph/docs/annotating.html | 216 ++
schall/static/RGraph/docs/api.html | 817 ++++++
schall/static/RGraph/docs/async.html | 209 ++
schall/static/RGraph/docs/bar.html | 791 ++++++
schall/static/RGraph/docs/basic_combined.html | 97 +
schall/static/RGraph/docs/basic_tooltips.html | 105 +
schall/static/RGraph/docs/bipolar.html | 397 +++
schall/static/RGraph/docs/bulk-discount.html | 191 ++
schall/static/RGraph/docs/color.html | 217 ++
schall/static/RGraph/docs/combine.html | 463 ++++
schall/static/RGraph/docs/context.html | 371 +++
schall/static/RGraph/docs/css.html | 270 ++
schall/static/RGraph/docs/domcontentloaded.html | 196 ++
schall/static/RGraph/docs/donut.html | 113 +
schall/static/RGraph/docs/dynamic.html | 232 ++
schall/static/RGraph/docs/effects.html | 1448 +++++++++++
schall/static/RGraph/docs/events.html | 589 +++++
schall/static/RGraph/docs/external.html | 357 +++
schall/static/RGraph/docs/fuel.html | 302 +++
schall/static/RGraph/docs/funnel.html | 409 +++
schall/static/RGraph/docs/gantt.html | 471 ++++
schall/static/RGraph/docs/gauge.html | 268 ++
schall/static/RGraph/docs/gutters.html | 229 ++
schall/static/RGraph/docs/hbar.html | 689 +++++
schall/static/RGraph/docs/hprogress.html | 427 ++++
schall/static/RGraph/docs/iframe-setup.html | 78 +
schall/static/RGraph/docs/iframe.html | 186 ++
schall/static/RGraph/docs/image2url.html | 142 ++
schall/static/RGraph/docs/index.html | 909 +++++++
schall/static/RGraph/docs/ingraph.html | 179 ++
schall/static/RGraph/docs/issues.html | 148 ++
schall/static/RGraph/docs/keys.html | 164 ++
schall/static/RGraph/docs/led.html | 186 ++
schall/static/RGraph/docs/licensing.html | 330 +++
schall/static/RGraph/docs/line.html | 990 +++++++
schall/static/RGraph/docs/line_filled.html | 142 ++
schall/static/RGraph/docs/meter.html | 448 ++++
schall/static/RGraph/docs/misc.html | 843 ++++++
schall/static/RGraph/docs/msie.html | 237 ++
schall/static/RGraph/docs/odo.html | 420 +++
schall/static/RGraph/docs/pie.html | 567 +++++
schall/static/RGraph/docs/png.html | 214 ++
schall/static/RGraph/docs/radar.html | 445 ++++
schall/static/RGraph/docs/released.txt | 2691 ++++++++++++++++++++
schall/static/RGraph/docs/resizing.html | 159 ++
schall/static/RGraph/docs/rose.html | 593 +++++
schall/static/RGraph/docs/rscatter.html | 373 +++
schall/static/RGraph/docs/scatter.html | 987 +++++++
schall/static/RGraph/docs/setconfig.html | 155 ++
schall/static/RGraph/docs/thermometer.html | 345 +++
schall/static/RGraph/docs/tooltips.html | 532 ++++
schall/static/RGraph/docs/vprogress.html | 442 ++++
schall/static/RGraph/docs/waterfall.html | 574 +++++
.../static/RGraph/docs/what-is-html5-canvas.html | 207 ++
schall/static/RGraph/docs/zoom.html | 332 +++
schall/static/RGraph/docs/zoom_thumbnail.html | 135 +
70 files changed, 27976 insertions(+)
create mode 100644 schall/static/RGraph/docs/.BC.txt
create mode 100644 schall/static/RGraph/docs/.CHANGELOG.txt
create mode 100644 schall/static/RGraph/docs/adjusting.html
create mode 100644 schall/static/RGraph/docs/adjusting_bar.html
create mode 100644 schall/static/RGraph/docs/adjusting_gantt.html
create mode 100644 schall/static/RGraph/docs/adjusting_hprogress.html
create mode 100644 schall/static/RGraph/docs/adjusting_line.html
create mode 100644 schall/static/RGraph/docs/adjusting_radar.html
create mode 100644 schall/static/RGraph/docs/adjusting_rose.html
create mode 100644 schall/static/RGraph/docs/adjusting_thermometer.html
create mode 100644 schall/static/RGraph/docs/adjusting_vprogress.html
create mode 100644 schall/static/RGraph/docs/animation-effects.html
create mode 100644 schall/static/RGraph/docs/animation_segments.html
create mode 100644 schall/static/RGraph/docs/annotate_persist.html
create mode 100644 schall/static/RGraph/docs/annotating.html
create mode 100644 schall/static/RGraph/docs/api.html
create mode 100644 schall/static/RGraph/docs/async.html
create mode 100644 schall/static/RGraph/docs/bar.html
create mode 100644 schall/static/RGraph/docs/basic_combined.html
create mode 100644 schall/static/RGraph/docs/basic_tooltips.html
create mode 100644 schall/static/RGraph/docs/bipolar.html
create mode 100644 schall/static/RGraph/docs/bulk-discount.html
create mode 100644 schall/static/RGraph/docs/color.html
create mode 100644 schall/static/RGraph/docs/combine.html
create mode 100644 schall/static/RGraph/docs/context.html
create mode 100644 schall/static/RGraph/docs/css.html
create mode 100644 schall/static/RGraph/docs/domcontentloaded.html
create mode 100644 schall/static/RGraph/docs/donut.html
create mode 100644 schall/static/RGraph/docs/dynamic.html
create mode 100644 schall/static/RGraph/docs/effects.html
create mode 100644 schall/static/RGraph/docs/events.html
create mode 100644 schall/static/RGraph/docs/external.html
create mode 100644 schall/static/RGraph/docs/fuel.html
create mode 100644 schall/static/RGraph/docs/funnel.html
create mode 100644 schall/static/RGraph/docs/gantt.html
create mode 100644 schall/static/RGraph/docs/gauge.html
create mode 100644 schall/static/RGraph/docs/gutters.html
create mode 100644 schall/static/RGraph/docs/hbar.html
create mode 100644 schall/static/RGraph/docs/hprogress.html
create mode 100644 schall/static/RGraph/docs/iframe-setup.html
create mode 100644 schall/static/RGraph/docs/iframe.html
create mode 100644 schall/static/RGraph/docs/image2url.html
create mode 100644 schall/static/RGraph/docs/index.html
create mode 100644 schall/static/RGraph/docs/ingraph.html
create mode 100644 schall/static/RGraph/docs/issues.html
create mode 100644 schall/static/RGraph/docs/keys.html
create mode 100644 schall/static/RGraph/docs/led.html
create mode 100644 schall/static/RGraph/docs/licensing.html
create mode 100644 schall/static/RGraph/docs/line.html
create mode 100644 schall/static/RGraph/docs/line_filled.html
create mode 100644 schall/static/RGraph/docs/meter.html
create mode 100644 schall/static/RGraph/docs/misc.html
create mode 100644 schall/static/RGraph/docs/msie.html
create mode 100644 schall/static/RGraph/docs/odo.html
create mode 100644 schall/static/RGraph/docs/pie.html
create mode 100644 schall/static/RGraph/docs/png.html
create mode 100644 schall/static/RGraph/docs/radar.html
create mode 100644 schall/static/RGraph/docs/released.txt
create mode 100644 schall/static/RGraph/docs/resizing.html
create mode 100644 schall/static/RGraph/docs/rose.html
create mode 100644 schall/static/RGraph/docs/rscatter.html
create mode 100644 schall/static/RGraph/docs/scatter.html
create mode 100644 schall/static/RGraph/docs/setconfig.html
create mode 100644 schall/static/RGraph/docs/thermometer.html
create mode 100644 schall/static/RGraph/docs/tooltips.html
create mode 100644 schall/static/RGraph/docs/vprogress.html
create mode 100644 schall/static/RGraph/docs/waterfall.html
create mode 100644 schall/static/RGraph/docs/what-is-html5-canvas.html
create mode 100644 schall/static/RGraph/docs/zoom.html
create mode 100644 schall/static/RGraph/docs/zoom_thumbnail.html
(limited to 'schall/static/RGraph/docs')
diff --git a/schall/static/RGraph/docs/.BC.txt b/schall/static/RGraph/docs/.BC.txt
new file mode 100644
index 0000000..84ed3c4
--- /dev/null
+++ b/schall/static/RGraph/docs/.BC.txt
@@ -0,0 +1,237 @@
+
+ Backwards compatibility breaks and advisories
+ ===============================================
+
+ o [22-10-2011] IMPORTANT: The default positioning for titles has changed - you may need to adjust the positioning of your titles
+ o [15-10-2011] The Pie chart chart.segments array is being removed (probably November or December) - use .angles array instead.
+ o [15-10-2011] The Pie chart start axis has been changed to the "north" axis (instead of the "east" axis. Please test your charts!
+ o [01-10-2011] Note that due FF7 had issue with the gradient used in the Odometer border so you may find that it has changed very
+ slightly
+
+ +---------------------------------------------------------------------------------------+
+ o [24-09-2011] | Stable release |
+ +---------------------------------------------------------------------------------------+
+
+ o [10-10-2011] The Bar, Line and Scatter charts have had the background grid autofit turned on by default. Also the number
+ of horizontal grid lines has been changed to 5.
+ o [03-10-2011] A change has been made to the Pie chart when using tooltips and the full canvas zoom - please test your charts
+ if upgrading and you use tooltips in conjunction with the zoom.
+
+ +---------------------------------------------------------------------------------------+
+ o [27-08-2011] | Stable release |
+ +---------------------------------------------------------------------------------------+
+
+ o [31-08-2011] Donut/Pie chart title positioning may need attention - the default for chart.title.vpos is now 0.5
+ (the vertical centre of the gutter)
+ o [31-08-2011] Filled line charts have been changed - please see the changelog file for more
+ information (20-08-2011). You may need to reverse your colors if you use multiple lines.
+
+ +---------------------------------------------------------------------------------------+
+ o [29-07-2011] | Stable release |
+ +---------------------------------------------------------------------------------------+
+
+ o [30-07-2011] When using Line chart specific labels in conjunction with chart.ymin the label positioning
+ has changed - the labels now start at the X axis vertical position.
+ o [20-07-2011] The chart.segments option is no longer mmaintained - use obj.angles instead
+ o [20-07-2011] When adding a Line chart to a Bar chart some of the Line chart properties are no longer set for you -
+ you will need to set these yourself if you want them. They are (along with what they were set to):
+
+ lineObj.Set('chart.noaxes', true);
+ lineObj.Set('chart.background.barcolor1', 'rgba(0,0,0,0)');
+ lineObj.Set('chart.background.barcolor2', 'rgba(0,0,0,0)');
+ lineObj.Set('chart.background.grid', false);
+ lineObj.Set('chart.ylabels', false);
+
+ o [17-07-2011] The default CSS has been altered for tooltips. This affects all chart types. The changes are:
+ o There is now no CSS border to the tooltip
+ o The toltip is now transparent a small amount (opacity=0.9)
+ o The tooltip shadow X & Y offsets are now zero
+
+ If you wish to revert these changes you will need to use the tooltip CSS class:
+
+
+
+ +---------------------------------------------------------------------------------------+
+ o [12-07-2011] | Stable release |
+ +---------------------------------------------------------------------------------------+
+
+ o [02-07-2011] The Tradar chart has been renamed to the Radar chart. This will make more identifiable. You WILL
+ need to update you code to the new name!
+ o [25-06-2011] The HBar default colors have changed.
+ o [18-06-2011] The Rose chart has undergone significant changes, now supporting a "stacked" Rose chart as well as
+ a "non-equi-angular" variant. It also now supports chart.colors.sequential property and
+ the default chart.strokestyle value has been changed to rgba(0,0,0,0.5). You may need to set the
+ chart.colors.sequential (to true) to maintain BC.
+
+ +---------------------------------------------------------------------------------------+
+ o [04-06-2011] | Stable release |
+ +---------------------------------------------------------------------------------------+
+
+ o [04-06-2011] MAJOR BREAK: The chart.gutter property has been split into four properties:
+ o chart.gutter.left
+ o chart.gutter.right
+ o chart.gutter.top
+ o chart.gutter.bottom
+ This affects all graph types (except the LED chart) so rigorous testing will be necessary if
+ you choose to upgrade.
+ o [14-05-2011] If you're using chart.width/chart.height, please switch to the individual gutter settings. These
+ provide finer grained and more intuitive control over the gutters and certain things are done for you
+ automatically, like for example adjusting coordinates for tooltips and resizing. The chart.width and
+ chart.height will cease to function starting immediately.
+ o [02-04-2011] The default color for background bars on the Scatter has changed from white to transparent. This was
+ necessary to facilitate background images
+
+ +---------------------------------------------------------------------------------------+
+ o [26-03-2011] | Stable release |
+ +---------------------------------------------------------------------------------------+
+
+ o [12-03-2011] The RGraph.Clear() API function now clears to transparent, not white. If you wanted it to clear to white
+ you could call this function from the new onclear event:
+
+ function myClear(obj)
+ {
+ obj.context.beginPath();
+ obj.context.fillStyle = 'white';
+ obj.context.fillRect(-10,-10,obj.canvas.width + 20, obj.canvas.height + 20);
+ obj.context.fill();
+ }
+
+ DO NOT simply use the RGraph.Clear() function in the onclear event listener function, as you will create an
+ infinite loop.
+
+ o [06-03-2011] The RGraph.getSegment() method has been moved to be a part of both the Pie and Rose objects. This means
+ that if you use it you will have to change your code slightly. This change was necessary to facilitate
+ Pie chart exploded segments. This change will also help prevent bugs in this function in the future.
+
+ +---------------------------------------------------------------------------------------+
+ o [28-01-2011] | Stable release |
+ +---------------------------------------------------------------------------------------+
+
+ o [22-01-2011] The RGraph.Clear() function now uses a square 2,000 pixels wide & high
+ o [15-01-2011] The Gantt adjusting array (kept in the RGraph registry) now uses associative/textual keys instead of numeric ones
+ o [08-01-2011] The default number of Line chart X tickmarks has been altered ever-so-slightly: Now if you don't have chart.hmargin
+ set then the X tickmarks will line up with the points on the chart. See the first example on the line chart test
+ page for an example: http://dev.rgraph.net/tests/_line.html
+ o [08-01-2011] The custom RGraph event onannotatestart has been renamed to onannotatebegin. The previous name will still work,
+ but will eventually be removed.
+
+ +---------------------------------------------------------------------------------------+
+ 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/schall/static/RGraph/docs/.CHANGELOG.txt b/schall/static/RGraph/docs/.CHANGELOG.txt
new file mode 100644
index 0000000..3d12334
--- /dev/null
+++ b/schall/static/RGraph/docs/.CHANGELOG.txt
@@ -0,0 +1,1847 @@
+ 20th October 2011
+ =================
+ o [BAR] Added chart.ymin
+ o [LINE] Multiple filled Line charts now work with the Trace effect
+ o [METER] Tweaked the Grow animation. Test your charts before upgrading (if you use the Grow animation)
+ o [MISC] IMPORTANT: Default positioning for titles has changed - see .BC.txt file
+ o [PIE] Added chart.key.interactive
+
+ 15th October 2011
+ =================
+ o [GAUGE} Added Grow effect. Like the Odo (now) it animates from the last reading, not zero all the time.
+ o [LINE] Added FoldToCenter effect
+ o [MISC] Converted crosshairs to use DOM2 event handling
+ o [MISC] Added: chart.crosshairs.vlines
+ chart.crosshairs.hlines
+ o [ODO] Changed Grow animation function so that it animates from the last reading - not constantly from zero
+ o [PIE] Added .Explode() method to pie chart for programmatically exploding segments
+ o [RADAR] Added Grow effect
+ o [SCATTER] Added chart.ylabels.inside
+ o [WATERFALL] Added Grow effect
+
+ 11th October 2011
+ =================
+ o [NOTE] The Pie chart chart.segments array is being removed (probably November or December) - use obj.angles instead.
+ o [PIE] IMPORTANT: The Pie chart has been altered so that the start point is now the "north"axis. Please check your
+ charts - particularly if you use the Pie chart internals. If you want to stick with the older version of the
+ Pie chart - it's in the libraries/ folder named RGraph.pie.js.old and will be there for a few releases.
+ You're highly recommended to use the newer version though as the old version will bew only kept for a few
+ months.
+ o [PIE] Added RGraph.Effects.Pie.Implode animation - combining it with the RoundRobin animation looks good
+ o [ROSE] The Rose chart Grow animation also now gradually increases the angle of the segments as well as their size. See
+ this page for an example: http://www.rgraph.net/examples/index.html Regular and stacked Rose charts are supported
+
+ 8th October 2011
+ ================
+ o [HBAR] Added easing to the HBar grow effect - the effect is very subtle
+ o [PIE] Added RoundRobin effect
+ o [MISC] Added chart.title.font chart.title.xaxis.font chart.title.yaxis.font
+ chart.title.size chart.title.xaxis.size chart.title.yaxis.size
+ chart.title.bold chart.title.xaxis.bold chart.title.yaxis.bold
+ o [SCATTER] Added Scatter chart boxplot tooltips
+
+ 4th October 2011
+ ================
+ o [LINE] Added Trace animation
+ o [WEBSITE] Added more testimonials
+
+ 1st October 2011
+ ================
+ o [FUNNEL] Added chart.taper for Funnels that don't taper to a point
+ o [FUNNEL] Added chart.labels.sticks that shows indicator lines for the labels
+ o [GANTT] Added the ability to have multiple "events" per line. For an example see here:
+ http://www.rgraph.net/examples/gantt.html
+ Note that if you start adding multiple events then the tooltips order may need attention
+ o [GAUGE] Added Gauge chart - another meter variant
+ o [LINE] Added chart.tooltips.hotspot.xonly. This makes the tooltips trigger by the X mouse position only
+ o [MISC] Not very noticable, but the snap tooltip effect now uses jQuery if it's available.
+ o [ODO] Note that Firefox 7 had issue with the gradient used in the Odometer border - so you may find that it has changed very
+ very slightly
+ o [PIE] Fixed a pie chart bug which presented itself when clicking canvas tags that had nothing to do with RGraph
+
+ 24th September 2011
+ ===================
+ o [WEBSITE] Social icons updated
+
+ 22nd September 2011 (STABLE)
+ ===================
+ o [DOCS] Documented how to retrieve just the PNG image from the canvas
+ o [LICENSE] Added PayPal donation button. If you're covered by the free license but still want to contribute to
+ help keep RGraph going you now can. All donations are gratefully received.
+ o [METER] Meter chart title size is now always two points larger than chart.text.size
+ o [METER] Fixed little bug with Meter chart grow animation not respecting minimum value
+ o [MISC] STABLE release
+ o [SCATTER DOCS] Documented chart.line.linewidth
+ o [WEBSITE] Added testimonial from Cisco Ireland
+
+ 18th September 2011
+ ===================
+ o [LICENSE] If you want to buy multiple licenses (eg you're a web designer with multiple clients that you want
+ to get RGraph licenses for), then there's now a bulk licenses option with the discount increasing
+ the more you buy. If you're interested in this then you can inquire about it by emailing
+ licensing@rgraph.net
+ o [LINE] Filled line charts and the X axis at the top now works correctly
+ o [METER] Added Meter chart Grow effect
+
+ 12th September 2011
+ ===================
+ o [HBAR] chart.background.grid.autofit has been turned on by default.
+ o [LINE] Added chart.curvy and chart.curvy.factor. Curvy lines are NOT exact, and the inaccuracy increases with
+ the severity of the curve. chart.curvy.factor can be a decimal from 0 (not curvy) to 0.5 (quite curvy)
+
+ 9th September 2011
+ ==================
+ o [BAR] The background grid autofit has been turned on by default. The number of horizontal grid lines has been
+ changed to 5.
+ o [EFFECTS] Fade in now operates over a period of 0.5 seconds
+ o [LICENSE] Revamped the license page - this should make it clearer
+ o [LINE] Added UnfoldFromCenter() animation
+ o [LINE] The background grid autofit has been turned on by default. The number of horizontal grid lines has been
+ changed to 5.
+ o [ODO] Added Grow animation effect
+ o [PIE ZOOM] A change has been made to the Pie chart when using tooltips and the full canvas zoom - please test your charts
+ if you're upgrading and you use tooltips in conjunction with the zoom.
+ o [PIE] Fixed a Pie chart label/seperation bug where chart.exploded is a number
+ o [ROSE] Added Grow() animation. This only works with regular and stacked Rose charts.
+ o [SCATTER] You can now have an X scale. If you specify that the X axis should be scaled then you don't have to specify an
+ xmax - one will be calculated for you. It may not be what you want though - so you might have to specify the
+ xmax anyway.
+ o [SCATTER] Minor bug fixed when hiding the lest tick when the X axis is at the right
+ o [SCATTER] The background grid autofit has been turned on by default. The number of horizontal grid lines has been
+ changed to 5.
+ o [WATERFALL] Added ability to have the X axis in the center
+ o [WATERFALL] The Waterfall property chart.background.grid.autofit now defaults to true (instead of false)
+ o [ZOOM] Changed the frame rate for the full canvas zoom
+
+ 30th August 2011
+ ================
+ o [LINE] Added chart.animation.unfold.initial
+ o [MISC] Support is now via email - support@rgraph.net - not the forum
+
+ 27th August 2011 (STABLE)
+ ================
+ o [MISC] Stable release
+
+ 25th August 2011
+ ================
+ o [WEBSITE] Misc website changes
+
+ 22nd August 2011
+ ================
+ o [LINE] Added RGraph.Effects.Line.Rise(obj) animation function. This is a nice effect made simple because of the
+ .Animate() function
+ o [LINE] A bug has been fixed for stepped line chart, but please be cautious when upgrading
+
+ 20th August 2011
+ ================
+ o [MISC] Changed the RGraph.Clear() method to use .clearRect() method
+ o [LINE] IMPORTANT Significant change to the way that filled multi-line charts are drawn. Formerly
+ the lines were stacked on top of each other. Normally this wasn't too much of an issue
+ unless you wanted semi-transparent colours. Because the lines were stacked on top of
+ each other the colors wouldn't be exactly right. This has now changed so you CAN now use
+ semi-transparent colors.
+
+ As a result the order in which the lines are drawn has been changed, so whilst the data
+ will remain the same, the "stacking" order if the datasets may change. Also, if you use
+ an array of shadow colors, they may need reversing.
+ o [MISC] The download archive now works "out-of-the-box" with IE9. Formerly the DOCTYPE wasn't the first line
+ in the files so it choked. Only offline IE9 was affected.
+ o [MISC] Added showcase of requestAnimationFrame(): http://dev.rgraph.net/tests/anim.html
+
+ 13th August 2011
+ ================
+ o [BAR] Added chart.numyticks
+ o [HPROGRESS] Added .getBar method
+ o [HPROGRESS] Added chart.strokestyle
+ o [LINE] Added chart.numyticks
+ o [METER] Added chart.segment.radius.start which allows you to specify a start point for the green/yellow/red coloured segments
+ o [METER] Added chart.border
+ o [METER] Added chart.linewidth.segments (for the lines between the segments
+ o [METER] Added chart.labels (a boolean controlling whether the labels are shown or not)
+ o [METER] Added chart.needle.linewidth
+ o [METER] Added chart.needle.radius
+ o [METER] Added chart.needle.tail
+ o [PIE] Added Pie chart Grow effect
+ o [RADAR] Completely removed chart.tooltips.coords.adjust
+ o [RADAR] Added .getPoint(e) method
+ o [RADAR] Fixed a bug with the __dataset__ property that is added to tooltips
+ o [RADAR] The chart.colors property has changed to: ['red', 'green', 'blue']
+ o [RADAR] Added chart.labels.specific
+ o [RSCATTER} Converted to use a .getPoint(e) method for tooltips
+ o [SCATTER} Completely removed chart.tooltips.coords.adjust
+ o [SCATTER] Added chart.numyticks
+ o [VPROGRESS] Added .getBar method
+ o [VPROGRESS] Added chart.strokestyle
+ o [WATERFALL] Added chart.tooltips.event
+ o [WATERFALL] Added .getBar(e) method for tooltips
+
+ 10th August 2011
+ ================
+ o [ANIM] Revamped the animation page and added the RGraph.Effects object. This allows you to add animation and wipes
+ to your RGraph charts.
+
+ 6th August 2011
+ ===============
+ o [BAR LINE] Tooltips highlighting now works with combined bar/line charts
+ o [METER] Added chart.centery, chart.centery and chart.radius
+ o [METER] Added chart.colors.ranges - an alternative to the red/yellow/green areas
+ o [METER] Added chart.strokestyle - default is null
+ o [SCATTER] Added chart.boxplot.capped - this controls the horizontal lines at the end of boxplots
+ o [THERMOMETER] The thermometer now supports a scale with chart.scale.visible, chart.scale.decimals and chart.ylabels.count
+ o [TOOLTIPS] The internal function RGraph.getTooltipText() has been renamed to RGraph.getTooltipTextFromDIV()
+ o [WEBSITE] Added animation samples to front page and example index page
+
+ 29th July 2011 (STABLE)
+ ==============
+ o [BAR] Added chart.noendxtick
+ o [BAR] Fixed a bug with specific labels vertical positioning with a center X axis
+ o [LINE] Documented chart.noendxtick
+ o [LINE] Added chart.tickmarks.linewidth
+ o [LINE] When using specific labels and a ymin, the first label is now placed where "0" would go
+
+ 25th July 2011
+ ==============
+ o [CONTEXT] Added onbeforecontextmenu RGraph event
+ o [KEY] Noted Line chart interactive key
+ o [PIE] Shadow now works correctly with exploded segments
+ o [SCATTER] Added chart.labels.above, chart.labels.above.size and chart.labels.above.decimals to the Scatter chart
+
+
+ 20th July 2011
+ ==============
+ o [BIPOLAR] Converted tooltips to use the new obj.getBar(e) method.
+ o [PIE] The option chart.exploded can now be a number, which is then applied to each segment (as well as the prior array)
+ o [PIE] Outlining now works with exploded segments - http://www.rgraph.net/docs/you-dont-need-to-spend-a-lot-of-money.html
+ o [BAR] When adding a line chart on top of a bar chart, the following are no longer set.
+ If you want them you will need to set them yourself (the former values are also shown):
+
+ line.Set('chart.noaxes', true);
+ line.Set('chart.background.barcolor1', 'rgba(0,0,0,0)');
+ line.Set('chart.background.barcolor2', 'rgba(0,0,0,0)');
+ line.Set('chart.background.grid', false);
+ line.Set('chart.ylabels', false);
+
+ There are a few things that are still set for you:
+
+ chart.gutter.top
+ chart.gutter.bottom
+ chart.gutter.left
+ chart.gutter.right
+ chart.ymax
+
+ o [FUNNEL] Converted tooltips to use the new obj.getSegment(e) method.
+ o [LINE] The Line chart now has a .__index2__ property which can be used in your ontooltip event handlers. This is the index
+ in the individual array for a particular line. If you're not using multiple lines in your chart, this won't affect
+ you.
+
+ 17th July 2011
+ ==============
+ o [BAR] Added chart.colors.reverse for reversing the order in which colors are used (stacked bar charts only)
+ o [FUNNEL] Added a .getSegment(e) method - which greatly simplifies retrieving the segment that has
+ been clicked on (or the mouse is over etc).
+ o [LINE] Added chart.key.interactive - this allows you click on a key item and it will be highlighted on the chart
+ o [TOOLTIPS] Small fix to snap effect when you have multiple charts one one page, both with tooltips
+ o [TOOLTIPS] The default CSS has been altered for tooltips. This affects all chart types. The changes are:
+ o There is now no CSS border to the tooltip
+ o The toltip is now transparent a small amount (opacity=0.9)
+ o The tooltip shadow X & Y offsets are now zero
+
+ 12th July 2011
+ ==============
+ o [MISC] Stable release
+
+ 11th July 2011
+ ==============
+ o [WEBSITE] Website updates
+
+ 10th July 2011
+ ==============
+ o [CONTEXT] Added the registry variable: RGraph.Registry.Get('chart.contextmenu').__shape__
+ This is the underlying hotspot (eg bar/segment/point), if any, that was clicked on.
+
+ Objects that have a .getXXX() method now also have a .getShape() method, which is
+ exactly the same, but can be used if you don't know what object type you have,
+ (since it's the same name across all object types).
+
+ 8th July 2011
+ =============
+ o [DOCS] Documentation updates
+ o [COMMON] Fixed a slight bug when formatting negative numbers at 1,000 and over
+ o [METER] Added Meter options: chart.value.label
+ chart.value.text.decimals
+ chart.value.text.units.pre
+ chart.value.text.units.post
+
+ 29th June 2011
+ ==============
+ o [WEBSITE] Website changes
+
+ 28th June 2011
+ ==============
+ o [RADAR] The Tradar has been renamed to Radar - you WILL need to update your code slightly.
+ o [RADAR] Fixed a bug with tooltips and multiple datasets
+ o [TOOLTIPS] The 'snap' effect now snaps on the first view, moving in from the top left - see the front page line chart
+ for an example of its use.
+
+ 25th June 2011
+ ==============
+ o [LINE] "10 labels" with a chart.ymin value now works with X axis at the top and bottom
+ o [PIE] The chart.tooltips.coords.adjust property has been removed
+ o [ZOOM] Added ability to fire the full canvas zoom by just a click - no context menu
+
+ 23rd June 2011
+ ==============
+ o [LINE] The chart.tooltips.coords.adjust property has been removed
+ o [ROSE] The Rose chart getSegment() return value has changed. Instead of just one radius value, there are now two
+ radius values - the start and end values. This change was necessary to facilitate stacked Rose charts.
+ Subsequent values have "moved up one" in the array (ie what was index 3 is now 4, what was 4 is now 5
+ and what was 5 is now 6)
+ o [SCATTER] The chart.tooltips.coords.adjust property has been removed
+
+ 21st June 2011
+ ==============
+ o [DONUT] Added chart.variant.donut.color for the center hole
+ o [HBAR] The default colors have changed
+ o [HBAR] Added sequential color support to grouped and stacked HBars
+
+ 18th June 2011
+ ==============
+ o [HBAR] Added chart.colors.sequential for regular hbars (not stacked or grouped)
+ o [HBAR] Converted to .getBar(e) method for tooltips
+ o [LINE] Added triangle and filledtriangle tickmark types
+ o [ODO] Added chart.green.solid and documented
+ o [ODO] Added chart.yellow.solid and documented
+ o [ODO] Added chart.red.solid and documented
+ o [ODO] Documented chart.green.color
+ o [ODO] Documented chart.yellow.color
+ o [ODO] Documented chart.red.color
+ o [PIE] Added chart.variant.donut.color - this controls the color of the hole
+ o [ROSE] Implemented stacked Rose chart (see below)
+ o [ROSE] Added chart.colors.sequential (which, if you upgrade, you need to set to true to maintain BC)
+ o [ROSE] When using tooltips, the highlight will now appear "over" the axis labels. This makes the
+ highlighted segment more identifiable.
+ o [ROSE] Tooltips can now be a single function, or an array of functions as well as an array of strings
+ o [ROSE] Added chart.variant - the value can be either null (for a normal or stacked Rose chart) or "non-equi-angular" for a
+ Rose chart that has unequal segment sizes. See an example here:
+
+ http://dev.rgraph.net/tests/2011-07-30/non-equi-angular_rose.html
+
+ o [ROSE] Added chart.labels.offset
+ o [ROSE] Added chart.tooltips.event
+ o [SCATTER] Added in-graph labels to Scatter chart
+
+ The Rose chart has undergone significant changes in order to facilitate stacked and non-equi-angular charts.
+ In particular, the color handling has changed, and as such you may need to specify chart.colors.sequential in
+ your chart configurtion to get the colors to behave as they used to. Changing the way colors behave brings the Rose chart
+ into line with other chart types. Also, the Rose chart .getSegment() return value has changed - now instead of just one radius
+ value, you get a start radius and end radius value.
+
+ 7th June 1011
+ =============
+ o [LINE] Documented chart.filled.accumulative
+ o [WEBSITE] Removed redundant checks from graph libraries
+
+ 4th June 2011 (STABLE)
+ =============
+ o [MISC] Stable release - see .BC.txt, and look through this files entries since the last stable release (25-03-2011)
+
+ 28th May 2011
+ =============
+ o [LINE] You may need to adjust your titles vertical positioning using chart.title.vpos
+ o [MISC] Added example of adding a subtitle to your graph
+
+ 21st May 2011
+ =============
+ o [BIPOLAR] Tooltip handling has changed. If none is set for a particular bar, none will now be shown
+ o [COMMON] Check your graph titles - the vertical positioning has changed. To reposition you can
+ use chart.title.vpos
+ o [HBAR]The X axis title positioning may have changed slightly - if you use it you should check your title is as you expect
+ o [HBAR] chart.labels.above has been fixed in respect of drawing text in a stacked HBar for sections that it shouldn't do
+ o [HBAR] Fixed a very minor bug when the chart is redrawn (after being drawn once) and the scale wasn't correctly reset
+ o [LINE] This chart type may be particularly buggy because of the gutter changes
+ o [MISC] Individual gutters are now settable with all graph types
+ o [MISC] The settings chart.width and chart.height are now deprecated in favour of the new individual gutter settings
+ o [ODO] Added key - helpful for multiple pointers
+ o [RESIZE] Repositioning the resize handle is no longer necessary with the introduction of independent gutter settings.
+ Starting with the May release this setting should no longer be used.
+ o [SCATTER] Added an obj.getPoint(e) method which eases getting the point (if any) that is currently being hovered over
+ o [WATERFALL] Documented chart.scale.formatter
+
+ Keep in mind that individual gutter settings and using chart.width/chart.height are not meant
+ to be used together - chart.width/chart.height will cease to be user facing properties and will
+ (starting this release) stop functioning and be removed completely. The addition of individual
+ gutter settings is a fundamental change so testing of your graphs is imperative. The
+ requirement of translating to reclaim lost space is reduced (if not eliminated
+ entirely) with the addition of these settings.
+
+ 7th May 2011
+ ============
+ o [API] Added RGraph.Reset() function, which both clears the canvas AND resets any .translate() that has been performed
+ o [INVOICE] Improved the appearance of the invoice
+ o [LINE] Added individual gutter settings:
+ chart.gutter.left
+ chart.gutter.right
+ chart.gutter.top
+ chart.gutter.bottom
+ Keep in mind that these settings are experimental currently. In particular they may cause dynamic features
+ not to work 100% correctly.
+ o [MODALDIALOG] Added an example of covering the scroll bars to the ModalDialog page
+ o [ODO] Kength of extra pointers is now supported, eg: odo.Set('chart.needle.extra', [[16, 'yellow', 50]]);
+ o [WATERFALL] Added this new chart type
+ o [WEBSITE] Changed pages to use uncompressed version of ExCanvas - now works offline
+
+ 30th April 2011
+ ===============
+ o [METER] Added chart.scale.decimals - default is 0
+
+ 9th April 2011
+ ==============
+ o [BAR] Added support for chart.background.image
+ o [BAR] Added ability to have X axis at the top for entirely negative data sets, eg:
+ obj.Set('chart.xaxispos', 'top');
+ o [LED] Added chart.width and chart.height. Also changed the sizing so now the letters should always fit the canvas size
+ o [LINE] Added support for chart.background.image
+ o [LINE] Added ability to have X axis at the top for entirely negative data sets, eg:
+ obj.Set('chart.xaxispos', 'top');
+ o [MSIE] MSIE 8 now clears to white by default, not transparent
+ o [PIE] Added chart.tooltips.coords.adjust
+ o [PIE] Segment separation is now available as a tooltip highlight mode (exploded segments)
+ o [SCATTER] Added support for chart.background.image
+ o [SCATTER] Documented chart.ylabels.invert
+ o [THERMOMETER] Added adjusting
+ o [THERMOMETER] Added chart.text.color
+ o [THERMOMETER] Added chart.value.label, which allows to not display the label (true/false)
+
+ 25th March 2011 (STABLE)
+ ===============
+ o [COMMON] The default for chart.key.halign is now null, by default the position for the
+ key depends on the position of the Y axis
+ o [COMMON] Changed chart.title.yaxis.align to chart.title.yaxis.position
+ o [MSIE] Positioning tweaks for IE9 final
+
+ 20th March 2011
+ ===============
+ o [LINE] Added workaround for Chrome bug when specifying different line widths for lines
+ o [MISC] Added chart.key.halign (when using graph mode) which can be left or right (default)
+ o [TRADAR] Fixed tradar and interactive adjusting (thrown out by the addition of multiple datasets)
+
+ 12th March 2011
+ ===============
+ o [COMMON] The RGraph.Clear() function has been changed to a transparent colour to transparent instead of white. Also,
+ a new event has been added called onclear which fires when the function is called. You can use this function
+ to draw a white (or a color of your choice) rectangle over the canvas. Effectively clearing the canvas to
+ your color, for example:
+
+ function myClear(obj)
+ {
+ obj.context.beginPath();
+ obj.context.fillStyle = 'white';
+ obj.context.fillRect(-10,-10,obj.canvas.width + 20, obj.canvas.height + 20);
+ obj.context.fill();
+ }
+
+ DO NOT simply use the RGraph.Clear() function in the onclear event listener function, as you will create an
+ infinite loop.
+ o [COMMON] Added chart.title.yaxis.align to the common background code. This is usable by:
+ - Bar
+ - Line
+ - Scatter
+ o [LINE] A bug has been fixed that is apparent when you're using chart.outofbounds and have null values. If you have this
+ combination, please test your graphs! An example is here: http://dev.rgraph.net/tests/null.html
+ o [ODO] Added chart.border.color1
+ o [ODO] Added chart.border.color2
+ o [ODO] Added chart.border.color3
+ o [ROSE] Corrected a bug in the Rose chart, introduced in the prior beta
+ o [METER] Added the following tickmark controls to the Meter chart:
+ chart.tickmarks.small.num
+ chart.tickmarks.big.num
+ chart.tickmarks.small.color
+ chart.tickmarks.big.color
+ o [RESIZING] Tooltips for the icons are now limited to Google Chrome and MSIE because of reliability issues. The cursor will
+ still change in all browsers though
+ o [THERMOMETER] Added chart.title.side
+ o [TRADAR] Added multiple dataset support. eg: http://www.rgraph.net/examples/tradar.html
+ o [TRADAR] Added key
+
+ 5th March 2011
+ ==============
+ o [COMMON] The default color for by the RGraph.Clear() function has been changed to transparent.
+ o [COMMON] The RGraph.getSegment() function has been moved to be a method of both the Rose and the Pie charts, instead of part
+ of the common object. ie Supposing your object is called myObj, it will now be myObj.getSegment(e), instead of
+ RGraph.getSegment(e)
+ o [INVOICE] Added Paypal button to invoice
+ o [PIE] Added exploded segments. http://www.rgraph.net/docs/animation_segments.html Certain Pie chart options won't work
+ with this feature
+ o [THERMOMETER] Added initial implementation of this visual variation on the progress bar
+
+ 26th February 2011 (STABLE)
+ ==================
+ [MISC] Stable release
+
+ 19th February 2011
+ ==================
+ o [BAR] Added chart.noaxes
+ chart.noxaxis
+ chart.noyaxis
+ o [KEY] Added new test example of an interactive key. This feature isn't finished yet and has limited use cases.
+ o [WEBSITE] Added facebook sharing icon
+
+ 14th February 2011
+ ==================
+ o [DOCS] Added example of persistent annotations
+ o [HBAR] Updated docs
+
+ 11th February 2011
+ ==================
+ o [HBAR] Added chart.xmin
+ o [MISC] Added chart.width and chart.height properties to remaining libraries
+ o [LINE] Fixed slight bug in line when multiple lines are specified as one argument
+ o [SCATTER] Added chart.labels.specific.align which allows you to center align labels
+
+ 28th January 2011 (STABLE)
+ =================
+ o [BAR] Added chart.background.grid.autofit.align, for making the grid lines line up with the ticks. Any chart.hmargin will
+ throw the alignment out.
+ o [DOCS] Added note to animation page about CSS vs
+
+
+ When adjusting is complete the chart.events array is updated. So you can use the numerical index that you find in
+ the registry (as above) with the chart.events array to get up-to-date event information.
+
+
+
+ Note:
+ The Gantt chart uses console.log() to send notifications. Press CTRL+SHIFT+J in Chrome to see the console, or use Firebug in
+ Firefox. Other browsers will vary.
+
RGraph: HTML5 Javascript charts library - Adjusting your charts interactively - HProgress bar
+
+
+
+
+ The Horizontal Progress Bar can be adjusted by clicking on it. When adjusting
+ is finished the onadjustend event fires. If you attach a function to the onadjustend event (as below) you can get the new value by
+ looking at the .value property (eg myProgress.value).
+
RGraph: HTML5 Javascript charts library - Adjusting your charts interactively - Line chart
+
+
+
+
+ The Line chart can be adjusted by dragging the line(s) up and down. By using the RGraph registry -
+ RGraph.Registry.Get('chart.adjusting.line.myc') - you can get the details of the adjustment
+ (replace myc with the ID of your canvas). This is an array consisting of:
+
+
+
The chart object
+
The index of the point in the data series
+
A two element array consisting of the original coordinates of the point that is being adjusted
+
The index of the data series that contains the point being adjusted
+
+
+
+ [No canvas support]
+
+
+<script>
+ window.onload = function (e)
+ {
+ var line = new RGraph.Line('myc', [45,74,84,85,45,35,65,68,87,97,45,34,12], [15,14,12,16,18,19,14,12,74,84,95,65,35]);
+ line.Set('chart.labels', ['Kev','Matt','Rich','Dave','Iggy','Polly','Fiona','Fred','Pete','Lou','Fred','Bob']);
+ line.Set('chart.ylabels.inside', true);
+ line.Set('chart.linewidth', 2);
+ line.Set('chart.hmargin', 10);
+ line.Set('chart.shadow', true);
+ line.Set('chart.adjustable', true);
+ line.Set('chart.title', 'An adjustable line chart');
+ line.Set('chart.outofbounds', true);
+ line.Draw();
+
+ RGraph.AddCustomEventListener(line, 'onadjustend', function (obj) {p(RGraph.Registry.Get('chart.adjusting.line.myc'));});
+ }
+</script>
+
+ The Radar chart can be adjusted by dragging the points on the chart. When the onadjustend event fires, you will find
+ the following information in the RGraph registry - RGraph.Registry.Get('chart.adjusting.radar.myc') - where myc
+ is the ID of your canvas:
+
+
+
+
The numerical, zero indexed number that corresponds to the dataset
+
The numerical, zero indexed point that relates to the original data array
+
This is a boolean and used to indicate which (horizontal) half of the chart the point is in. true - the right half, false - the left half
+
This is a boolean and used to indicate which (vertical) half of the chart the point is in. true - the bottom half, false - the top half
RGraph: HTML5 Javascript charts library - Adjusting your charts interactively - Rose chart
+
+
+
+ [No canvas support]
+
+
+
+ The Rose chart can be adjusted by clicking and dragging the segments to the desired size. When the onadjustend event fires
+ you can get the following segment information from RGraph.Registry.Get('chart.adjusting.rose.myrose') (where myrose
+ is the canvas ID):
+
+
+
X coordinate
+
Y coordinate
+
The radius of the segment
+
Start angle (in DEGREES)
+
End angle (in DEGREES)
+
Numerical index of the segment, starting at the north axis and going clockwise.
+
+
+
+
+
+
+
+
+<script>
+ window.onload = function (e)
+ {
+ var rose = new RGraph.Rose('cvs',[4,3,5,6,2,1,4]);
+ rose.Set('chart.colors.alpha', 0.5);
+ rose.Set('chart.adjustable', true);
+ rose.Set('chart.labels', ['Olga','Kev','Bob','Charlie','Pete','John','Fred']);
+ rose.Draw();
+
+ RGraph.AddCustomEventListener(rose, 'onadjustend', function (obj) {p(RGraph.Registry.Get('chart.adjusting.rose.cvs'));});
+ }
+</script>
+
+ Nothing pertinent is kept in the registry. If you wish to get the new value of the thermometer you can check obj.value.
+ If you want the value before the adjustment, you can check the value with the onadjustbegin event (instead of the
+ onadjustend event).
+
+
+
+
+
+
+
+
+
+<script>
+ window.onload = function (e)
+ {
+ var thermometer = new RGraph.Thermometer('myc', 0, 100, 78);
+
+ var grad = thermometer.context.createLinearGradient(0,50,0,350);
+ grad.addColorStop(0, 'orange');
+ grad.addColorStop(1, 'white');
+
+ thermometer.Set('chart.colors', [grad]);
+ thermometer.Set('chart.title.side', 'An adjustable thermometer');
+ thermometer.Set('chart.adjustable', true);
+ thermometer.Draw();
+
+ RGraph.AddCustomEventListener(thermometer, 'onadjustbegin', function (obj) {document.getElementById("output").value += 'Value before adjustment: ' + obj.value + '\n';});
+ RGraph.AddCustomEventListener(thermometer, 'onadjust', function (obj) {document.getElementById("output").value += 'Value during adjustment: ' + obj.value + '\n';});
+ RGraph.AddCustomEventListener(thermometer, 'onadjustend', function (obj) {document.getElementById("output").value += 'Value after adjustment: ' + obj.value + '\n';});
+ }
+</script>
+
+
+
\ No newline at end of file
diff --git a/schall/static/RGraph/docs/adjusting_vprogress.html b/schall/static/RGraph/docs/adjusting_vprogress.html
new file mode 100644
index 0000000..9a3f44e
--- /dev/null
+++ b/schall/static/RGraph/docs/adjusting_vprogress.html
@@ -0,0 +1,145 @@
+
+
+
+
+
+ RGraph: HTML5 Javascript charts library - Adjusting your charts interactively - VProgress bar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
RGraph: HTML5 Javascript charts library - Adjusting your charts interactively - VProgress bar
+
+
+
+ [No canvas support]
+
+
+ Nothing pertinent is kept in the registry. If you wish to get the new value of the progress you can check
+ obj.value. If you want the value before the adjustment, you can check the value
+ with the onadjustbegin event (instead of the onadjustend event).
+
+
+
\ No newline at end of file
diff --git a/schall/static/RGraph/docs/animation-effects.html b/schall/static/RGraph/docs/animation-effects.html
new file mode 100644
index 0000000..0a9342b
--- /dev/null
+++ b/schall/static/RGraph/docs/animation-effects.html
@@ -0,0 +1,19 @@
+
+
RGraph: HTML5 Javascript charts library - An example of an animated & interactive Pie chart
+
+
+
+
+
+
+ [No canvas support]
+
+
+
+
+
+
+
+
+ This example shows animated segment separation. This used to be something that had to be done seperately, however now it's
+ built into the Pie chart as a tooltip effect. You can utilise the effect by using the chart.highlight.style setting
+ like this:
+
+
+
+
+
+
+<script>
+ window.onload = function ()
+ {
+ var pie = new RGraph.Pie('cvs', [24,43,51,16,26,23,35]);
+ pie.Set('chart.strokestyle', 'rgba(0,0,0,0)');
+ pie.Set('chart.labels', ['Richard','John','Kev','Lou','Pete','Fred','Bob']);
+ pie.Set('chart.tooltips', ['Richard','John','Kev','Lou','Pete','Fred','Bob']);
+ pie.Set('chart.highlight.style', 'explode');
+ pie.Set('chart.labels.sticks', true);
+ pie.Set('chart.radius', 100);
+ pie.Draw();
+ }
+</script>
+
+ This example does not work offline - you must use a website. Annotations are removed every five minutes.
+
+
+
+
+
+ [No canvas support]
+
+
+ Combining a little AJAX and some very simple server side scripting, you can easily make an annotation system that can persist
+ across different browsers and computers. You an either use Load/Save buttons to trigger the loading and saving, or like the
+ example to the right you can make use of the custom RGraph onannotateend event to make it happen automatically.
+
+
+
+ This simple example uses a small PHP server side script that loads and saves the annotation data to a file on the server,
+ and that looks like this:
+
+
+
+
+
+<?php
+ $file = '/tmp/annotation_data';
+
+ /**
+ * Save the annotations to a tmp file
+ */
+ if (isset($_POST) && isset($_POST['data'])) {
+ file_put_contents($file, $_POST['data']);
+ exit;
+ }
+
+
+ /**
+ * Load the annotations
+ */
+ if (!empty($_GET['getannotations']) && $_GET['getannotations'] == 1) {
+ $contents = file_get_contents($file);
+ print($contents);
+ exit;
+ }
+?>
+
+
+
+ By making the Javascript Save/Load functions repeat themselves every few seconds, you could easily make a presentation/demo system
+ that can be used when paticipants are in differing locations - in a similar fashion to Google Docs - or when you want one persons
+ annotations to be viewable by multiple PCs. On this page though, the Save function is triggered by the custom RGraph event
+ onannotateend.
+
RGraph: HTML5 Javascript charts library - Annotating your charts
+
+
+
+
+ [No canvas support]
+
+
+
+ The annotations feature brings presentation style functionality to RGraph charts. You can use this feature
+ for highlighting your charts 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 chart 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 chart above.
+
+
+
+
How can I clear the annotations?
+
+ You can simply clear the chart and redraw it:
+
+
RGraph.Clear(myGraph.canvas); // Clear the chart
+myGraph.Draw(); // Redraw it
+
+
+ In the chart above, there is a context menu that allows you to both clear the chart 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().
+
+
+
+
Making your annotations persist across browsers/computers
+
+ With a little bit of custom Javascript and some server side scripting you can make your annotations persist across
+ different browsers/computers. You can find an example of this here.
+
+
+
\ No newline at end of file
diff --git a/schall/static/RGraph/docs/api.html b/schall/static/RGraph/docs/api.html
new file mode 100644
index 0000000..b7010fd
--- /dev/null
+++ b/schall/static/RGraph/docs/api.html
@@ -0,0 +1,817 @@
+
+
+
+
+
+ RGraph: HTML5 Javascript charts 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 chart type there are a few files required - the common libraries and the chart specific library. Eg:
+
+ RGraph.common.core.js is a function library that contains a large set of functions that support the chart 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 chart libraries (RGraph.*.js) contains that particular charts 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 chart types.
+
+
+
+
Canvas and context references
+
+
+ Each chart 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 chart 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 chart coordinates
+
+
+ For most chart 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.
+
+
+
+ Note:
+ The Line chart also has an object variable myObj.coords2, where the coordinates are indexed differently -
+ by line index.
+
+
+
+
Working with chart data
+
+
+ Another variable you may need is the data variable. For most chart types, this is where the data is stored. It is usually
+ untouched, so it is as you supplied to the chart 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 chart types use the data variable. For some the name is different so that it makes a little more sense. The
+ chart 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 charts 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 charts 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 chart 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 chart 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 charts 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 chart 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 or look at the source.
+
+
+
+
+
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 charts
+
+ If you want to add arbitrary text to your chart(s) you can use the API function RGraph.Text().
+
+
+
+<script>
+ // Draw a basic chart
+ 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 chart 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.Effects.ReplaceCanvasWithDIV(canvas)
+ This function is used by some animation functions to stop the page layout changing when the canvas is removed from
+ the document. It removes the canvas from the document, replaces it with a DIV and then adds the canvas as a child node
+ of the DIV. The canvas is placed in the center of the DIV.
+ File: RGraph.common.effects.js
+
+
+
+
+ (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. As of 23rd January 2011 you can now specify transparent as the color and the canvas will be reset back to transparency instead of to white. This may become the default at a later date. 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 chart). 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(canvas) 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 chart 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 chart object. 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 chart 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 chart 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
+
+
+
+ (null) RGraph.Reset(canvas)
+ This function resets the canvas. At first this function may appear similar to the RGraph.Clear() function, however this
+ function will reset any translate() that has been performed, and so can stop them accumulating.
+ File: RGraph.common.core.js
+
+
+
+
+
Custom RGraph event related functions
+
+
+
(null) RGraph.FireCustomEvent(object, event) This fires a custom event. The object is your chart object, and the name is a string specifying the name of the event. File: RGraph.common.core.js
+
(number) RGraph.AddCustomEventListener(object, event, callback) This attaches a function to the specified event. The object argument is your chart object, the event argument should be the name of the event, eg ontooltip, and the function argument is your function which handles the event. The return value is an ID which can be used with the RGraph.RemoveCustomEventListener() function. File: RGraph.common.core.js
+
(null) RGraph.RemoveCustomEventListener(object, id) This removes the custom event listener that corresponds to the given ID. The arguments are the chart object and the ID of the event handler to remove (as returned by RGraph.AddCustomEventListener()). File: RGraph.common.core.js
+
(null) RGraph.RemoveAllCustomEventListeners([id]) To easily remove all custom event listeners you can use this function. It also can optionally take one argument - a canvas ID - to limit the clearing to. File: RGraph.common.core.js
+
+
+
+
Other
+
+
+ These are functions which are less generic, and used to build the charts. 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 chart 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 chart object. File: RGraph.common.core.js
+
(null) RGraph.DrawInGraphLabels(object) This draws the in-graph labels. The argument is the chart object. File: RGraph.common.core.js
+
(null) RGraph.DrawCrosshairs(object) This function draws the crosshairs. The argument is the chart 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 chart.
+ 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 chart object which it uses to get the properties it uses:
+
+
+
+
+
chart.gutter
+
chart.variant
+
chart.text.size
+
chart.text.font
+
chart.title
+
chart.title.xaxis
+
chart.title.xaxis.pos
+
chart.title.yaxis
+
chart.title.yaxis.pos
+
chart.background.barcolor1
+
chart.background.grid
+
chart.background.grid.width
+
+
+
+
+
chart.background.grid.autofit
+
chart.background.grid.autofit.numhlines
+
chart.background.grid.autofit.numvlines
+
chart.background.grid.autofit.align
+
chart.background.grid.hlines
+
chart.background.grid.vlines
+
chart.background.grid.hsize
+
chart.background.grid.vsize
+
chart.background.grid.color
+
chart.background.grid.border
+
chart.background.barcolor2
+
+
+
+
+
+
+
+
+
+
+ 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 chart 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>
+
+
+
+
+
+ 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.
+
+
+ [No canvas support]
+
+
+
+
+ Asynchronous processing can speed up the display of your charts, 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 chart 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 charts.
+
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 charts 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 charts then asynchronous creation instead may give you more
+ apparent speed ups. Alternatively, careful placement of the <canvas> tag and the code that creates the chart may suffice
+ instead.
+
+
Since the MSIE/ExCanvas combo requires you to use the window.onload event, asynchronous chart creation in this case will probably not be any help.
+
+ Since a dev release of version 4, Google Chrome has had an issue when asynchronous 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/schall/static/RGraph/docs/bar.html b/schall/static/RGraph/docs/bar.html
new file mode 100644
index 0000000..72e2590
--- /dev/null
+++ b/schall/static/RGraph/docs/bar.html
@@ -0,0 +1,791 @@
+
+
+
+
+
+ RGraph: HTML5 Javascript charts library - bar charts 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: true
+
+
+ chart.background.grid.autofit.numhlines
+ When using autofit this allows you to specify how many horizontal grid lines you want.
+ Default: 5
+
+
+ chart.background.grid.autofit.numvlines
+ When using autofit this allows you to specify how many vertical grid lines you want.
+ Default: 20
+
+
+ chart.background.grid.autofit.align
+ If you want to have your grid lines line up with the labels (both X and Y axes), you can set this to true and RGraph will
+ attempt to make the grid lines line up. If you have a chart.hmargin set then the alignment will be thrown out.
+ Default: false
+
+
+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
+
+
+ chart.background.image
+ If you want to specify a background image to use on your chart, specify it with this property.
+ Default: null
+
+
+
Axes properties
+
+
+ chart.noaxes
+ Whether the axes are drawn
+ Default: false (the axes ARE drawn)
+
+
+ chart.noxaxis
+ Whether the X axis is drawn
+ Default: false (the X axis IS drawn)
+
+
+ chart.noyaxis
+ Whether the Y axis is drawn
+ Default: false (the Y axis IS drawn)
+
+
+ chart.noendxtick
+ When you're combining the Bar and Line charts, you may want to use this property to stop the end X tick from
+ being drawn.
+ Default: false (the end tick IS drawn)
+
+
+
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']
+
+
+ chart.colors.sequential
+ If true, for regular bar charts, (not stacked or grouped), the colors that you specify will be used in a sequential
+ fashion.
+ Default: false
+
+
+ chart.colors.reverse
+ If true, for stacked bar charts only, the colors that you specify will be used in a reverse order to what they are
+ normally.
+ Default: false
+
+
+
Margins
+
+
+ chart.hmargin
+ The horizontal margin (in pixels) of the chart. The horizontal margin is on the inside of the axes.
+ Default: 5
+
+
+ chart.gutter.left
+ The left gutter of the chart, (the gutter is where the labels and title are)).
+ Default: 25
+
+
+ chart.gutter.right
+ The right gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.top
+ The top gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.bottom
+ The bottom gutter of the chart, (the gutter is where the labels and title are).
+ 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 chart). 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 chart. 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.above.angle
+ You can use this to angle the text shown above the bars. It can be anything from -90 to 90 (degrees).
+ Default: null
+
+
+chart.labels.ingraph
+ An array of labels for the chart which are drawn "inside" the chart. 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.ylabels.specific
+ You can use this option to give your own Y labels (eg ['Low', 'Medium', 'High'].
+ Default: null
+
+
+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 chart, if any.
+Default: null
+
+
+chart.title.font
+The font that the title is rendered in. If not specified the chart.text.font setting is used (usually Verdana)
+Default: null
+
+
+chart.title.size
+The size of the title. If not specified the size is usually 2pt bigger than the chart.text.size setting.
+Default: null
+
+
+chart.title.bold
+Whather the title is bold or not.
+Default: true
+
+
+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.xaxis.size
+ This allows you to specify a size for the X axis title.
+ Default: null
+
+
+ chart.title.xaxis.font
+ This allows to specify a font for the X axis title.
+ Default: null
+
+
+ chart.title.xaxis.bold
+ This controls whether the X axis title is bold or not.
+ Default: true
+
+
+ chart.title.yaxis
+ This allows to specify a title for the Y axis.
+ Default: none
+
+
+ chart.title.yaxis.size
+ This allows you to specify a size for the Y axis title.
+ Default: null
+
+
+ chart.title.yaxis.font
+ This allows to specify a font for the Y axis title.
+ Default: null
+
+
+ chart.title.yaxis.bold
+ This controls whether the Y axis title is bold or not.
+ Default: true
+
+
+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.formatter
+ To allow thoroughly custom formats of numbers in the scale, you can use this option to
+ specify a function that is used by RGraph to format numbers. This function should
+ handle ALL of the formatting. Eg:
+
+function myFormatter(obj, num)
+{
+ return num + 'F'; // An example of formatting
+}
+myGraph.Set('chart.scale.formatter', myFormatter);
+
+ Default: null
+
+
+ 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.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)
+
+
+ chart.ymin
+ The optional minimum Y scale value. If not specified then it will be 0. Default: 0
+
+
+
+
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.halign
+ Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
+ aligned left or right.
+ Default: right
+
+
+ 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
+
+ chart.key.linewidth
+ The line width of the surrounding border on the key.
+ Default: 1
+
+
+
+
+
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 chart 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
+ When combining chartss you will need to set this option to fase.
+ 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.crosshairs.hlines
+ This determines whether the horizontal crosshair is shown.
+ Default: true
+
+
+ chart.crosshairs.vlines
+ This determines whether the vertical crosshair is shown.
+ Default: true
+
+
+
+
+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 chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).
+ Default: false
+
+
+ chart.resize.handle.background
+ With this you can specify the background color for the resize handle. If you're adjusting the position of the
+ handle then you may need this to make the handle stand out more.
+ Default: null
+
+
+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 chart 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.highlight.stroke
+ If you use tooltips, this controls the colour of the highlight stroke.
+ Default: black
+
+
+ chart.highlight.fill
+ If you use tooltips, this controls the colour of the highlight fill.
+ Default: rgba(255,255,255,0.5)
+
+
+chart.line
+ Formerly a boolean, this now stipulates a line chart 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, center or top.
+ 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 chart 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>
+
+
+
+
+
\ No newline at end of file
diff --git a/schall/static/RGraph/docs/basic_combined.html b/schall/static/RGraph/docs/basic_combined.html
new file mode 100644
index 0000000..7185d6e
--- /dev/null
+++ b/schall/static/RGraph/docs/basic_combined.html
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+ RGraph: HTML5 Javascript charts library - A basic example of a combined Bar/Line chart
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
RGraph: HTML5 Javascript charts library - A basic example of a combined Bar/Line chart
+
+
+ [No canvas support]
+
+
+
+
+
+ This is an example of a Bar chart combined with a Line chart. The source code is documented to make it easier
+ for you to copy and paste it if you wish.
+
+
+
+
\ No newline at end of file
diff --git a/schall/static/RGraph/docs/basic_tooltips.html b/schall/static/RGraph/docs/basic_tooltips.html
new file mode 100644
index 0000000..c3d591c
--- /dev/null
+++ b/schall/static/RGraph/docs/basic_tooltips.html
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+ RGraph: HTML5 Javascript charts library - A basic example of Pie charts in tooltips
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
RGraph: HTML5 Javascript charts library - A basic example of Pie charts in tooltips
+
+ [No canvas support]
+
+
+
+
+ This is a basic example that shows charts (Pie charts) in tooltips. The canvas element is part of the tooltip
+ HTML code (specified like regular tooltips), and then it uses the ontooltip event to run some code whhich
+ then creates the Pie chart in the tooltip.
+
+
+
+
+
+ chart.gutter.left
+ The left gutter of the chart, (the gutter is where the labels and title are)).
+ Default: 25
+
+
+ chart.gutter.right
+ The right gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.top
+ The top gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.bottom
+ The bottom gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.center
+ The center area of the chart that the labels sit in. If your labels are large then you may need to increase this.
+ Default: 60
+
+
+ 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.font
+The font that the title is rendered in. If not specified the chart.text.font setting is used (usually Verdana)
+Default: null
+
+
+chart.title.size
+The size of the title. If not specified the size is usually 2pt bigger than the chart.text.size setting.
+Default: null
+
+
+chart.title.bold
+Whather the title is bold or not.
+Default: true
+
+
+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.formatter
+ To allow thoroughly custom formats of numbers in the scale, you can use this option to
+ specify a function that is used by RGraph to format numbers. This function should
+ handle ALL of the formatting. Eg:
+
+function myFormatter(obj, num)
+{
+ return num + 'F'; // An example of formatting
+}
+myGraph.Set('chart.scale.formatter', myFormatter);
+
+ 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 charts 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 chart 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 chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).
+ Default: false
+
+
+ chart.resize.handle.background
+ With this you can specify the background color for the resize handle. If you're adjusting the position of the
+ handle then you may need this to make the handle stand out more.
+ Default: null
+
+
+
+
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 chart 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.highlight.stroke
+ If you use tooltips, this controls the colour of the highlight stroke.
+ Default: black
+
+
+ chart.highlight.fill
+ If you use tooltips, this controls the colour of the highlight fill.
+ Default: rgba(255,255,255,0.5)
+ If you're a web developer or designer wanting to buy licenses for multiple clients, then buying them in bulk can be done by using the
+ "Buy now..." buttons below. The discounts are as follows:
+
RGraph: HTML5 Javascript charts 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/schall/static/RGraph/docs/combine.html b/schall/static/RGraph/docs/combine.html
new file mode 100644
index 0000000..e3193d9
--- /dev/null
+++ b/schall/static/RGraph/docs/combine.html
@@ -0,0 +1,463 @@
+
+
+
+
+
+ RGraph: HTML5 Javascript charts library - combining bar and line charts
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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 chart
+ 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 and Bar chart by setting chart.tooltips.highlight to false, as shown.
+ The order in which you create the charts is also important, you must define the Bar chart first, and subsequently the Line
+ chart.
+
+
+
Update - 28th August 2011
+
+ You can now have tooltips on both the Line chart and the Bar chart, as is shown in the chart here. Keep in mind
+ that you will need to have highlighting turned off on both chart types - chart.tooltips.highlight.
+
+ 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
+
+
+ [No canvas support]
+
+
+
+ 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 charts 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 charts, 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 chart, 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 chart 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 chart below by holding your CTRL key whilst right clicking.
+
+
+
+
+
+
+
+
+ [No canvas support]
+
+
How do I get the underlying shape that was clicked on?
+
+
+ In some circumstances you may want to know which bar/point/segment was right-clicked on when showing the context menu (if any).
+ In these cases you will find the pertinent information (the same as what you get from the various .get*() methods) on the
+ context menu object - which is held in the registry: RGraph.Registry.Get('chart.contextmenu').__shape__. The example bar chart
+ shows it in action.
+
+ 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
+ chart is shown on the canvas, like the example above.
+
+
+
+
+
Context menus, Macs, Safari, Opera and MSIE 9
+
+ 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.
+
+
+
+
+
Related events
+
+ There are two context menu related events which you can utilise:
+
+
+
+
onbeforecontextmenu
+
oncontextmenu
+
+
+
+ As their names suggest, one fires before the contextmenu is shown, and one after. Important: Because of the
+ fading effect, it may seem that both events fire before the contextmenu is shown, however this is just due to the nature
+ of Javascript timers and the fact that alert()s will block them (pause them in effect).
+
+
+
+
+
+
\ No newline at end of file
diff --git a/schall/static/RGraph/docs/css.html b/schall/static/RGraph/docs/css.html
new file mode 100644
index 0000000..687dd5b
--- /dev/null
+++ b/schall/static/RGraph/docs/css.html
@@ -0,0 +1,270 @@
+
+
+
+
+
+ RGraph: HTML5 Javascript charts 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 Javascript charts 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.
+
+
+ [No canvas support]
+
+
+ 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 Javascript charts library - Updating your charts dynamically
+
+
+
+ [No canvas support]
+
+
+
+ The example on the right shows a line chart that automatically updates itself every 15 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.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 chart
+ 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,25);
+ }
+
+ drawGraph();
+</script>
+
+ The animation and visual effects code is new to RGraph as of August 2011. It greatly simplifies the process of animating your
+ graphs or using visual effects.
+
+
+
+
+
Example use
+
+ To use the effects you simply change your call to the .Draw() method to the appropriate effect function, like this:
+
+ CSS animation (which jQuery does) can be smoother than canvas animation (ie changing the CSS properties vs redrawing the
+ canvas). This is because CSS animation (ie changing the CSS properties) does not have the side
+ effect of clearing the canvas, and so does not incur a redraw.
+
+
+
+ An alternative to the widely known and understood setTimeout() function is the newer requestAnimationFrame().
+ This is a function which has been optimised for animation compared to the standard setTimeout() function. Some of
+ the animation functions use this over the setTimeout() function and going forward newer animation functions will
+ use it. RGraph has a fallback though so that if the function isn't available the older setTimeout() will be used.
+
+
+
+
+
Combining effects
+
+ Some of the animation effects (ie those that work on separate aspects of the chart) can be combined. As an example the
+ Fade in/out can be combined with most other animation effects, allowing you to add a fade effect to the other animation
+ types. An example of this is below - this chart uses the Grow, Fade and Reveal effects.
+
+ The .Animate() function function is similar to the jQuery .Animate() function. You can pass it a map of RGraph
+ properties and their TARGET values and the .Animate() function will move the properties towards those values.
+ In this way you can animate a variety of RGraph properties. The .Animate() function takes two or three arguments:
+
+
+
+
The graph object
+
A map of the target chart properties
+
(Optional) A function object which is called when the animation is complete (it is passed the chart object)
+
+
+
An example of it use is below. It should be used instead of calling the .Draw() method:
+ These are the effects available. You can achieve more effects by using the .Animate() function,
+ which allows you to animate any numeric RGraph property.
+
+
+
+
+
+
+
+
+
Fade in
+
+ [No canvas support]
+
+
+
+
+ A simple fade in effect where the canvas is initially drawn with an opacity of zero, increasing to one.
+
+
RGraph.Effects.Fade.In(obj);
+
+
+
+
+
+
+
+
+
+
+
Fade out
+
+ [No canvas support]
+
+
+
+
+ A simple fade out effect to accompany the fade in, where the canvas initially has an opacity of one, decreasing
+ to zero.
+
+
RGraph.Effects.Fade.Out(obj);
+
+
+
+
+
+
+
+
+
+
+
Expand
+
+ [No canvas support]
+
+
+
+
+
+ This effect starts initially with the canvases CSS width and height set to 0 and over a period of half a second
+ increases them to 100%.
+
+
RGraph.Effects.jQuery.Expand(obj);
+
+
+
+
+
+
+
+
+
+
+
Snap
+
+ [No canvas support]
+
+
+
+
+ This effect is similar to the tooltip effect "snap" in that it "snaps" to the correct position,
+ moving in from the top left.
+
+
RGraph.Effects.jQuery.Snap(obj);
+
+
+
+
+
+
+
+
+
+
+
Reveal
+
+ [No canvas support]
+
+
+
+
+ This effect starts with the the canvas covered and is slowly revealed from the center outwards. The canvas
+ is at all times the same size (ie it's not resizd as with the Expand effect).
+
+
RGraph.Effects.jQuery.Reveal(obj);
+
+
+
+
+
+
+
+
+
+
+
Horizontal Blinds (open)
+
+ [No canvas support]
+
+
+
+
+ This effect gradually reveals the canvas by "opening some horizontal blinds", which are positioned
+ over the canvas.
+
+
RGraph.Effects.jQuery.Blinds.Open(obj);
+
+
+
+
+
+
+
+
+
+
+
Horizontal Blinds (close)
+
+ [No canvas support]
+
+
+
+
+ This effect gradually conceals the canvas by "closing some horizontal blinds", which are positioned
+ over the canvas.
+
+
RGraph.Effects.jQuery.HBlinds.Close(obj);
+
+
+
+
+
+
+
+
+
+
+
Vertical Blinds (open)
+
+ [No canvas support]
+
+
+
+
+ This effect gradually reveals the canvas by "opening some vertical blinds", which are positioned
+ over the canvas.
+
+
RGraph.Effects.jQuery.VBlinds.Open(obj);
+
+
+
+
+
+
+
+
+
+
+
Vertical Blinds (Close)
+
+ [No canvas support]
+
+
+
+
+ This effect gradually conceals the canvas by "closing some vertical blinds", which are positioned
+ over the canvas.
+
+
RGraph.Effects.jQuery.VBlinds.Close(obj);
+
+
+
+
+
+
+
+
+
+
+
Pie chart Grow
+
+ [No canvas support]
+
+
+
+
+ This effect gradually increases the radius of the Pie chart, expanding out from the centre.
+
+
RGraph.Effects.Pie.Grow(obj);
+
+
+
+
+
+
+
+
+
+
+
Pie chart Implode
+
+ [No canvas support]
+
+
+
+
+ This effect gradually decreases the explosion of the chart - gradually bringing it together. Combined with
+ the RoundRobin effect (documented below) produces a nice combination, as seen on the frony page of this website.
+
+
+
+ [No canvas support]
+
+
+
+
+ This effect gradually increase both the circular size of the Pie chart and also the radius. Combining this effect
+ with the implode effect produces a nice effect.
+
+
+
+ [No canvas support]
+
+
+
+
+ This effect gradually increases the size of the bars on the bar chart until they are at full size.
+
+
RGraph.Effects.Bar.Grow(obj);
+
+
+
+
+
+
+
+
+
+
+
Fuel chart Grow
+
+ [No canvas support]
+
+
+
+
+ This effect gradually increases the indicated value until it reaches the correct value.
+
+
RGraph.Effects.Fuel.Grow(obj);
+
+
+
+
+
+
+
+
+
+
+
Slide out
+
+ [No canvas support]
+
+
+
+
+ This effect slides the whole canvas out. One potential use would be to slide the canvas out and then
+ slide another canvas with a different chart in. You can specify that the canvas slides out to by using the second
+ argument as shown below.
+
+
+
+ [No canvas support]
+
+
+
+
+ This effect slides the whole canvas in. As mentioned above you could this effect with the Slinde Out effect to
+ create a slideshow.
+
+
+
+ [No canvas support]
+
+
+
+
+ This effect "unfolds" the line from the origin, gradually increasing the X (and/or Y) values. There's also an example
+ of a combined Bar/Line chart with the Bar chart Grow, the Fade and the Line chart Unfold effects on the
+ combined charts page.
+
+
RGraph.Effects.Line.Unfold(obj);
+
+
+
+
+
+
+
+
+
+
+
UnfoldFromCenter
+
+ [No canvas support]
+
+
+
+
+ This effect "unfolds" the line from the center, gradually increasing or decreasing the Y values as appropriate.
+
+
RGraph.Effects.Line.UnfoldFromCenter(obj);
+
+
+
+
+
+
+
+
+
+
+
FoldTocenter
+
+ [No canvas support]
+
+
+
+
+ This effect "folds" the line to the center, gradually increasing or decreasing the Y values as appropriate. In
+ effect the opposite of the "unfold" effect.
+
+
RGraph.Effects.Line.FoldToCenter(obj);
+
+
+
+
+
+
+
+
+
+
+
Line chart Trace
+
+ [No canvas support]
+
+
+
+
+ This effect gradually traces the line across the chart - slowly revealing it in full. Not all Line chart options
+ (eg filled charts) work with this effect.
+
+
RGraph.Effects.Line.jQuery.Trace(myLine14);
+
+
+
+
+
+
+
+
+
+
+
+
+
Rose chart Grow
+
+ [No canvas support]
+
+
+
+
+ This effect gradually increases the radius and the radius of each segment. It is not available with
+ non-equi-angular Rose charts.
+
+
RGraph.Effects.Rose.Grow(obj);
+
+
+
+
+
+
+
+
+
+
+
+
Odometer Grow
+
+ [No canvas support]
+
+
+
+
+ This effect gradually increase the value of the Odometer until it reaches the desired value. The second
+ argument is not used, but the third can be a Javascript function and will be called when the animation
+ is finished.
+
+
RGraph.Effects.Odo.Grow(obj, null, myFunc);
+
+
+
+
+
+
+
+
+
+
+
+
Meter Grow
+
+ [No canvas support]
+
+
+
+
+ This effect gradually increases the value of the Meter until it reaches the desired value. You can optionally specify an object map
+ as the second argument of which the only option is frames - allowing to specify the number of frames in the animation.
+ More frames = longer animation. The animation is set to use a frame rate of roughly 60 frames a second.
+
+
RGraph.Effects.Meter.Grow(obj, {'frames': 90});
+
+
+
+
+
+
+
+
+
+
+
+
HBar Grow
+
+ [No canvas support]
+
+
+
+
+ This effect gradually increase the values of the HBar until it reaches the desired value.
+
+
RGraph.Effects.HBar.Grow(obj);
+
+
+
+
+
+
+
+
+
+
+
+
Gauge Grow
+
+ [No canvas support]
+
+
+
+
+ This effect gradually increases the indicated value until it is correct. It's also shown on the
+ Gauge chart example page. By constantly updating the Gauge (with some AJAX
+ for example) you could make a control panel of sorts.
+
+
RGraph.Effects.Gauge.Grow(obj);
+
+
+
+
+
+
+
+
+
+
+
+
Radar Grow
+
+ [No canvas support]
+
+
+
+
+ This effect gradually increases the magnitude of the Radar chart, growing outwards from the center. Multiple
+ data sets are supported.
+
+
RGraph.Effects.Radar.Grow(obj);
+
+
+
+
+
+
+
+
+
+
+
+
Waterfall Grow
+
+ [No canvas support]
+
+
+
+
+ This effect gradually Grows the waterfall chart in both X and Y respects.
+
+
RGraph.Effects.Waterfall.Grow(obj);
+
+
+
+
+
+
+
+
+
+
Things to note
+
+
+ With Fade in/out effects remember that just because you can't see the canvas (ie the opacity is 0) doesn't mean
+ that you can't interact with it, so tooltip hotspots will still be active. If you want to get rid of the canvas
+ entirely you need to remove it from the DOM. You can do this with the standard.removeNode function:
+
obj.canvas.parentNode.removeChild(obj.canvas);
+
+ This will leave a hole in the page though and will cause the page layout to change. If this is an issue you may
+ want to use the RGraph API function RGraph.Effects.ReplaceCanvasWithDIV(canvas). As the name
+ suggests, this function replaces the canvas with a DIV which has the same dimensions meaning your page structure
+ won't change.
+
+
+
+ It should be noted that in order to prevent the canvas being constantly drawn on, it is cleared at the
+ start of the animation.
+
+
+
+ In the jQuery animations here, the Google hosted jQuery is used:
+
+
+ Because canvas based animations may need to redraw the entire chart,
+ they can be slower than CSS based animations and depend on a variety of things - eg the speed of the users PC
+ and the work necessary to redraw the canvas.
+
+ 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 chart 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 chart 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 chart 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
+
+
+
+ [No canvas support]
+ ontooltip
+ This event fires immediately after a tooltip has been created. This event allows you to easily show charts 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).
+
+
+
+
+
+
+ [No canvas support]
+ onbeforecontextmenu
+ The onbeforecontextmenu event fires before the context menu is shown.
+
+
+
+
+
+
+ [No canvas support]
+ 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')
+
+
+
+ Important: Like the ontooltip event, using alert() can
+ pause the fade in timers, so you might consider using the Firebug/Webkit console.log functions instead.
+
+
+
+
+
+
+
+ [No canvas support]
+
+
+
+ onbeforedraw
+ Much like the ondraw event, however this fires at the start of the .Draw() method, in effect "before" the method. Keep in mind
+ that since other charts may trigger the .Draw() method, this event can also be triggered by other charts.
+
+
+
+
+
+
+
+ [No canvas support]
+
+
+ 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 chart 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 chart,
+ but (if you're using tooltips for example), can also be fired by other charts on the page.
+
+
+
+
+
+
+ [No canvas support]
+ 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.
+
+
+
+
+
+
+ [No canvas support]
+ 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!');});
+
+
+
+
+
+
+ [No canvas support]
+ onresizebeforedraw
+ The onresizebeforedraw event was added when translating was necessary to reclaim wasted space, before the introduction
+ of independent gutters. This event is now no longer necessary to reposition the resize handle. It will still have an
+ effect though, so if you choose to upgrade then you should remove this from your configuration. The event isn't
+ planned to be removed, so if you wish to use it, you can.
+
+
+
+
+
+ Note:
+ The annotation events send notifications to the console because using alert() would cause them to lock the window.
+
+
+
+
+ [No canvas support]
+ onresizebegin
+ The onresizebegin event fires when a canvas is starting to be resized. It also fires when the canvas is reset to the original
+ size.
+
+ onresize
+ The onresize event fires when a canvas is resized. It also fires when the canvas is reset to the original size.
+
+ onresizeend
+ The onresizeend event fires when a canvas is ended resizing. It also fires when the canvas is reset to the original size.
+
+
+
+
+
+ Note:
+ The adjusting events send notifications to the console because using alert() would cause them to lock the window.
+
+
+
+
+ [No canvas support]
+ onadjustbegin
+ The onadjustbegin event fires once at the start of an adjusting process. It can be thought of as similar to
+ the onmousedown event as that's when it usually fires.
+
+
+
+
+
+
+ onadjust
+ The onadjust event fires whenever one of the supported chart 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.
+
+
+
+
+
+
+ onadjustend
+ The onadjustend event fires once at the end of an adjusting process. It can be thought of as similar to
+ the onmouseup event as that's when it usually fires.
+
+
+
+
+
+ Note:
+ The annotation events send notifications to the console because using alert() would cause them to lock the window.
+
+
+
+
+ [No canvas support]
+ onannotatebegin
+ The onannotatebegin 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 chart 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).
+
+
+
+
+ onannotatecolor
+ The onannotatecolor event fires when the annotation color has been changed using the RGraph palette.
+
+
+
+
+ onannotateclear
+ The onannotateclear event fires when the RGraph annotation data has been cleared using the RGraph.ClearAnnotations() API
+ function.
+
+
+
+
+ onclear
+ The onclear event fires when the function RGraph.Clear() is called. If you use the .Clear()function inside the onclear event
+ handler, it will create a loop. Instead, you could use this function:
+
+
+
+
+ [No canvas support]
+
+
+
+
+
+ oncrosshairs
+ The oncrosshairs event fires when the crosshairs are moved. This event is very similar to the onmousemove event, but you can
+ guarantee that this event fires after the crosshairs have been repainted.
+
+
+
+
+
+/**
+* This function clears the canvas
+*
+* @param object obj The chart object
+*/
+function myClear(obj)
+{
+ obj.context.beginPath();
+ obj.context.fillStyle = 'white';
+ obj.context.fillRect(-10,-10,obj.canvas.width + 20, obj.canvas.height + 20);
+ obj.context.fill();
+}
+
+
+
+
+
Removing events
+
+ In the case that you need to remove RGraph event listeners, there are a few ways that you can do it. The API function
+ RGraph.RemoveCustomEventListener(obj, id) can be used to remove a single event listener. This function
+ takes the chart object and the numerical ID (returned by RGraph.AddCustomEventListener()) as its arguments.
+
+
+
+ There's
+ also the RGraph.RemoveAllCustomEventListeners(), for easily removing all of the pertinent event listeners. This
+ function can either take no arguments at all, in which case ALL event listeners for ALL objects are removed. Or it can
+ also take an objects ID (the same id that you pass to the constructor), in which case the removal will be limited to
+ that object.
+
+
+
+
+ This page shows you how you can easily integrate the charts with other external Javascript libraries. This particular example
+ adds a context menu to the chart, 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 chart
+ */
+ 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 chart 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>
+
+<!-- This is the popup dialog-->
+ <div id="myDialog" class="modalDialog" style="display: none">
+ <b>Please login</b>
+ <p>
+ <table border="0">
+ <tr>
+ <td align="right" style="padding-top: 4px">Email</td>
+ <td><input type="text" size="20" name="email" style="width: 150px" /></td>
+ </tr>
+ <tr>
+ <td align="right" style="padding-top: 4px">Password</td>
+ <td><input type="password" size="20" name="password" style="width: 150px" /></td>
+ </tr>
+ <tr>
+ <td colspan="2" align="right">
+ <input type="reset" value="Cancel" onclick="ModalDialog.Close()">
+ <input type="submit"
+ name="submit"
+ value="Login »"
+ onclick="alert('This is just an example'); event.stopPropagation()">
+ </td>
+ </tr>
+ </table>
+ </p>
+ </div>
+<!-- End of dialog -->
+
+
+ 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.
+
+
+
+
Covering the scroll bars
+
+ Normally, a regular DIV lives inside the browser and cannot cover the scroll bars. There is however a way to achieve
+ this but it does mean that restructuring your website may be necessary, and it's done by using an IFRAME. The following
+ steps are involved:
+
+
+
+
The index page of your website creates an IFRAME and sets it to cover the entire window.
+
+
+ chart.colors
+ The color of the Fuel Gauge. Noe that despite there being only one color, this is still an array.
+ Default: ['red']
+
+
+
Margins
+
+
+ chart.gutter.left
+ The left gutter of the chart, (the gutter is where the labels and title are)).
+ Default: 5
+
+
+ chart.gutter.right
+ The right gutter of the chart, (the gutter is where the labels and title are).
+ Default: 5
+
+
+ chart.gutter.top
+ The top gutter of the chart, (the gutter is where the labels and title are).
+ Default: 5
+
+
+ chart.gutter.bottom
+ The bottom gutter of the chart, (the gutter is where the labels and title are).
+ Default: 5
+
+
+
Needle options
+
+
+ chart.needle.color
+ The color of the needle (not including the bulb at the bottom). Note that this is NOT an array - it's just a string.
+ Default: 'red'
+
+
+
Labels and text
+
+
+ chart.labels.empty
+ The label used as the empty text.
+ Default: E
+
+
+ chart.labels.full
+ The label used as the full text.
+ Default: F
+
+
+ chart.text.color
+ The color used for the text on the chart.
+ Default: F
+
+
+ chart.text.font
+ The font used for the text.
+ Default: Verdana
+
+
+
Interactive features
+
+
+ chart.contextmenu
+ The context menu. For more details see 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: black
+
+
+ chart.resizable
+ Defaulting to false, this determines whether your chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).
+ Default: false
+
+
+ chart.resize.handle.background
+ With this you can specify the background color for the resize handle. If you're adjusting the position of the
+ handle then you may need this to make the handle stand out more.
+ Default: null
+
+
+
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 chart 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.icon
+ This should be a data: URL that represents the image to use as the icon on the chart. The
+ example page has an example of a chart that uses this option to show a
+ water droplet instead of the fuel pump.
+ Default: [A fuel icon]
+ These are funnel charts. 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.left
+ The left gutter of the chart, (the gutter is where the labels and title are)).
+ Default: 25
+
+
+ chart.gutter.right
+ The right gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.top
+ The top gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.bottom
+ The bottom gutter of the chart, (the gutter is where the labels and title are).
+ 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 chart. 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 chart, if any. Default: null
+
+
+chart.title.font
+The font that the title is rendered in. If not specified the chart.text.font setting is used (usually Verdana)
+Default: null
+
+
+chart.title.size
+The size of the title. If not specified the size is usually 2pt bigger than the chart.text.size setting.
+Default: null
+
+
+chart.title.bold
+Whather the title is bold or not.
+Default: true
+
+
+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 chart 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 chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).
+ Default: false
+
+
+
+ chart.resize.handle.background
+ With this you can specify the background color for the resize handle. If you're adjusting the position of the
+ handle then you may need this to make the handle stand out more.
+ 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.halign
+ Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
+ aligned left or right.
+ Default: right
+
+
+ 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
+
+ chart.key.linewidth
+ The line width of the surrounding border on the key.
+ Default: 1
+
+
+
+
+
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 chart 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.highlight.stroke
+ If you use tooltips, this controls the colour of the highlight stroke.
+ Default: black
+
+
+ chart.highlight.fill
+ If you use tooltips, this controls the colour of the highlight fill.
+ Default: rgba(255,255,255,0.5)
+
+ 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.left
+ The left gutter of the chart, (the gutter is where the labels and title are)).
+ Default: 75
+
+
+ chart.gutter.right
+ The right gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.top
+ The top gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.bottom
+ The bottom gutter of the chart, (the gutter is where the labels and title are).
+ 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.font
+The font that the title is rendered in. If not specified the chart.text.font setting is used (usually Verdana)
+Default: null
+
+
+chart.title.size
+The size of the title. If not specified the size is usually 2pt bigger than the chart.text.size setting.
+Default: null
+
+
+chart.title.bold
+Whather the title is bold or not.
+Default: true
+
+
+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 chart 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 chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).
+ Default: false
+
+
+ chart.resize.handle.background
+ With this you can specify the background color for the resize handle. If you're adjusting the position of the
+ handle then you may need this to make the handle stand out more.
+ Default: null
+
+
+
+
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 chart 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.highlight.stroke
+ If you use tooltips, this controls the colour of the highlight stroke.
+ Default: black
+
+
+ chart.highlight.fill
+ If you use tooltips, this controls the colour of the highlight fill.
+ Default: rgba(255,255,255,0.5)
+
+
+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.
+
+
+
+ The optional sixth value is the foreground color of the bar. Defaulting to #0c0.
+
+
+
+ The optional seventh value is the border color, defaulting to black
+
+
+
+ And the optional eigth value is the numerical linewidth of the border. The default is 1.
+
+ 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.
+
+
+
+ chart.gutter.left
+ The left gutter of the chart.
+ Default: 5
+
+
+ chart.gutter.right
+ The right gutter of the chart.
+ Default: 5
+
+
+ chart.gutter.top
+ The top gutter of the chart.
+ Default: 5
+
+
+ chart.gutter.bottom
+ The bottom gutter of the chart.
+ Default: 5
+
+
+
+
Labels and text
+
+
+ chart.text.font
+ The font that is used for the text.
+ Default: Verdana
+
+
+ chart.text.color
+ The color of the text.
+ Default: #666
+
+
+ chart.text.size
+ The size of the text
+ Default: 10
+
+
+
Titles
+
+
+ chart.title
+ The title of the chart, if any.
+ Default: (An empty string)
+
+
+chart.title.font
+The font that the title is rendered in. If not specified the chart.text.font setting is used (usually Verdana)
+Default: Verdana
+
+
+chart.title.size
+The size of the title. If not specified the size is usually 2pt bigger than the chart.text.size setting.
+Default: 14
+
+
+chart.title.bold
+Whather the title is bold or not.
+Default: true
+
+
+ chart.title.color
+ The color that the title is rendered in.
+ Default: #333
+
+
+
Scale
+
+
+ chart.scale.decimals
+ The number of decimals used in the labels
+ Default: 0
+
+
+ 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: '' (An empty string)
+
+
+ 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: '' (An empty string)
+
+
+
Colors
+
+
+
+ chart.red.start
+ The point at which the red area starts.
+ Default: 90% of the max
+
+
+ chart.red.color
+ The red color.
+ Default: #DC3912
+ New in June 2011 is the much requested feature of seperate gutter sizing. As the chart to the right shows, this means
+ that you can now easily set the left/right/top/bottom gutters independently. This makes it easy to give
+ yourself the space that you need for labels, which will be most noticeable with the Bar chart, the Line chart
+ and similar chart types. There is another example on the HBar example page.
+
+
+
+ Because of the fundamental nature of this change (every chart type has been affected)
+ you should rigorously test your charts if you choose to upgrade.
+
+
+
+ The new properties are:
+
+
+
+
chart.gutter.left
+
chart.gutter.right
+
chart.gutter.top
+
chart.gutter.bottom
+
+
+
+ They all default to 25 pixels (with a few exceptions) and each can be set independently.
+
+
+
+ These new properties eliminate the need for certain others. So starting immediately the following properties are no longer
+ used:
+
+
+
+
chart.gutter
+
chart.width
+
chart.height
+
chart.tooltips.coords.adjust
+
chart.resize.handle.adjust
+
+
+
+ The chart.gutter property has been completely removed, so you will need to start using the new properties immediately.
+ The chart.width and chart.height properties are completely unused from this point and the last two
+ will be phased out starting immediately.
+
+ If you're upgrading from a previous version of RGraph then there are a few points you should bear in mind:
+
+
+
+
+ Remove any calls to .translate().
+ If you use the .translate() method to give yourself extra space, this should be converted to the new gutter properties.
+
+
+
+ If you use chart.tooltips.coords.adjust or chart.resize.handle.adjust then you should remove them. These
+ properties will cease to have any effect eventually, but not immediately.
+
+
+
+ If you use caching, then you may need to use a CTRL/SHIFT+Refresh on your page to bypass any cached copy of the RGraph
+ libraries.
+
+
+
+
\ No newline at end of file
diff --git a/schall/static/RGraph/docs/hbar.html b/schall/static/RGraph/docs/hbar.html
new file mode 100644
index 0000000..cc7904b
--- /dev/null
+++ b/schall/static/RGraph/docs/hbar.html
@@ -0,0 +1,689 @@
+
+
+
+
+
+ RGraph: HTML5 Javascript charts library - horizontal bar charts documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
RGraph: HTML5 Javascript charts library - Horizontal bar charts documentation
+
+
+
+
+ Horizontal bar charts are a variation on Bar charts, which can be useful when you have larger labels, since you have
+ more space available to you for them.
+
+
+
+
+
+ chart.gutter.left
+ The left gutter of the chart, (the gutter is where the labels and title are)).
+ Default: 75
+
+
+ chart.gutter.right
+ The right gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.top
+ The top gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.bottom
+ The bottom gutter of the chart, (the gutter is where the labels and title are).
+ 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']
+
+
+ chart.colors.sequential
+ If true, for regular bar charts, the colors that you specify will be used in a sequential fashion.
+ Default: false
+
+
+
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: true
+
+
+ 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.xlabels
+ A boolean controlling whether the X labels are shown.
+ Default: true
+
+
+ chart.labels
+ An array of the labels to be used on the chart.
+ 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 chart, if any.
+ Default: null
+
+
+
+
+chart.title.font
+The font that the title is rendered in. If not specified the chart.text.font setting is used (usually Verdana)
+Default: null
+
+
+chart.title.size
+The size of the title. If not specified the size is usually 2pt bigger than the chart.text.size setting.
+Default: null
+
+
+chart.title.bold
+Whather the title is bold or not.
+Default: true
+
+
+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.xaxis.size
+ This allows you to specify a size for the X axis title.
+ Default: null
+
+
+ chart.title.xaxis.font
+ This allows to specify a font for the X axis title.
+ Default: null
+
+
+ chart.title.xaxis.bold
+ This controls whether the X axis title is bold or not.
+ Default: true
+
+
+ chart.title.yaxis
+ This allows to specify a title for the Y axis.
+ Default: none
+
+
+ chart.title.yaxis.size
+ This allows you to specify a size for the Y axis title.
+ Default: null
+
+
+ chart.title.yaxis.font
+ This allows to specify a font for the Y axis title.
+ Default: null
+
+
+ chart.title.yaxis.bold
+ This controls whether the Y axis title is bold or not.
+ Default: true
+
+
+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.xmin
+ An optional minimum figure for the X scale.
+ Default: 0
+
+
+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
+
+
+ chart.highlight.stroke
+ If you use tooltips, this controls the colour of the highlight stroke.
+ Default: black
+
+
+ chart.highlight.fill
+ If you use tooltips, this controls the colour of the highlight fill.
+ Default: rgba(255,255,255,0.5)
+
+
+
+
+
+
+
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.halign
+ Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
+ aligned left or right.
+ Default: right
+
+
+ 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
+
+ chart.key.linewidth
+ The line width of the surrounding border on the key.
+ Default: 1
+
+
+
+
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.event
+ This is the event that triggers the tooltips. It can be onclick or onmousemove.
+ Default: onclick
+
+
+ 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 chart 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 chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).
+ Default: false
+
+
+
+ chart.resize.handle.background
+ With this you can specify the background color for the resize handle. If you're adjusting the position of the
+ handle then you may need this to make the handle stand out more.
+ Default: null
+
+
+
+
+
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 chart 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
+
+
+ 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 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.hbar.js"></script>
+
+<script>
+ myGraph = new RGraph.HBar('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 bar = obj.getBar(e);
+
+ if (bar) {
+
+ var top = bar[0];
+ var left = bar[1];
+ var width = bar[2];
+ var height = bar[3];
+ var idx = bar[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>
+
+
+
\ No newline at end of file
diff --git a/schall/static/RGraph/docs/hprogress.html b/schall/static/RGraph/docs/hprogress.html
new file mode 100644
index 0000000..3437dca
--- /dev/null
+++ b/schall/static/RGraph/docs/hprogress.html
@@ -0,0 +1,427 @@
+
+
+
+
+
+ RGraph: HTML5 Javascript charts 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.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.left
+ The left gutter of the chart, (the gutter is where the labels and title are)).
+ Default: 25
+
+
+ chart.gutter.right
+ The right gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.top
+ The top gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.bottom
+ The bottom gutter of the chart, (the gutter is where the labels and title are).
+ 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 chart.
+ Default: An empty array
+
+
+ chart.labels.position
+ This determines whether the labels are placed on the top or the bottom of the progress bar.
+ Default: bottom
+
+
+
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.font
+The font that the title is rendered in. If not specified the chart.text.font setting is used (usually Verdana)
+Default: null
+
+
+chart.title.size
+The size of the title. If not specified the size is usually 2pt bigger than the chart.text.size setting.
+Default: null
+
+
+chart.title.bold
+Whather the title is bold or not.
+Default: true
+
+
+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 tooltips use. 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 chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).
+ Default: false
+
+
+
+ chart.resize.handle.background
+ With this you can specify the background color for the resize handle. If you're adjusting the position of the
+ handle then you may need this to make the handle stand out more.
+ Default: null
+
+
+
+
+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 chart 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
+
+
+
Miscellaneous
+
+ chart.highlight.stroke
+ If you use tooltips, this controls the colour of the highlight stroke.
+ Default: black
+
+
+ chart.highlight.fill
+ If you use tooltips, this controls the colour of the highlight fill.
+ Default: rgba(255,255,255,0.5)
+
+
+
+
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.halign
+ Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
+ aligned left or right.
+ Default: right
+
+
+ chart.key.position
+ Determines the position of the key. Either graph or gutter (default).
+ Default: gutter
+
+ 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: false
+
+
+ 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: true
+
+ chart.key.color.shape
+ This can be square, circle or line and controls how the color indicators in the key appear.
+ Default: square
+
+ chart.key.linewidth
+ The line width of the surrounding border on the key.
+ Default: 1
+
+
+
+
+
\ No newline at end of file
diff --git a/schall/static/RGraph/docs/iframe-setup.html b/schall/static/RGraph/docs/iframe-setup.html
new file mode 100644
index 0000000..be60ee0
--- /dev/null
+++ b/schall/static/RGraph/docs/iframe-setup.html
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Please login
+
+
+
+
Email
+
+
+
+
+
Password
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/schall/static/RGraph/docs/iframe.html b/schall/static/RGraph/docs/iframe.html
new file mode 100644
index 0000000..1e63864
--- /dev/null
+++ b/schall/static/RGraph/docs/iframe.html
@@ -0,0 +1,186 @@
+
+
+
+
+
+ RGraph: HTML5 Javascript charts library - Integrating RGraph with external libraries - covering the scrollbars
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
RGraph: HTML5 Javascript charts library - Covering the scroll bars
+
+
+
+
+
+
+ This is an example of getting the ModalDialog to cover the entire page - including the scroll bars. A regular DIV does
+ not do this. This text is just here to pad the page and ensure that the browser creates a scroll bar.
+
+
+
+ This only works for online images, which are on the [] domain. There's no server-side
+ scripting though, so feel free to put it on your website and use it there.
+
+ #
+
Why use data: URLs?
+
+
+ By using data: URLs you reduce the number of HTTP requests needed to display your page since the images are part of the
+ page itself. This does mean though that the images can't be cached (unless of course the page itself is cached). But, if you were
+ to reuse the same image on subsequent pages, they wouldn't be cached. You can get around this though by using some
+ Javascript at the bottom of your page to change the URLs to the real image files. The
+ www.rgraph.net front page uses this technique.
+
+
+
+
+ URL:
+
+
+
+
+ The data: url:
+
+
+
+
+ A full image tag with the url as the src:
+
+
+
RGraph: HTML5 Javascript charts library - Documentation and HTML5 examples
+
+
+
+
+
+ Need something that RGraph doesn't currently support? RGraph license holders can usually be accomodated - please
+ contact support to discuss your requirements.
+
Benefits of RGraph: HTML5 Javascript charts library
+
+
+ The HTML5 canvas tag is a new tag for HTML5. It allows for two dimensional drawing easily using Javascript.
+ This makes it perfect for producing charts. Because Javascript runs on your users' computer, none of the load on your web server
+ normally associated with producing charts 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 at the same time as
+ benefiting your website, ie:
+
+
+
+
It can save you money by reducing the load on your web server(s)
+
It can speed up your web pages
+
+
+
+ Imagine, you are creating 10,000 charts a day and the data is such that the resulting charts cannot be cached. With the RGraph
+ library you can reduce that figure to zero. All the processing is done by each individual web browser, much like
+ showing the HTML that you send to them. So you don't have to send any images, you simply send them the Javascript charts libraries
+ once. So, much lower bandwidth bills and less strain on your webserver.
+
+
+
+ And if that wasn't enough, because the charts 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
+ charts as your website.
+
+ Since the charts are produced using HTML5 features (the new canvas tag), client support includes:
+
+
+
+
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.
+
+
+
+ HTML5 canvas & Microsoft Internet Explorer (MSIE)
+ Microsoft Internet Explorer 8 doesn't natively support the HTML5 canvas tag. To support
+ MSIE8 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 from the developer preview 3, Microsoft Internet Explorer 9 has full support for
+ HTML5 canvas.
+ 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.
+
+
+
+ Other devices
+ Other devices (eg mobile devices) may support or may be intending to support the HTML5 CANVAS tag as part of their HTML5 support. Typically
+ the newer a device or its OS the higher the likelyhood is that it has support for HTML5 canvas.
+
+
+
+
+
Improving the performance of your charts
+
+
+ Although performance is excellent, (eg compared to server based charts libraries), you may still want to tune
+ RGraph further. The biggest thing you can do is use HTTP 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 Unix 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 chart 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 charts 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 chart. This might not be so bad if the
+ chart 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 chart. This way
+ the chart will be created and shown, and then the rest of the page loads. The end result is that your chart
+ 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 charts 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 charts
+ 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 charts asynchronously
+ Where possible, you may wish to create your charts asynchronously. This allows the browser to continue rendering the page
+ immediately after getting to the code that creates the chart. This might not be perceptible if you don't have a lot of
+ charts, 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 charts
+ asynchronously, which presents itself by not drawing text sometimes (it's not consistent). Simply not using
+ asynchronous chart production in this case resolves the issue.
+
+
+
+ DOMContentLoaded event
+ Using this event can speed up the display of your charts 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 charts 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 chart 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 chart 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
+ You may wish to consider combining the RGraph 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 chart 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.
+
+
+ To make your life straight-forward, you may want to make this a part of your release script/process. This way you
+ can make changes to the scripts in your development environment as you would normally.
+
+
+
+ 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
+ chart libraries, they can be used for something else.
+
+
+
+
+ Avoiding shadow blur with animations
+ If you're using animations then you may wish to avoid or reduce the shadow blur that you're using. With HTML5 canvas shadow
+ blur is a drain on performance - so if you're looking to get the most out of your charts or are using animations
+ which require redrawing the chart, turning off the shadow blur can reduce the time it takes to draw the charts leading to
+ smoother charts.
+
+
+
+ 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 charts on the front page or will
+ have a login page that is shown before any charts, this effectively eliminates the charts 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.
+
+
+
+ General website performance tools
+
+ If your aim is to improve your websites performance as a whole then you may be interested in these tools:
+
+
+
+
+ http://www.webpagetest.org/
+ This site can provide a wealth of information about how to improve the permance of your website, specific to your site.
+ Convert images to data: URLs
+ A tool which converts images to data: URLs. Using data: URLs can reduce the number of HTTP requests used.
+
+
+
+
+
+
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.effects.js"></script> <!-- Just needed for visual effects -->
+<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 charts -->
+<script src="RGraph.bipolar.js"></script> <!-- Just needed for bi-polar charts -->
+<script src="RGraph.fuel.js"></script> <!-- Just needed for fuel charts -->
+<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.gauge.js"></script> <!-- Just needed for gauge 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 charts -->
+<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.radar.js"></script> <!-- Just needed for radar 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 charts -->
+<script src="RGraph.thermometer.js"></script> <!-- Just needed for thermometer charts -->
+<script src="RGraph.vprogress.js"></script> <!-- Just needed for vertical progress bars -->
+<script src="RGraph.waterfall.js"></script> <!-- Just needed for waterfall charts -->
+
+
+
+
+ Add the canvas tag (put it where you want the chart to appear):
+
+ Create the chart (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.left', 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.
+
+
+
+
+
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>
+ chart = new RGraph.Line('cvs', <?php print($data_string) ?>);
+ chart.Set('chart.background.grid.autofit', true);
+ chart.Set('chart.gutter.left', 35);
+ chart.Set('chart.gutter.right', 5);
+ chart.Set('chart.hmargin', 10);
+ chart.Set('chart.tickmarks', 'endcircle');
+ chart.Set('chart.labels', <?php print($labels_string) ?>);
+ chart.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>
+
+ There's an example here that shows updating your chart dynamically.
+
+
+
+
+
+
Support
+
+
+ If you have a support issue you can send it to the support email address:
+ support@rgraph.net. You can also follow
+ @_rgraph on twitter to get notifications of new releases and
+ notable updates.
+
RGraph: HTML5 Javascript charts library - Common issues
+
+
+
+
+ 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.
+
+
+
+
+
Annotations aren't saved when running locally in Mozilla Firefox
+
+
+ The solution here is to run the charts 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
+ chart 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.
+
+
+
+ Update: Currently, (roughly March 2011), the missing text issue appears to be much less evident, if not resolved entirely.
+
+
+
+
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 chart types may still be affected.
+
RGraph: HTML5 Javascript charts library - Examples of keys in charts
+
+
+ [No canvas support]
+ [No canvas support]
+
+
+
+ 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 chart.
+
+
+
+ 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 chart 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)
+
+
+
Interactive keys
+
+ The Line chart supports interactive keys - as shown in the example. This is only available when the key
+ is in graph mode. This allows you to click a key item and it will be highlighted on the chart.
+
+
+
+
\ No newline at end of file
diff --git a/schall/static/RGraph/docs/led.html b/schall/static/RGraph/docs/led.html
new file mode 100644
index 0000000..92b619d
--- /dev/null
+++ b/schall/static/RGraph/docs/led.html
@@ -0,0 +1,186 @@
+
+
+
+
+
+ RGraph: HTML5 Javascript charts 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 chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).
+ Default: false
+
+
+ chart.resize.handle.background
+ With this you can specify the background color for the resize handle. If you're adjusting the position of the
+ handle then you may need this to make the handle stand out more.
+ Default: null
+
+
+
+
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 chart 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
RGraph: HTML5 Javascript charts library - The RGraph license
+
+
+ There are two license types available with RGraph - a free one for non-commercial entities and a non-free commercial use license.
+ Each is described below.
+
+ A overview of the licensing is that for commercial use there is a one-time licensing fee of £79 (GBP)
+ whilst for non-commercial use (eg personal, government, charity, educational etc) it's free
+ to use assuming that you link to www.rgraph.net on your website.
+
+
+
+
+
Commercial usage
+
+
+
+
+
+
+
+
+ Commercial usage covers commercial entities for their websites
+ (either internal or external) or in software that they produce. If your organisation generates
+ profit then a commercial license is most appropriate. There are some FAQs below that
+ should help to answer any questions that you may have, but if they don't then you can
+ email your question to: support@rgraph.net
+
+
+
+ After completion of either Google Checkout or Paypal payment you are granted an RGraph commercial license. You will
+ be sent the license details via email.
+
+
+
+ Example uses are:
+
+
+
Internal websites (eg intranets)
+
Private websites
+
Public facing websites
+
Online applications
+
Offline applications
+
+
+
+ You may alter the RGraph code to suit your particular needs. Also, if you're covered by the non-commercial license, however
+ you don't wish to link to the RGraph website then buying a commercial license means that you dont have to.
+
+
+
+
+ Do I need to buy a commercial license?
+ For commercial/business use, then yes - you need a license to use RGraph.
+
+
+
+
+
+ How much is a license?
+ A license is a fee of £79 (UK pounds). That's a little over $120 (US dollars) at
+ the time of writing.
+
+
+
+
+
+ What if I need something that's not part of RGraph?
+ If there's a feature that you need that's not part of RGraph then I can usually accommodate you assuming that
+ you're a license holder. Please contact support first to discuss your needs. If it's not too specific to you then
+ I can add it to the main RGraph software. If it is then I can add it to your specific copy of RGraph. You can
+ contact support with support@rgraph.net
+
+
+
+
+
+ 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.
+
+
+
+
+
+ What if I'm a web designer?
+ In this situation each client would need a separate license for themselves. They can then use RGraph as much as they wish.
+ If you prefer to buy in bulk - discounts are available (see next question).
+
+
+
+
+
+ Is there a discount for buying licenses in bulk?
+ Yes there's a discount available if you wish to buy 5, 10 or 15 licenses (you could be a web designer for example
+ wishing to license your clients). Please contact support if this interests you.
+
+
+
+
+
+ Do I need to provide a backlink?
+ Commercial license holders do not need to provide a backlink to the RGraph website.
+
+
+
+
+
+ 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.
+
+
+
+
+
Non-commercial free usage
+
+ RGraph can be used free-of-charge by non-commercial entities who wish to use it either on an internal or external website
+ or in software that they make. Examples of non-commercial entities include:
+
+
+
Individuals
+
Charities
+
Government bodies
+
Educational institutes
+
+
+ Attribute RGraph on your website by linking back to the RGraph site - example HTML code as follows:
+
+
+
+<a href="http://www.rgraph.net" target="_blank">
+ Charts made with RGraph: HTML5 Javascript charts library
+</a>
+
+
+
+ If you would prefer not to link to the RGraph website, then you can buy an RGraph commercial license and you won't need to.
+ You may alter the RGraph code to suit your particular needs.
+
+
+
+
+
+
+
+
+ If you're covered by the free license but want to make a donation to help keep RGraph going then they're all gratefully
+ received. You can use PayPal button on the left to send it. Thanks!
+
+
+
+
+
+
+
+
The legal bit
+
Copyright notice
+
+ The ownership of the Licensed material is not transferred to you in either of these agreements.
+
+
+
+
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.
+
+
+
+
Contact support
+
+ Any questions or queries about this license or its extent should
+ be directed to supportrgraph.net
+
+
+
\ No newline at end of file
diff --git a/schall/static/RGraph/docs/line.html b/schall/static/RGraph/docs/line.html
new file mode 100644
index 0000000..02185e0
--- /dev/null
+++ b/schall/static/RGraph/docs/line.html
@@ -0,0 +1,990 @@
+
+
+
+
+
+ RGraph: HTML5 Javascript charts library - line charts documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
RGraph: HTML5 Javascript charts library - Line charts documentation
+
+
+
+
+ Note:
+ With the Line chart, there isn't an option to have a scale on the X axis. For this you'll need a Scatter chart with
+ chart.line set to true.
+
+
+
+ Line charts, along with Bar charts, are probably the most configurable of all the charts available.
+
+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: true
+
+
+ chart.background.grid.autofit.numhlines
+ When using autofit this allows you to specify how many horizontal grid lines you want.
+ Default: 5
+
+
+ chart.background.grid.autofit.numvlines
+ When using autofit this allows you to specify how many vertical grid lines you want.
+ Default: 20
+
+
+ chart.background.grid.autofit.align
+ If you want to have your grid lines line up with the labels (both X and Y axes), you can set this to true and RGraph will
+ attempt to make the grid lines line up. If you have a chart.hmargin set then the alignment will be thrown out.
+ Default: false
+
+
+ chart.background.image
+ If you want to specify a background image to use on your chart, specify it with this property.
+ Default: null
+
+
+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 chart.
+ Default: [] (An empty array)
+
+
+chart.labels.ingraph
+ An array of labels for the chart which are drawn "inside" the chart. 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, 5 or 10) 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.ylabels.specific
+ You can use this option to give your own Y labels (eg ['Low', 'Medium', 'High'].
+ Default: null
+
+
+ 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 chart). 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.left
+ The left gutter of the chart, (the gutter is where the labels and title are)).
+ Default: 25
+
+
+ chart.gutter.right
+ The right gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.top
+ The top gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.bottom
+ The bottom gutter of the chart, (the gutter is where the labels and title are).
+ 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 line is filled or not. This looks best when there is no horizontal
+ margin.
+
+ Note: When showing multiple lines the values are additive by default. This means that if you have two lines
+ they will be "stacked" on top of each other. If this is not the desired behaviour then you can set the option
+ below to false.
+ Default: false
+
+
+ chart.filled.accumulative
+ When showing multiple filled lines the values are by default accumulative (ie added to each other). If this is not the
+ desired behaviour, then you can set this property to false to have them drawn "non-accumulatively".
+
+ Note: If you use fully opaque colors in conjunction with this option set to false it's feasible that you
+ might not see one or more of the lines, or parts of the line. If you want to see all of the lines you should
+ leave this option set to its default true setting. You can see an example of this setting
+ here.
+
+
+
+ Default: true
+
+
+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.css.class
+ This is the name of the CSS class the chart 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 chart to be highlighted and thus avoid redrawing, (eg When
+ combining charts), then set this to false.
+ Default: true
+
+
+ chart.tooltips.hotspot.xonly
+ Set this to true if you want the tooltips to be triggered by the mouse X position only.
+ Default: false
+
+
+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.hlines
+ This determines whether the horizontal crosshair is shown.
+ Default: true
+
+
+ chart.crosshairs.vlines
+ This determines whether the vertical crosshair is shown.
+ Default: true
+
+
+
+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 chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).
+ Default: false
+
+
+
+ chart.resize.handle.background
+ With this you can specify the background color for the resize handle. If you're adjusting the position of the
+ handle then you may need this to make the handle stand out more.
+ Default: null
+
+
+
+chart.adjustable
+ Defaulting to false, this determines whether your chart will be adjustable (click a point and drag it). Default: false
+
+
Titles
+
+
+chart.title
+ The title of the chart. Default: none
+
+
+
+
+chart.title.font
+The font that the title is rendered in. If not specified the chart.text.font setting is used (usually Verdana)
+Default: null
+
+
+chart.title.size
+The size of the title. If not specified the size is usually 2pt bigger than the chart.text.size setting.
+Default: null
+
+
+chart.title.bold
+Whather the title is bold or not.
+Default: true
+
+
+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.xaxis.size
+ This allows you to specify a size for the X axis title.
+ Default: null
+
+
+ chart.title.xaxis.font
+ This allows to specify a font for the X axis title.
+ Default: null
+
+
+ chart.title.xaxis.bold
+ This controls whether the X axis title is bold or not.
+ Default: true
+
+
+ chart.title.yaxis
+ This allows to specify a title for the Y axis.
+ Default: none
+
+
+ chart.title.yaxis.size
+ This allows you to specify a size for the Y axis title.
+ Default: null
+
+
+ chart.title.yaxis.font
+ This allows to specify a font for the Y axis title.
+ Default: null
+
+
+ chart.title.yaxis.bold
+ This controls whether the Y axis title is bold or not.
+ Default: true
+
+
+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
+
+
+ chart.title.yaxis.align
+ Instead of using the option above you can instead use this option, specifying left or right.
+ Default: left
+
+
+
+
+
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.halign
+ Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
+ aligned left or right. By default the key is positioned on the opposite side to the Y axis.
+ Default: null
+
+
+ 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
+
+
+ chart.key.linewidth
+ The line width of the surrounding border on the key.
+ Default: 1
+
+
+ chart.key.interactive
+ The Line chart supports interactive keys - so you can click on a key element and RGraph will highlight
+ the appropriate line, whilst fading the rest of the chart.
+ Default: false
+
+
+
Scale
+
+
+ chart.scale.formatter
+ To allow thoroughly custom formats of numbers in the scale, you can use this option to
+ specify a function that is used by RGraph to format numbers. This function should
+ handle ALL of the formatting. Eg:
+
+function myFormatter(obj, num)
+{
+ return num + 'F'; // An example of formatting
+}
+myGraph.Set('chart.scale.formatter', myFormatter);
+
+ Default: null
+
+
+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.noaxes
+ Whether the axes are drawn
+ Default: false (the axes ARE drawn)
+
+
+ chart.axesontop
+ A minor option, this sets the axes to be redrawn after the chart has been drawn. This is only useful in a certain
+ set of circumstances - the chart is filled and the line width is small.
+ Default: false
+
+
+ chart.noendxtick
+ When you're combining the Bar and Line charts, you may want to use this property to stop the end X tick from
+ being drawn.
+ Default: false (the end tick IS 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 chart 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 chart. 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.tickmarks.linewidth
+ This is the width of the line used when drawing the tickmarks. By default this is the same as the chart.linewidth setting.
+ Default: null
+
+
+ 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 chart). 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.animation.unfold.x
+ This is used by the Unfold Line chart animation and dictates whether the X value is unfolded.
+ Default: false
+
+
+ chart.animation.unfold.y
+ This is used by the Unfold Line chart animation and dictates whether the Y value is unfolded.
+ Default: true
+
+
+ chart.animation.unfold.initial
+ This property can be used to set the initial factor for the Unfold animation. Setting this to a value less than one
+ will cause the line to expand outwards, whilst a value greater than one will cause the line to contract towards
+ the correct values.
+ Default: 2
+
+
+
+ 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
+
+
+ chart.highlight.stroke
+ If you use tooltips, this controls the colour of the highlight stroke.
+ Default: black
+
+
+ chart.highlight.fill
+ If you use tooltips, this controls the colour of the highlight fill.
+ Default: rgba(255,255,255,0.5)
+
+
+ chart.curvy
+ If you prefer - this draws a more cuvy chart. Because of the curves these charts are not exact, and the inaccuracy increases
+ with a greater curve factor (controlled by the next property). Being new, this property may not work with all the line chart features
+ and should be used with caution.
+ Default: false
+
+
+ chart.curvy.factor
+ This controls the severity of the curves when the above property is used. It can be a decimal from 0 (not curvy at all)
+ to 0.5 (quite curvy).
+ Default: 0.25
+
+
+
+
+
+
+
Methods
+
+
+ obj.getPoint(e)
+ 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 chart 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:
+
+ The default behaviour of filled Line charts is to "stack" the lines on top of each other. This allows them all
+ to be totally visible, no matter what (unless a line has a zero value of course). If this is not desired, then there is an
+ option (chart.filled.accumulative - true/false) to change this behaviour so the lines are plotted "as-is".
+ Keep in mind that if you set this option to false (ie the Lines are plotted as-is) it may be wiser to use
+ semi-transparent colors or some parts of data sets (or even entire data sets) may be hidden by others. There's a
+ comparison of the different modes here.
+
+
+
+
Custom tickmarks
+
+ 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 chart 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>
+
+
+
+
The coords2 array
+
+ An alternative method of indexing the chart coordinates is available in obj.coords2. With this array, all of the first
+ lines coordinates are available in obj.coords2[0], the second lines coordinates in obj.coords2[1] and so on.
+
+
\ No newline at end of file
diff --git a/schall/static/RGraph/docs/line_filled.html b/schall/static/RGraph/docs/line_filled.html
new file mode 100644
index 0000000..dbc341b
--- /dev/null
+++ b/schall/static/RGraph/docs/line_filled.html
@@ -0,0 +1,142 @@
+
+
+
+
+
+ RGraph: HTML5 Javascript charts library - The Line chart setting chart.filled.accumulative
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
RGraph: HTML5 Javascript charts library - The Line chart setting: chart.filled.accumulative
+
+
+
+
+ This page shows how the setting chart.filled.accumulative affects your charts. The chart on the left has
+ it enabled (the default), so the lines in effect sit on top of each other. The chart on the right has the setting
+ set to false so the points are drawn "as-is", ie not accumulatively. The first chart could be more useful if you wish
+ to see accumulated values, whereas the chart on the right might be better if you want to see individual values.
+
+
+
+ Keep in mind that if you choose to use a non-accumulative chart the colors may be better as semi-transparent ones,
+ otherwise parts or all of some lines may get hidden by others.
+
RGraph: HTML5 Javascript charts library - Meter charts documentation
+
+
+
+
+ These are Meter charts. Similar to half the Odometer. The difference is purely visual, but may well be more suited to
+ a control panel type application.
+
+
+
+
+
+ chart.gutter.left
+ The left gutter of the chart, (the gutter is where the labels and title are)).
+ Default: 25
+
+
+ chart.gutter.right
+ The right gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.top
+ The top gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.bottom
+ The bottom gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+
Colors
+
+
+ chart.strokestyle
+ The color of the bits separating the segements. By setting this to white you can get a separation effect.
+ Default: null
+
+
+ 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
+
+
+ chart.value.text
+ This option controls whether the value of the Meter is shown in text.
+ Default: false
+
+
+ chart.value.text.decimals
+ The amount of decimals shown in the text label.
+ Default: 0
+
+
+ chart.value.text.units.pre
+ The units (before the value) shown in the text label.
+ Default: None (an empty string)
+
+
+ chart.value.text.units.post
+ The units (after the value) shown in the text label.
+ Default: None (an empty string)
+
+
+ chart.labels
+ Whether the labels are shown or not.
+ Default: true
+
+
+
Titles
+
+
+chart.title
+ The title of the chart, if any. Default: null
+
+
+
+
+chart.title.font
+The font that the title is rendered in. If not specified the chart.text.font setting is used (usually Verdana)
+Default: null
+
+
+chart.title.size
+The size of the title. If not specified the size is usually 2pt bigger than the chart.text.size setting.
+Default: null
+
+
+chart.title.bold
+Whather the title is bold or not.
+Default: true
+
+
+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
+
+
+ chart.scale.decimals
+ The number of decimal places to display for the values.
+ Default: 0
+
+
+
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 chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).
+ Default: false
+
+
+
+ chart.resize.handle.background
+ With this you can specify the background color for the resize handle. If you're adjusting the position of the
+ handle then you may need this to make the handle stand out more.
+ 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 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 chart 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
+
+
+ chart.linewidth.segments
+ The linewidth of the lines separating the segments.
+ Default: 1
+
+
+ chart.tickmarks.small.num
+ This controls the number of small tickmarks.
+ Default: 100
+
+
+ chart.tickmarks.big.num
+ This controls the number of large tickmarks.
+ Default: 10
+
+
+ chart.tickmarks.small.color
+ This sets the color of the small tickmarks.
+ Default: #bbb
+
+
+ chart.tickmarks.big.color
+ This sets the color of the large tickmarks.
+ Default: black
+
+
+ chart.border
+ Whether the outline is drawn.
+ Default: true
+
+
+ chart.segment.radius.start
+ Instead of the segments going from the center point outwards, you can use this to specify a start point of the
+ coloured segments.
+ Default: null
+
+
+ chart.needle.radius
+ This can be used to stipulate the radius of the pointer.
+ Default: null
+
+
+ chart.needle.linewidth
+ This can be used to specify the linewidth used when drawing the needle.
+ Default: null
+
+
+ chart.needle.tail
+ If true the needle will have a small tail.
+ Default: false
Canvas fallback content and visually impaired users
+
+
+ When using the canvas element you should be aware of the accessibility of your charts, for example where vision limited users are
+ concerned. Screen readers, for example, may not be able to convert a chart 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 chart 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 chart.
+
+
+
+
+
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 chart, 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:
+
+ Note:
+ When you resize the canvas using CSS, not only will it be scaled (not enlarged), but it will also NOT be cleared. You can
+ see this effect on the animation page with the jQuery animation example.
+
+
+
+
+
The canvas coordinate system
+
+ The canvas coordinate system starts in the top left of the canvas (at [0,0] - the X value increasing as you go right
+ and the Y value as you go down), much like the CSS coordinates for the entire page. The
+ gutter goes around the canvas (ie top/bottom/left/right - where the labels and titles are placed), and the actual chart
+ sits in the middle.
+
+
+
+
+
RGraph and older browsers
+
+
+ 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 charts 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.
+
+
+
+
+
+
Debugging tips
+
+
+ If you're having a hard time debugging your chart, try these:
+
+
+
+
Ensure you have only one chart 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 (CTRL_SHIFT+J) and Safari (CTRL+ALT+C). There's a
+ video about using the Chrome developer tools
+ here. These are very useful
+ tools that make development much easier.
+
+
Reduce the page to the bare minimum.
+
Start with a very basic chart and build it up slowly.
+
+
+
+
+
+
+
Inspecting an RGraph chart
+
+
+ To help when debugging your RGraph charts 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 DOM2 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:
+
+ 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 chart 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 chart shown. The HTML and the script to achieve this is shown below.
+ It involves placing an extra canvas above the chart 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 in conjunction with tooltips in this case and this browser doesn't work.
+
+
+<div style="position: relative; float: right; margin-right: 10px; margin-top: 10px">
+ <!-- The width here is set further down the page in script -->
+ <canvas id="axes" width="0" height="200" style="position: absolute; top: 0; left: 0; z-index: 100"></canvas>
+ <div style="width: 600px; overflow: auto">
+ <canvas id="cvs" width="1000" height="200"></canvas>
+ </div>
+</div>
+
+<script>
+ window.onload = function ()
+ {
+ /**
+ * This is the script that draws the chart
+ */
+ line = new RGraph.Line('cvs', [3,15,22,26,28,24,22,25,23,24,26,23,24,25,27,28,29,26,23,22,24,21,24,25]);
+ line.Set('chart.noaxes', true); // We draw the Y axis ourselves
+ line.Set('chart.gutter.top', 25);
+ line.Set('chart.gutter.bottom', 35);
+ line.Set('chart.gutter.left', 50);
+ line.Set('chart.hmargin', 5);
+ line.Set('chart.linewidth', 3);
+ line.Set('chart.shadow', true);
+ line.Set('chart.shadow.offsetx', 0);
+ line.Set('chart.shadow.offsety', 0);
+ line.Set('chart.shadow.blur', 15);
+ line.Set('chart.shadow.color', 'red');
+ line.Set('chart.text.angle', 15);
+ line.Set('chart.tooltips', [
+ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December',
+ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'
+ ]);
+ line.Set('chart.labels', [
+ '','Feb 09', 'Mar 09','Apr 09','May 09','Jun 09','Jul 09','Aug 09','Sep 09','Oct 09','Nov 09', 'Dec 09',
+ 'Jan 10', 'Feb 10', 'Mar 10','Apr 10','May 10','Jun 10','Jul 10','Aug 10','Sep 10','Oct 10','Nov 10', 'Dec 10'
+ ]);
+ line.Draw();
+
+
+
+ /**
+ * And this is the script that draws the left axis, on the other canvas (that doesn't move)
+ */
+ ca = document.getElementById("axes")
+ co = ca.getContext('2d');
+
+
+ /**
+ * This sets the smaller canvas to cover the whole of the charts left gutter
+ */
+ ca.width = line.Get('chart.gutter.left') + 1;
+
+
+ RGraph.Clear(ca, 'white');
+
+
+ /**
+ * This draws the static axis
+ */
+ co.beginPath();
+ co.moveTo(line.Get('chart.gutter.left'), line.Get('chart.gutter.top'));
+ co.lineTo(line.Get('chart.gutter.left'), line.canvas.height - line.Get('chart.gutter.bottom'));
+
+ // Draw the tickmarks on the axis
+ var numTicks = 10;
+ for (var i=0; i<=numTicks; ++i) {
+ co.moveTo(line.Get('chart.gutter.left'), line.Get('chart.gutter.top') + (((ca.height - line.Get('chart.gutter.top') - line.Get('chart.gutter.bottom')) / numTicks) * i));
+ co.lineTo(line.Get('chart.gutter.left') - 3, line.Get('chart.gutter.top') + (((ca.height - line.Get('chart.gutter.top') - line.Get('chart.gutter.bottom')) / numTicks) * i));
+ }
+
+ co.stroke();
+
+
+
+ /**
+ * This draws the labels for the static axis
+ */
+ co.beginPath();
+ var color = 'black';
+ var size = 10;
+
+ for (var i=0; i<5; ++i) {
+ co.fillStyle = color;
+ co.textAlign = 'right';
+ co.textBaseline = 'middle';
+ var h = line.canvas.height - line.Get('chart.gutter.top') - line.Get('chart.gutter.bottom');
+
+ RGraph.Text(co,
+ 'Verdana',
+ size,
+ line.Get('chart.gutter.left') - 4,
+ line.Get('chart.gutter.top') + (h * (i/5)),
+ line.max - (line.max * (i/5)));
+ }
+ co.fill();
+ }
+</script>
+
+
+
+
+
+
+
+
+
+
+
+
+
Reducing white space
+
+
+
+
+
+
+ New in June 2011 is the ability to set the gutters independently. This removes the necessity to translate
+ and adjust the coordinates to get more space and is far more straight-forward. The new properties are:
+
+
+
chart.gutter.left
+
chart.gutter.right
+
chart.gutter.top
+
chart.gutter.bottom
+
+
+ You can read more about this change here.
+
+
+
+
+
+
+
+
+ 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 charts 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 charts will still be
+ drawn, albeit without tooltips.
+
+
+
+
+
+
+
+
+
+
+
+
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 chart type
+
+ If you wish to create your own chart 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.
+
+
+
+
+
+
World map
+
+ There is no function in RGraph to do mapping, either of the World or a smaller region. If this is what you want then you
+ may be interested in this HTML5 canvas based mapping system:
+ http://joncom.be/code/excanvas-world-map/
+
+
+
+
+
+
Adding text to your charts
+
+ You can add arbitrary text to your charts by using the RGraph API. For example you could use this code after the call to .Draw():
+
+ Some charts type have the ability to use crosshairs. The supported charts are:
+
+
+
+
Bar charts
+
Line charts
+
Scatter charts
+
Waterfall charts
+
+
+
+ There are various options that control the crosshairs, though because some apply to the readout, they are only applicable to
+ the Scatter chart. The crosshairs can be customised by stipulating the linewidth, the color and whether only the horizontal,
+ vertical or both lines are shown.
+
+
+
Crosshairs and the Scatter chart
+
+ Because the X axis is scaled, the Scatter chart has the extra ability of having a coordinates readout when
+ the crosshairs are in use. This is shown in the example above. The appropriate properties are:
+
+
+
+
obj.canvas.__crosshairs_x__
+
obj.canvas.__crosshairs_y__
+
obj.canvas.__crosshairs_labels__ (this is the coordinates readout)
+
+
+
+ In the above example the coordinates are put in the text input by using the custom event oncrosshairs. This is as
+ follows:
+
+
+
+function myFunc (obj)
+{
+ var x = obj.canvas.__crosshairs_x__;
+ var y = obj.canvas.__crosshairs_y__;
+
+ document.getElementById("crosshairs.out").value = x + ',' + y;
+}
+RGraph.AddCustomEventListener(scatter, 'oncrosshairs', myFunc);
+
RGraph: HTML5 Javascript charts 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.
+
+ As of December 2009 RGraph now works partially with Internet Explorer without Google Chrome Frame.
+ Charts 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 chart types), albeit without blurring.
+
You must reference the Javascript libraries in the documents <head>.
+
You must use the window.onload event to create your chart.
+
If your page is large, there may be a slight pause before the window.onload event fires and thus creates the chart.
+
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.left
+ The left gutter of the chart, (the gutter is where the labels and title are)).
+ Default: 25
+
+
+ chart.gutter.right
+ The right gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.top
+ The top gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.bottom
+ The bottom gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+
Colors
+
+
+ chart.border.color1
+ This is the first color used in the gradient of the outer border of the chart (if enabled).
+ Default: #BEBCB0
+
+
+ chart.border.color2
+ This is the second/middle color used in the gradient of the outer border of the chart (if enabled).
+ Default: #F0EFEA
+
+
+ chart.border.color3
+ This is the third color used in the gradient of the outer border of the chart (if enabled).
+ Default: #BEBCB0
+
+
+ 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
+
+
+ chart.green.color
+ This option has two roles. If chart.green.solid is true, this is the actual color, whereas if
+ chart.green.solid is false (the default), it's used as one of the gradient colors.
+ Default: green
+
+
+ chart.yellow.color
+ This option has two roles. If chart.yellow.solid is true, this is the actual color, whereas if
+ chart.yellow.solid is false (the default), it's used as one of the gradient colors.
+ Default: yellow
+
+
+ chart.red.color
+ This option has two roles. If chart.red.solid is true, this is the actual color, whereas if
+ chart.red.solid is false (the default), it's used as one of the gradient colors.
+ Default: red
+
+
+ chart.green.solid
+ If true then the associated chart.green.color option is used as the actual color, not part of a gradient
+ Default: false
+
+
+ chart.yellow.solid
+ If true then the associated chart.yellow.color option is used as the actual color, not part of a gradient
+ Default: false
+
+
+ chart.red.solid
+ If true then the associated chart.red.color option is used as the actual color, not part of a gradient
+ Default: false
+
+
+
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.triangle.border
+ This controls the colour of the border for the pointer. If you don't want it you could set it to be transparent -
+ rgba(0,0,0,0).
+ Default: #aaa
+
+
+ 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.font
+The font that the title is rendered in. If not specified the chart.text.font setting is used (usually Verdana)
+Default: null
+
+
+chart.title.size
+The size of the title. If not specified the size is usually 2pt bigger than the chart.text.size setting.
+Default: null
+
+
+chart.title.bold
+Whather the title is bold or not.
+Default: true
+
+
+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 chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).
+ Default: false
+
+
+
+ chart.resize.handle.background
+ With this you can specify the background color for the resize handle. If you're adjusting the position of the
+ handle then you may need this to make the handle stand out more.
+ Default: null
+
+
+
+
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 chart 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
+
+
+chart.scale.decimals
+ The number of decimal places to display for the labels. Default: 0
+
+
+
+
\ No newline at end of file
diff --git a/schall/static/RGraph/docs/pie.html b/schall/static/RGraph/docs/pie.html
new file mode 100644
index 0000000..bd1ffc9
--- /dev/null
+++ b/schall/static/RGraph/docs/pie.html
@@ -0,0 +1,567 @@
+
+
+
+
+
+ RGraph: HTML5 Javascript charts library - Pie charts documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
RGraph: HTML5 Javascript charts library - Pie charts 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.left
+ The left gutter of the chart, (the gutter is where the labels and title are)).
+ Default: 25
+
+
+ chart.gutter.right
+ The right gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.top
+ The top gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.bottom
+ The bottom gutter of the chart, (the gutter is where the labels and title are).
+ 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 sticks for the labels are shown.
+ Default: false
+
+
+ chart.labels.sticks.color
+ Sets the color of the label sticks.
+ Default: #aaa
+
+
+ chart.labels.sticks.length
+ Sets the length of the label sticks.
+ Default: 7
+
+
+
Titles
+
+
+chart.title
+ The title of the pie chart. Default: none
+
+
+
+
+chart.title.font
+The font that the title is rendered in. If not specified the chart.text.font setting is used (usually Verdana)
+Default: null
+
+
+chart.title.size
+The size of the title. If not specified the size is usually 2pt bigger than the chart.text.size setting.
+Default: null
+
+
+chart.title.bold
+Whather the title is bold or not.
+Default: true
+
+
+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 chart 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 chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).
+ Default: false
+
+
+
+ chart.resize.handle.background
+ With this you can specify the background color for the resize handle. If you're adjusting the position of the
+ handle then you may need this to make the handle stand out more.
+ 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.halign
+ Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
+ aligned left or right.
+ Default: right
+
+
+ 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
+
+
+ chart.key.linewidth
+ The line width of the surrounding border on the key.
+ Default: 1
+
+
+ chart.key.interactive
+ This option enables the facility to click on the pie chart to highlight (explode only) the relevant segment.
+ 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 chart 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.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.variant.donut.color
+ This is the color of the center of the Donut chart.
+ Default: white
+
+
+ chart.highlight.style
+ Can be either explode, 2d or 3d and determines which style of segment highlighting is used in
+ conjunction with tooltips.
+ Default: 2d
+
+
+ chart.highlight.style.2d.fill
+ When 2D highlighting for tooltips is used, this controls the color of the highlighting. The former name for this property was
+ chart.highlight.style.2d.color.
+ Default: rgba(255,255,255,0.5)
+
+
+ chart.highlight.style.2d.stroke
+ When 2D highlighting for tooltips is used, this controls the stroke color of the highlighting.
+ Default: rgba(255,255,255,0)
+
+
+ chart.explode
+ This can either be an array with the same number of elements as segments, or a single number, in which case every
+ segment will be exploded that amount. If it's an array then only those segments will be exploded - eg [0,5,0,0]
+ Default: [] (an empty array)
+
+
+
+
+
Methods
+
+ obj.getSegment()
+
+ obj.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)
+
The zero-indexed segment number
+
+
+
+<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 = obj.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>
+
+
+ obj.Explode()
+
+ The Explode() method allows you to programmatically trigger the exploding (ie the highlighting of) a particular segment.
+ The Explode() method is used like so:
+
+ The index argument is the zero-index segment to operate on (counting from the north axis). An the size is measured in pixels.
+
+
+ Important Note
+
+
+ This method was formerly a common object method, called RGraph.getSegment(e), but has now (6th March 2011) been
+ moved to be part of the Pie chart object.
+
+
+
+
\ No newline at end of file
diff --git a/schall/static/RGraph/docs/png.html b/schall/static/RGraph/docs/png.html
new file mode 100644
index 0000000..a5eafe3
--- /dev/null
+++ b/schall/static/RGraph/docs/png.html
@@ -0,0 +1,214 @@
+
+
+
+
+
+ RGraph: HTML5 Javascript charts library - Retrieving a PNG of your graph
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
RGraph: HTML5 Javascript charts library - Retrieving a PNG of your chart
+
+
+
+
+
+
+ PNG
+ [No canvas support]
+
+
+
+
+ RGraph provides an easy way to get a PNG image of your chart. 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 Radar 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>
+
+
+
Retrieving just the PNG URL
+
+ If you just want to get the PNG image URL - this can be done with the standard canvas function.toDataUrl():
+
+
+
var myUrl = myCanvas.toDataURL();
+
+
+ This gives you a data: URL which represents the canvas. Like this.
+ Because the URLs are very long there are some things that you should be aware of:
+
+
+
+
Google Chrome shows the image, but doesn't show the URL in the address bar
+
MSIE9 can show the image using the context menu API (top) method, but not the stand-alone image.
+ This chart used to be called the Tradar chart (T standing for "Traditional" - there used to be two Radar charts in RGraph),
+ however now (July 2011), it has been renamed to the "Radar" chart to make it easier for people to identify. If you use it
+ you will need to update your code accordingly. Keep in mind that if you use the .type property - this has been updated too
+ (to radar).
+
+
+
+
+
+ chart.gutter.left
+ The left gutter of the chart, (the gutter is where the labels and title are)).
+ Default: 25
+
+
+ chart.gutter.right
+ The right gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.top
+ The top gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.bottom
+ The bottom gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+
Colors
+
+ chart.colors
+ The colors of the radar chart(s).
+ Default: red
+
+
+ chart.colors.alpha
+ If set (a number between 0 nd 1), this will be used as the alpha value of the colors of the chart.
+ Default: null
+
+
+
Title
+
+
+ chart.title
+ The title, if any, of the chart.
+ Default: Not set
+
+
+
+
+chart.title.font
+The font that the title is rendered in. If not specified the chart.text.font setting is used (usually Verdana)
+Default: null
+
+
+chart.title.size
+The size of the title. If not specified the size is usually 2pt bigger than the chart.text.size setting.
+Default: null
+
+
+chart.title.bold
+Whather the title is bold or not.
+Default: true
+
+
+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.highlight.stroke
+ If you use tooltips, this controls the color of the highlight stroke.
+ Default: gray
+
+
+ chart.highlight.fill
+ If you use tooltips, this controls the colour of the highlight fill.
+ Default: white
+
+
+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.halign
+ Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
+ aligned left or right.
+ Default: right
+
+
+ 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
+
+ chart.key.linewidth
+ The line width of the surrounding border on the key.
+ Default: 1
+
+
+
+
+
+
+
+
+
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 chart 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 chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).
+ Default: false
+
+
+
+ chart.resize.handle.background
+ With this you can specify the background color for the resize handle. If you're adjusting the position of the
+ handle then you may need this to make the handle stand out more.
+ Default: null
+
+
+
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 chart 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
RGraph: HTML5 Javascript charts library - Resizing your charts
+
+
+
+ [No canvas support]
+
+
+
+
+ RGraph has the facility to allow you to resize your charts. 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 chart.
+
+
+
+ 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:
+
+
+
+
+
+
+ Charts can only be enlarged down and to the right, so you will get better results if your chart is not placed at the
+ right of the page.
+
+
+
+ The minimum you can resize your charts to is 50% of the original chart 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) 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/schall/static/RGraph/docs/rose.html b/schall/static/RGraph/docs/rose.html
new file mode 100644
index 0000000..e70abbe
--- /dev/null
+++ b/schall/static/RGraph/docs/rose.html
@@ -0,0 +1,593 @@
+
+
+
+
+
+ RGraph: HTML5 Javascript charts library - rose charts documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ chart.gutter.left
+ The left gutter of the chart, (the gutter is where the labels and title are)).
+ Default: 25
+
+
+ chart.gutter.right
+ The right gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.top
+ The top gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.bottom
+ The bottom gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.margin
+ This is the margin that is either side of each segment. This allows you to have a gap between each segment. It is the size
+ of the gap in degrees. It doesn't apply to non-equi-angular Rose charts - only regular and stacked charts.
+
+ Default: 0
+
+
+
+
Colors
+
+
+ chart.colors
+ An array of colors to be used by the chart.
+ Default: ['red', 'rgb(0,255,255)', 'rgb(0,255,0)', 'gray', 'blue', 'rgb(255,128,255)','green', 'pink', 'gray', 'aqua']
+
+
+ chart.colors.alpha
+ Instead of using rgba(), you can use color definitions such as red along with this setting to add
+ transparency.
+ Default: null
+
+
+ chart.colors.sequential
+ Because of the new (as of July 2011) support for grouped Rose charts, the way colors are used has changed. So to have them
+ used in a sequential fashion as before the change, you will need to set this option to true.
+ Default: false
+
+
+
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 chart. 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.font
+The font that the title is rendered in. If not specified the chart.text.font setting is used (usually Verdana)
+Default: null
+
+
+chart.title.size
+The size of the title. If not specified the size is usually 2pt bigger than the chart.text.size setting.
+Default: null
+
+
+chart.title.bold
+Whather the title is bold or not.
+Default: true
+
+
+ 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 chart 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.halign
+ Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
+ aligned left or right.
+ Default: right
+
+
+ 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
+
+ chart.key.linewidth
+ The line width of the surrounding border on the key.
+ Default: 1
+
+
+
+
+
Interactive features
+
+ chart.tooltips
+ An array of tooltips. You can use HTML if you so wish.
+ Default: [] (An empty array)
+
+
+ chart.tooltips.event
+ This is the event that triggers the tooltips. It can be either onclick or onmousemove.
+ Default: onclick
+
+
+ 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 chart 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 chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).
+ Default: false
+
+
+
+ chart.resize.handle.background
+ With this you can specify the background color for the resize handle. If you're adjusting the position of the
+ handle then you may need this to make the handle stand out more.
+ Default: null
+
+
+
+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 chart 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.highlight.stroke
+ If you use tooltips, this controls the colour of the highlight stroke.
+ Default: black
+
+
+ chart.highlight.fill
+ If you use tooltips, this controls the colour of the highlight fill.
+ Default: rgba(255,255,255,0.5)
+
+
+ chart.variant
+ This option can be either stacked (the default) or non-equi-angular. Just because his option is set to
+ stacked does not automatically mean your chart is stacked. If you don't suppy the appropriate data you chart
+ may well appear as a regular Rose chart. Examples of appropriate data:
+
+
+ A regular Rose chart
+
+
+
+myRose = new RGraph.Rose('myCanvas', [8,5,4,8,6,7,2,3,5,8]);
+
+
+
+ A stacked Rose chart
+
+
+
+myRose = new RGraph.Rose('myCanvas', [[2,6],[2,4],[1,5],[4,3],[7,5],[8,3],[4,5],[3,4],[2,6],[4,5]]);
+
+
+
+ A non-equi-angular Rose chart
+
+
+
+myRose = new RGraph.Rose('myCanvas', [[45,23],[45,23],[5,26],[78,4],[49,12],[49,21],[40,18],[48,12],[43,23],[45,12]]);
+myRose.Set('chart.variant', 'non-equi-angular');
+
+
+
+ It is important to note that with a non-equi-angular each "value" is actually an array consisting of two values,
+ as shown. The first value represents the magnitude of the segment (ie how far the segment extends outwards),
+ and the second value represents the size of the segment. The second value is relative to all the other second
+ values - it is not the absolute angle used. The angle is calculated for you.
+
+
+ Default: stacked
+
+
+
+
+
Methods
+
+ obj.getSegment()
+
+ obj.getSegment() makes it easy to determine which segment of the Rose chart was clicked on. It provides:
+
+
+
Originating X coordinate
+
Originating Y coordinate
+
The starting radius of the segment
+
The ending radius of the segment
+
The starting angle (in degrees)
+
The ending angle (in degrees)
+
The numerical index of the segment
+
+
+
+<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 = obj.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[4] /= 57.29;
+ segment[5] /= 57.29;
+
+ context.moveTo(segment[0], segment[1]);
+ context.arc(segment[0], segment[1], segment[3], segment[4], segment[5], 0);
+ context.arc(segment[0], segment[1], segment[2], segment[5], segment[4], true);
+ context.stroke();
+ context.fill();
+
+ e.stopPropagation();
+ }
+ }
+
+ window.onclick = function (e)
+ {
+ RGraph.Redraw();
+ }
+</script>
+
+
+ Important Note
+
+
+ This method was formerly a common object method, called RGraph.getSegment(e), but has now (6th March 2011) been
+ moved to be part of the Rose chart object.
+
+
+
+
+
Stacked Rose charts
+
+ Rose charts can now be stacked, much like stacked Bar charts. For an example see the Rose
+ chart example page. The data should be supplied in the same format as a stacked Bar chart:
+
+
+
+myRose = new RGraph.Rose('myCanvas', [[4,6,2],[8,4,7],[4,3,6],[1,5,6]]);
+
+
+
+
+
Non-equi-angular Rose charts
+
+ Rose charts can be displayed in a non-equi-angular mode. For an example see the
+ Rose chart example page. Instead of a plain array of values (as with a regular
+ Rose chart), each data point should itself be a two element array consisting of the magnitude value and also a relative
+ circular size. This second value is not the actual degrees used - these are calculated. For example:
+
+
+ There is a Rose chart Grow() animation, which can be used with regular and stacked Rose charts (not non-equi-angular charts). You
+ can see an example of it on the effects page.
+
+
+
\ No newline at end of file
diff --git a/schall/static/RGraph/docs/rscatter.html b/schall/static/RGraph/docs/rscatter.html
new file mode 100644
index 0000000..cc33585
--- /dev/null
+++ b/schall/static/RGraph/docs/rscatter.html
@@ -0,0 +1,373 @@
+
+
+
+
+
+ RGraph: HTML5 Javascript charts library - Radial scatter charts documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ chart.gutter.left
+ The left gutter of the chart, (the gutter is where the labels and title are)).
+ Default: 25
+
+
+ chart.gutter.right
+ The right gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.top
+ The top gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.bottom
+ The bottom gutter of the chart, (the gutter is where the labels and title are).
+ 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 chart. 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, if any. Default: null
+
+
+
+
+chart.title.font
+The font that the title is rendered in. If not specified the chart.text.font setting is used (usually Verdana)
+Default: null
+
+
+chart.title.size
+The size of the title. If not specified the size is usually 2pt bigger than the chart.text.size setting.
+Default: null
+
+
+chart.title.bold
+Whather the title is bold or not.
+Default: true
+
+
+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.halign
+ Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
+ aligned left or right.
+ Default: right
+
+
+ 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
+
+ chart.key.linewidth
+ The line width of the surrounding border on the key.
+ Default: 1
+
+
+
+
+
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 chart 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 chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).
+ Default: false
+
+
+
+ chart.resize.handle.background
+ With this you can specify the background color for the resize handle. If you're adjusting the position of the
+ handle then you may need this to make the handle stand out more.
+ Default: null
+
+
+
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 chart 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
+
+ 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: true
+
+
+chart.background.grid.autofit.numhlines
+ When using autofit this allows you to specify how many horizontal grid lines you want. Default: 5
+
+
+ chart.background.grid.autofit.numvlines
+ When using autofit this allows you to specify how many vertical grid lines you want.
+ Default: 20
+
+
+ chart.background.grid.autofit.align
+ If you want to have your grid lines line up with the labels (both X and Y axes), you can set this to true and RGraph will
+ attempt to make the grid lines line up. If you have a chart.hmargin set then the alignment will be thrown out.
+ Default: false
+
+
+ chart.background.image
+ If you want to specify a background image to use on your chart, specify it with this property.
+ Default: null
+
+
+
Labels and text
+
+
+ chart.labels
+ An array of the X labels for the chart.
+ Default: [] (An empty array)
+
+
+ chart.labels.above
+ If true this will show the values of the points above them.
+ Default: false
+
+
+ chart.labels.above.size
+ If you're showing the labels above the points, this controls their size.
+ Default: 8
+
+
+ chart.labels.above.decimals
+ If your points have lots of decimals, you use this option to curtail them.
+ Default: 0
+
+
+chart.ylabels
+ A boolean (true or false) that controls whether the chart has Y labels. Default: true
+
+
+ chart.ylabels.count
+ A value (1, 3, 5 or 10) that controls how many Y labels there are.
+ Default: 5
+
+
+ chart.ylabels.invert
+ Reverses the Y axis so that 0 is at the top, instead of the bottom.
+ Default: false
+
+
+ chart.ylabels.specific
+ You can use this option to give your own Y labels (eg ['Low', 'Medium', 'High'].
+ Default: null
+
+
+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 chart). This can be from 0-90 (degrees)
+ Default: 0 (Horizontal)
+
+
+ chart.labels.specific.align
+ If you are using specific points for X labels, by default the labels are left aligned within its section. With this setting
+ you can center the labels within its section.
+ Default: left
+
+
+
Margins
+
+
+
+
+ chart.gutter.left
+ The left gutter of the chart, (the gutter is where the labels and title are)).
+ Default: 25
+
+
+ chart.gutter.right
+ The right gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.top
+ The top gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.bottom
+ The bottom gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+
Axis properties
+
+
+ chart.xmin
+ The minimum X axis value you wish to set.
+ Default: 0
+
+
+ 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.noendytick
+ Whether to draw an end Y tick. Usually used when combining Scatter charts
+ Default: true
+
+
+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.axis.color
+ The color of the axes. Default: black
+
+chart.noaxes
+ If this is set to true, no axes will be drawn. Default: false
+
+
+ chart.xscale
+ If true then an X scale is drawn instead of X labels.
+ Default: false
+
+
+ chart.xscale.units.pre
+ These are units that are prepended to the number.
+ Default: none
+
+
+ chart.xscale.units.post
+ These are units that are appended to the number.
+ Default: none
+
+
+ chart.xscale.formatter
+ This can be a function, which is passed the object and the number and should return a formatted number (formatted as you wish).
+ Default: null
+
+
+ chart.xscale.numlabels
+ This is a number representing how many X labels there should be when you're using the X scale.
+ Default: 10
+
+
+
Titles
+
+
+chart.title
+ The title of the scatter chart. Default: none
+
+
+
+
+chart.title.font
+The font that the title is rendered in. If not specified the chart.text.font setting is used (usually Verdana)
+Default: null
+
+
+chart.title.size
+The size of the title. If not specified the size is usually 2pt bigger than the chart.text.size setting.
+Default: null
+
+
+chart.title.bold
+Whather the title is bold or not.
+Default: true
+
+
+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.xaxis.size
+ This allows you to specify a size for the X axis title.
+ Default: null
+
+
+ chart.title.xaxis.font
+ This allows to specify a font for the X axis title.
+ Default: null
+
+
+ chart.title.xaxis.bold
+ This controls whether the X axis title is bold or not.
+ Default: true
+
+
+ chart.title.yaxis
+ This allows to specify a title for the Y axis.
+ Default: none
+
+
+ chart.title.yaxis.size
+ This allows you to specify a size for the Y axis title.
+ Default: null
+
+
+ chart.title.yaxis.font
+ This allows to specify a font for the Y axis title.
+ Default: null
+
+
+ chart.title.yaxis.bold
+ This controls whether the Y axis title is bold or not.
+ Default: true
+
+
+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
+
+
+ chart.title.yaxis.position
+ Instead of using the option above you can instead use this option, specifying left or right.
+ Default: left
+
+
+
Scale
+
+
+ chart.scale.formatter
+ To allow thoroughly custom formats of numbers in the scale, you can use this option to
+ specify a function that is used by RGraph to format numbers. This function should
+ handle ALL of the formatting. Eg:
+
+function myFormatter(obj, num)
+{
+ return num + 'F'; // An example of formatting
+}
+myGraph.Set('chart.scale.formatter', myFormatter);
+
+ Default: null
+
+
+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.highlight
+ This controls whether points are highlighted when a tooltip is shown. If you're combining the Scatter with another chart
+ you may need to set this to false.
+ Default: true
+
+
+ chart.tooltips.css.class
+ This is the name of the CSS class the chart 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.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.coords.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.crosshairs.hlines
+ This determines whether the horizontal crosshair is shown.
+ Default: true
+
+
+ chart.crosshairs.vlines
+ This determines whether the vertical crosshair is shown.
+ Default: true
+
+
+
+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 chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).
+ Default: false
+
+
+
+ chart.resize.handle.background
+ With this you can specify the background color for the resize handle. If you're adjusting the position of the
+ handle then you may need this to make the handle stand out more.
+ Default: null
+
+
+
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
+
+
+ chart.line.linewidth
+ This can be either a number or an array of numbers (for multiple lines) and controls the
+ linewidth that is used for the lines.
+ Default: 1
+
+
+
+
+
+
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.halign
+ Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
+ aligned left or right.
+ Default: right
+
+
+ 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
+
+ chart.key.linewidth
+ The line width of the surrounding border on the key.
+ Default: 1
+
+
+
+
+
+
+
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 chart 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
+
+
+ chart.boxplot.capped
+ This stipulates whether the boxplot will have caps on the end of whickers. This could be useful if you're
+ creating a stock chart for example.For more on boxplots, see here.
+ Default: true
+
+
+
+
+
Methods
+
+ obj.getPoint(e)
+
+
+ This method makes it easier to get hold of which point on the Scatter chart has been hovered over. It returns an array of:
+
+
+
+
The X coordinate of the point
+
The Y coordinate of the point
+
The data set. This corresponds to the appropriate dataset (since mutiple datasets can be given to the constructor)
+
The index of the appropriate data point in the set
+
The tooltip (if any) for that particular point
+
+
+ (If the return value is null, then no point is being hovered over.) An example usage is:
+
+
+ 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)
+ For better compatibility with stock charts, you can now specify that the horizontal lines at the ends of the box plot
+ are not shown with chart.boxplot.capped.
+
+
+
+
+
Specific points for labels on the X axis
+
+
+ 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 chart object
+ * @param object data The chart 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:
+
+ With the Scatter chart you can use the oncrosshairs custom event to pull out the crosshair coordinates, like this:
+ The coordinates are only available if you have them displayed.
+
+
+
+function myFunc (obj)
+{
+ var xCoord = obj.canvas.__crosshairs_x__;
+ var yCoord = obj.canvas.__crosshairs_y__;
+}
+RGraph.AddCustomEventListener(myScatter, 'oncrosshairs', myFunc);
+
+
+
\ No newline at end of file
diff --git a/schall/static/RGraph/docs/setconfig.html b/schall/static/RGraph/docs/setconfig.html
new file mode 100644
index 0000000..14ebfb0
--- /dev/null
+++ b/schall/static/RGraph/docs/setconfig.html
@@ -0,0 +1,155 @@
+
+
+
+
+
+ RGraph: HTML5 Javascript charts library - The RGraph.SetConfig() function
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
RGraph: HTML5 Javascript charts library - The RGraph.SetConfig() function
+
+
+
+
+
+ [No canvas support]
+
+
+
+
+
+ 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 chart. It doesn't offer any speed benefits, but it can facilitate reuse better, so that the
+ appearance 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,
+ 'chart.title': 'A chart showing RGraph.SetConfig()'
+ }
+ var bar = new RGraph.Bar('cvs', [48,56,52,49,43,51]);
+ RGraph.SetConfig(bar, config);
+ bar.Draw();
+ }
+</script>
+
+ Thermometer charts, along with progress bars, are a prime candidate for use in a status panel. Much like the progress bars,
+ but the design may be better suited to your application/website etc.
+
+
+
+ chart.gutter.left
+ The left gutter of the chart, (the gutter is where the labels and title are)).
+ Default: 15
+
+
+ chart.gutter.right
+ The right gutter of the chart, (the gutter is where the labels and title are).
+ Default: 15
+
+
+ chart.gutter.top
+ The top gutter of the chart, (the gutter is where the labels and title are).
+ Default: 15
+
+
+ chart.gutter.bottom
+ The bottom gutter of the chart, (the gutter is where the labels and title are).
+ Default: 15
+
+
+
Colors
+
+
+ chart.colors
+ An array of the colors of the actual bars.
+ Default: An array - ['rgb(0,0,255)', '#0f0', '#00f', '#ff0', '#0ff', '#0f0']
+
+
+
+
+
Titles
+
+
+ chart.title.side
+ This is the text that is used as the side title on the left hand side of the thermometer.
+ Default: '' (An empty string)
+
+
+
+
+chart.title.font
+The font that the title is rendered in. If not specified the chart.text.font setting is used (usually Verdana)
+Default: null
+
+
+chart.title.size
+The size of the title. If not specified the size is usually 2pt bigger than the chart.text.size setting.
+Default: null
+
+
+chart.title.bold
+Whather the title is bold or not.
+Default: true
+
+
+ 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: 0.5
+
+
+
Labels and text
+
+
+ chart.value.label
+ This controls whether the Thermometers value is shown in text.
+ Default: true
+
+
+ chart.ylabels.count
+ A value that controls how many Y labels there are. Keep in mind that if you use this it may result in decimals,
+ and to see the full number you may need to use chart.scale.decimals.
+ Default: 10
+
+
+
Shadow
+
+
+ chart.shadow
+ Whether a drop shadow is applied. Default: true
+
+
+ chart.shadow.color
+ The color of the shadow. Default: gray
+
+
+ chart.shadow.offsetx
+ The X offset of the shadow. Default: 0
+
+
+ chart.shadow.offsety
+ The Y offset of the shadow. Default: 0
+
+
+ chart.shadow.blur
+ The severity of the shadow blurring effect. Default: 15
+
+
+
Scale
+
+
+ chart.scale.visible
+ Defaulting to false, this controls whether the scale is visible.
+ Default: false
+
+
+ chart.scale.decimals
+ This allows you to control the amount of decimals that the labels have.
+ Default: 0
+
+
+
Interactive features
+
+
+ chart.adjustable
+ Defaulting to false, this determines whether your bar chart will be adjustable.
+ Default: false
+
+
+ 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 chart will be resizable. Because of the numerous event
+ handlers this has to install code on, This feature is unlikely to work with other dynamic features (the
+ context menu is fine however).
+ 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 colour allowed for annotations.
+ Default: black
+
+
+
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 chart 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
+ Tooltips are a very effective and straight forward way to extend your charts 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 charts 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 point on the chart.
+ 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. For example:
+
+
myBar.Set('chart.tooltips', ['id:myDiv', ...])
+
+
+
+
+
Can I show charts in tooltips?
+
+ [No canvas support]
+
+
+ You can, and with the custom event support that RGraph has, it's reasonably easy. Simply attach your function that
+ creates the chart to the ontooltip event. This allows the tooltip HTML to be created and added to the page
+ so that the code that creates the chart 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 chart.
+
+
+
+ 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.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 chart 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.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.
+ There's also a basic stripped-down example here.
+
+
+
+
+
+
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
+ charts tooltips should use with the property chart.tooltips.css.class. The two charts on this page have
+ different looking tooltips by using this method - the line chart 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 chart 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 chart types where the tooltip is triggered using the onmousemove event.
+ Currently this means the Line chart, Rscatter chart, Scatter chart and Radar chart. It can also
+ be negatively effected when using multiple charts 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 chart 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.labels.count
+ This controls how many labels there are.
+ Default: 10
+
+
+ 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.tickmarks.zerostart
+ If true, labels and tickmarks will start at and show zero.
+ Default: false
+
+
+ chart.min
+ The minimum value. Setting a minimum value allows to show a more detailed progress bar.
+ Default: 0
+
+
+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.left
+ The left gutter of the chart, (the gutter is where the labels and title are)).
+ Default: 25
+
+
+ chart.gutter.right
+ The right gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.top
+ The top gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.bottom
+ The bottom gutter of the chart, (the gutter is where the labels and title are).
+ 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 chart. 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.font
+The font that the title is rendered in. If not specified the chart.text.font setting is used (usually Verdana)
+Default: null
+
+
+chart.title.size
+The size of the title. If not specified the size is usually 2pt bigger than the chart.text.size setting.
+Default: null
+
+
+chart.title.bold
+Whather the title is bold or not.
+Default: true
+
+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 chart 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 chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).
+ Default: false
+
+
+
+ chart.resize.handle.background
+ With this you can specify the background color for the resize handle. If you're adjusting the position of the
+ handle then you may need this to make the handle stand out more.
+ Default: null
+
+
+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 chart 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
+
+
+
+
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.halign
+ Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
+ aligned left or right.
+ Default: right
+
+
+ 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: true
+
+ chart.key.color.shape
+ This can be square, circle or line and controls how the color indicators in the key appear.
+ Default: square
+
+ chart.key.linewidth
+ The line width of the surrounding border on the key.
+ Default: 1
+
+
+
Miscellaneous
+
+ chart.highlight.stroke
+ If you use tooltips, this controls the colour of the highlight stroke.
+ Default: black
+
+
+ chart.highlight.fill
+ If you use tooltips, this controls the colour of the highlight fill.
+ Default: rgba(255,255,255,0.5)
+
+
+ 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.grid.autofit.align
+ If you want to have your grid lines line up with the labels (both X and Y axis), you can set this to true and RGraph will
+ attempt to make the grid lines line up. If you have a chart.hmargin set then the alignment will be thrown out.
+ Default: false
+
+
+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
+
+
+ chart.background.image
+ If you want to specify a background image to use on your chart, specify it with this property.
+ Default: null
+
+
+
Axis properties
+
+
+ chart.noaxes
+ Whether the axes are drawn
+ Default: false (the axes ARE drawn)
+
+
+ chart.noxaxis
+ Whether the X axis is drawn
+ Default: false (the X axis IS drawn)
+
+
+ chart.noyaxis
+ Whether the Y axis is drawn
+ Default: false (the Y axis IS drawn)
+
+
+ chart.xaxispos
+ This determines where the X axis is positioned. If you wish to show negative values then you should set this
+ to center.
+ Default: bottom
+
+
+
Colors
+
+
+chart.strokestyle
+ The color of the outline of the bars. Default: #666
+
+
+ chart.colors
+ An array of the colors of the actual bars.
+ Default: An array - ['green', 'red', 'blue']
+
+
+
Margins
+chart.hmargin
+ The horizontal margin (in pixels) of the chart. Default: 5
+
+
+
+ chart.gutter.left
+ The left gutter of the chart, (the gutter is where the labels and title are)).
+ Default: 25
+
+
+ chart.gutter.right
+ The right gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.top
+ The top gutter of the chart, (the gutter is where the labels and title are).
+ Default: 25
+
+
+ chart.gutter.bottom
+ The bottom gutter of the chart, (the gutter is where the labels and title are).
+ 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 chart). 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 chart. Default: An empty array
+
+chart.ylabels
+ Can be true or false and determines whether the chart has Y axis labels. Default: true
+
+
+
+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 chart, if any.
+Default: null
+
+
+
+
+chart.title.font
+The font that the title is rendered in. If not specified the chart.text.font setting is used (usually Verdana)
+Default: null
+
+
+chart.title.size
+The size of the title. If not specified the size is usually 2pt bigger than the chart.text.size setting.
+Default: null
+
+
+chart.title.bold
+Whather the title is bold or not.
+Default: true
+
+
+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.xaxis.size
+ This allows you to specify a size for the X axis title.
+ Default: null
+
+
+ chart.title.xaxis.font
+ This allows to specify a font for the X axis title.
+ Default: null
+
+
+ chart.title.xaxis.bold
+ This controls whether the X axis title is bold or not.
+ Default: true
+
+
+ chart.title.yaxis
+ This allows to specify a title for the Y axis.
+ Default: none
+
+
+ chart.title.yaxis.size
+ This allows you to specify a size for the Y axis title.
+ Default: null
+
+
+ chart.title.yaxis.font
+ This allows to specify a font for the Y axis title.
+ Default: null
+
+
+ chart.title.yaxis.bold
+ This controls whether the Y axis title is bold or not.
+ Default: true
+
+
+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
+
+
+
+ chart.title.yaxis.align
+ Instead of using the option above you can instead use this option, specifying left or right.
+ Default: left
+
+
+
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.formatter
+ To allow thoroughly custom formats of numbers in the scale, you can use this option to
+ specify a function that is used by RGraph to format numbers. This function should
+ handle ALL of the formatting. Eg:
+
+function myFormatter(obj, num)
+{
+ return num + 'F'; // An example of formatting
+}
+myGraph.Set('chart.scale.formatter', myFormatter);
+
+ 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)
+
+
+
+
+
+
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 chart 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.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.hlines
+ This determines whether the horizontal crosshair is shown.
+ Default: true
+
+
+ chart.crosshairs.vlines
+ This determines whether the vertical crosshair is shown.
+ Default: true
+
+
+
+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 chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).
+ Default: false
+
+
+
+ chart.resize.handle.background
+ With this you can specify the background color for the resize handle. If you're adjusting the position of the
+ handle then you may need this to make the handle stand out more.
+ Default: null
+
+
+
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 chart 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.highlight.stroke
+ If you use tooltips, this controls the colour of the highlight stroke.
+ Default: black
+
+
+ chart.highlight.fill
+ If you use tooltips, this controls the colour of the highlight fill.
+ Default: rgba(255,255,255,0.5)
+
+
+
+chart.axis.color
+ The color of the axis. Default: black
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/schall/static/RGraph/docs/what-is-html5-canvas.html b/schall/static/RGraph/docs/what-is-html5-canvas.html
new file mode 100644
index 0000000..bfce4ac
--- /dev/null
+++ b/schall/static/RGraph/docs/what-is-html5-canvas.html
@@ -0,0 +1,207 @@
+
+
+
+
+
+ RGraph: What is HTML5 canvas?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ HTML5 canvas is a new HTML tag (<canvas>) which is part of the forthcoming HTML5 standard. It allows bitmap
+ drawing which is controlled using Javascript, and is what the RGraph libraries use to draw the charts. You could
+ liken it to a piece of paper which is part of your HTML page, on to which you can draw. Because you use Javascript to
+ draw on the canvas it becomes part of your page and allows interaction very easily.
+
+
+
+ Canvas uses a "fire and forget" drawing methodology - there is no DOM that is maintained, so if you want to alter something
+ you will probably have to redraw the entire canvas. The lack of a DOM means that canvas is fast to draw on and very
+ responsive - important when you're providing iteractive charts to your users.
+
+
+
+
History
+
+ HTML5 canvas was originally introduced by Apple for use in WebKit (which is used in their Safari browser and Google Chrome).
+ It is now part of the HTML5 specification and supported by the majority (if not all) of modern web browsers.
+
+
+
+
Example
+
+ [No canvas support]
+
+
+
+ The example to the right is a very simple case of drawing a few primitives on the canvas. The dotted border is
+ provided by CSS to illustrate the drawing area.
+
+
+
+ The <canvas> tag itself is defined with just a width/height/id attribute. The one here also has a style attribute
+ to make it more evident in the page. The HTML used is shown below:
+
+
+ The content in between the tags is not shown if the browser supports canvas, and is if the browser doesn't. This provides
+ for fallback content if the users browser doesn't support canvas.
+
+
+
HTML5 Canvas compared to SVG
+
+ HTML5 canvas can be compared (a bit) to SVG - which is a vector based alternative for drawing in HTML pages. SVG is
+ at a more abstract level than canvas and maintains a record of everything drawn, using a DOM. This is then converted
+ to a bitmap when shown. In the above example, if the blue squares coordinates are changed (eg in an animation),
+ then the whole canvas needs to be cleared and redrawn for each frame.
+
+
+
+ As a result of not having to maintain a DOM <canvas> is fast to draw on and display to the browser.
+
+
+
+
Browser support for HTML5 canvas
+
+ The majority of current browsers support canvas, including IE9. Earlier versions of MSIE have some support through
+ compatibility layers provided by Google and Mozilla. One such library - ExCanvas - is provided in the RGraph archive
+ allowing IE8 to display the graphs, albeit without many of the dynamic features. You can read more on this
+ here.
+
+ 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
+
+
+
+
+ [No canvas support]
+
+
+
+
+
+ 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 chart 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+ and MSIE9, 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 chart demonstrating this technique here. Note that browser support for this technique is limited.
+
+
+
+
+
+
Area mode
+
+ [No canvas support]
+
+
+ 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 chart 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/schall/static/RGraph/docs/zoom_thumbnail.html b/schall/static/RGraph/docs/zoom_thumbnail.html
new file mode 100644
index 0000000..50b5866
--- /dev/null
+++ b/schall/static/RGraph/docs/zoom_thumbnail.html
@@ -0,0 +1,135 @@
+
+
+
+
+
+ RGraph: HTML5 Javascript charts library - Zooming your charts; a circular thumbnail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
RGraph: HTML5 Javascript charts library - A circular thumbnail demonstration
+
+
+
+
+ [No canvas support]
+
+
+
+ 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 (5th September 2011) only Firefox 4+ and IE9+ support it.
+