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

More »

 

Version 7.01 released
Version 7.01 (released in October 2025) is the latest version of RGraph and now includes a new tree structure object. The accompanying Treemenu object can then turn the object into a fully dynamic tree menu. You can read the API documentation for the tree on the main API documentation page and see an example of the Treemenu feature by following this link...

More »

 

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.01, 8th October 2025) 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 »

Ingraph labels

This page shows the various options for ingraph labels. Ingraph labels allow you to point out certain datapoints on your chart and add labels. The ingraph labels can be set like this:

obj.set({
    labelsIngraph: [,,'Hoolio',,'Olga']
});

If a simple string isn't enough for you then you can give an array of options for each label if you want more control.

obj.set({
    labelsIngraph: [,,['Hoolio', 'red', 'yellow', -1, 60],,'Olga']
});

The array can consist of:

Example Line chart

[No canvas support]

This example code produces a simple Line chart with two ingraph labels on it.

<script>
    new RGraph.Line({
        id: 'cvs',
        data: [4,5,6,3,2,5,6,4,2,4,1],
        options: {
            title: 'Line chart with ingraph labels',
            xaxisLabels: ['Jim','Gail','Hoolio','Kev','Olga','Jimmy','Paul','Jake','John','Fred', 'Jobe'],
            xaxis: false,
            yaxis: false,
            backgroundGridVlines: false,
            backgroundGridBorder: false,
            labelsIngraph: [,,['Hoolio', 'red', 'yellow', -1, 60],,'Olga'],
            spline: true
        }
    }).draw();
</script>

Example Bar chart

[No canvas support]

This example code produces a simple Bar chart with two ingraph labels on it.

<script>
    new RGraph.Bar({
        id: 'cvs',
        data: [4,5,6,3,2,5,6,4,2,4,1],
        options: {
            colors: ['red'],
            title: 'Bar chart with ingraph labels',
            xaxisLabels: ['Jim','Gail','Hoolio','Kev','Olga','Jimmy','Paul','Jake','John','Fred', 'Jobe'],
            labelsIngraph: [,,['Hoolio', 'red', 'yellow', -1, 60],,'Olga'],
            xaxis: false,
            yaxis: false,
            backgroundGridVlines: false,
            backgroundGridBorder: false
        }
    }).draw();
</script>

Example Scatter chart

[No canvas support]

This example code produces a simple Scatter chart with three ingraph labels on it.

<script>
    new RGraph.Scatter({
        id: 'cvs',
        data: [
            [[5,15],[24,30],[27,3],[23, 5]], // First dataset
            [[4,12]]                         // Second dataset
        ],
        options: {
            title: 'Scatter chart with ingraph labels',
            xaxisLabels: ['W1','W2','W3','W4'],
            labelsIngraph: [,,['Hoolio', 'red', 'yellow', -1, 60],'Olga','Fred'],
            xaxisScaleMax: 31,
            xaxis: false,
            yaxis: false,
            backgroundGridVlines: false,
            backgroundGridBorder: false
        }
    }).draw();
</script>

Example bar chart (dot variant)

[No canvas support]

This example code produces another Bar chart - this time using the dot variant of the Bar chart.

<script>
    new RGraph.Bar({
        id: 'cvs',
        data: [4,5,6,3,2,5,6,4,2,4,1],
        options: {
            colors: ['black'],
            title: 'Bar chart with ingraph labels (dot variant)',
            xaxisLabels: ['Jim','Gail','Hoolio','Kev','Olga','Jimmy','Paul','Jake','John','Fred', 'Jobe'],
            labelsIngraph: [6,['Foo', 'red', 'yellow', null, 75],3,'Bar'],
            variant: 'dot',
            labelsIngraph: [,,['Hoolio', 'red', 'yellow', -1, 60],,'Olga'],
            xaxis: false,
            yaxis: false,
            backgroundGridVlines: false,
            backgroundGridBorder: false
        }
    }).draw();
</script>