About
RGraph is a JavaScript charts library based on
HTML5 SVG and canvas. RGraph is mature (over 15 years
old) and has a wealth of features making it an ideal
choice to use for showing charts on your website.
Download
Get the latest version of RGraph (version 6.18, 1st June 2024) from
the download page. You can read the changelog here. There's also older versions available,
minified files and links to cdnjs.com hosted libraries.
License
RGraph can be used for free under the GPL or if
that doesn't suit your situation there's an
inexpensive (£129) commercial license available.The filledAccumulative Line chart setting
Introduction
This page shows how the setting filledAccumulative
affects your charts. The first chart shown below has
it enabled (the default), so the lines, in effect, sit on top of
each other. The second chart 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 totals, whereas the second chart below
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.
An example of filledAccumulative=true
<script>
new RGraph.Line({
id: 'cvs',
data: [
[4,3,6,7,8,4,9,5,1,3,4,3],
[4,5,1,6,2,3,4,5,8,1,9,7]
],
options: {
textSize: 16,
xaxisLabels: ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
filledColors: ['rgba(255,0,0,0.3)', 'rgba(0,0,255,0.3)'],
filled: true,
filledAccumulative: true,
linewidth: 0.01,
title: 'A filled line with filledAccumulative=true',
titleSize: 16,
shadow: false,
spline: true,
tickmarksStyle: null,
xaxis: false,
yaxis: false,
backgroundGridBorder: false,
backgroundGridVlines: false
}
}).draw();
</script>
An example of filledAccumulative=false
<script>
new RGraph.Line({
id: 'cvs',
data: [
[4,3,6,7,8,4,9,5,1,3,4,3],
[4,5,1,6,2,3,4,5,8,1,9,7]
],
options: {
textSize: 16,
xaxisLabels: ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
filledColors: ['rgba(255,0,0,0.3)', 'rgba(0,0,255,0.3)'],
filled: true,
filledAccumulative: false,
title: 'A filled line with filledAccumulative=false',
titleSize: 16,
shadow: false,
linewidth: 0.01,
spline: true,
tickmarksStyle: null,
xaxis: false,
yaxis: false,
backgroundGridBorder: false,
backgroundGridVlines: false
}
}).draw();
</script>