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 show charts on your website.

More »

 

Download
Get the latest version of RGraph (version 6.17) from the download page. There's also older versions available, minified files and links to cdnjs.com hosted libraries.

More »

 

License
RGraph can be used for free under the GPL or if that doesn't suit your situation there's an inexpensive (£99) commercial license available.

More »

The filledAccumulative Line chart setting

View example on CodePen
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

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();

An example of filledAccumulative=false

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();

Back to the Line chart documentation