MENU
.net Powerful JavaScript charts
About
RGraph is a JavaScript charts library based on HTML5 SVG and canvas. RGraph is mature (over 18 years old) and has a wealth of features making it an ideal choice to use for showing charts on your website.

More »

 

Version 7.10 released
Version 7.10 (released in January 2026) is the latest version of RGraph and contains various updates to the code which you can see on the changelog page. There's also a big tidy up in terms of comments and a significant change to the way that the internal code is referenced which should lead to a performance improvement in effects and animations.

Download »

 

New HTML datagrid
In the April 2025 (v6.21) release a new datagrid object was added. This makes it easy to add static or dynamic data tables to your pages. It can be used whether you use the canvas or SVG libraries or entirely standalone.

Read more »

 

Download
Get the latest version of RGraph (version 7.10, 18th January 2026) 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.

Download »

 

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.

More »

Using the animate() function

The animate function has been updated to version 7 to accommodate the increased pixel space on the canvas tag if scaling is enabled (which is now on by default). This means that you shouldn't have to update the values that you pass to the function.

The animate function is an older function that was previously a part of RGraph that has now been rewritten and reinstated to RGraph. It can be used in a similar fashion to the jquery animate function but instead of animating CSS properties, it animates (numeric) RGraph properties. The example shown below uses the trace effect and then when that has finished it animates the size of the tickmarks so that they grow from nothing to their correct size. The marginInner is also animated at the same time and starts at zero and grows to 15. Here's the source code:

<script>
    new RGraph.Line({
        id: 'cvs',
        data: [4,8,6,3,5,2,4],
        options: {
            backgroundGridVlines: false,
            backgroundGridColor: '#eee',
            backgroundGridBorder: false,
            textSize: 16,
            textColor: 'black',
            xaxisLabels: ['John','Fred','Lucy','Idan','Lois','Pete','Jenn'],
            marginInner: 0,
            xaxis: false,
            yaxis: false,
            spline: true,
            tickmarksStyle: 'dot',
            tickmarksSize: 0,// This is the initial size of the tickmarks
        }
    }).trace({frames: 60}, function (obj)
    {
        obj.animate({
            tickmarksSize: 7,
            marginInner: 15
        });
    });
</script>

Above, the animate function is run upon completion of the trace effect, however by using method chaining you can just as easily have them run concurrently like so:

<script>
    new RGraph.Line({
        id: 'cvs',
        data: [4,8,6,3,5,2,4],
        options: {
            backgroundGridVlines: false,
            backgroundGridColor: '#eee',
            backgroundGridBorder: false,
            textSize: 16,
            textColor: 'black',
            xaxisLabels: ['John','Fred','Lucy','Idan','Lois','Pete','Jenn'],
            marginInner: 0,
            xaxis: false,
            yaxis: false,
            spline: true,
            tickmarksStyle: 'dot',
            tickmarksSize: 0, // This is the initial size of the tickmarks
        }
    }).trace({frames: 60}).animate({
        tickmarksSize: 7,
        marginInner: 15
    });
</script>