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 »

 

SQLiteEditor for PHP
The SQLite Editor for PHP software is a tool which will help you and/or your users administer and maintain your SQLite databases. Built as a tool that you can easily provide to your users, there's no danger of them damaging your database.

More »

 

Version 7.20
Version 7.20 (released in June 2026) is the latest version of RGraph and the major change in this version is an update to the default values of properties making for better looking charts without having to set any properties. Read more about this and other changes in the changelog.

Download »

 

Download
Get the latest version of RGraph (version 7.20, 9th June 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 »

 

Latest forum posts
These are the latest support forum posts that have been posted or updated.


16th June, Rachel
I have a question about the 3D Bar chart

12th June, Marco
Should I use SVG or canvas for the charts on my website?

9th June, Richard
New version of RGraph: version 7.20

3rd June, Patrick
Question about installing RGraph

1st June, Ouja
How do I add a click event to a bar in my Bar chart?

Support forum »

 

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 »

A vertical line Scatter chart

There's now a better way to draw vertical line charts and that's to use the Horizontal Bar chart [documentation]. There's quite a few options for it (including a spline mode) and there's a couple of demos for it in the download archive (hbar-vertical-line.html and hbar-vertical-line-multiple.html). There's also a demo of an animated vertical Line on the RGraph blog.
[No canvas support]

Vertical Line charts are not supported natively in RGraph however they can be achieved using the Scatter chart (and the Horizontal Bar chart). With the Scatter chart, unlike the Line chart, you can specify the x-axis and y-axis coordinates and a connecting line can be shown as in the example.

Below is the code that's necessary to achieve the Vertical Line chart. The y-axis labels are specific and used to show the labels for the chart whilst an x-axis scale is enabled to show the magnitude of values. The maximum values are set manually - so you may want to add code that determines these based on the data - as a normal Line chart would.

Read the comments in the code sample below to find out more information.


This goes in the documents header:
<script src="RGraph.common.core.js"></script>
<script src="RGraph.scatter.js"></script>
Put this where you want the chart to show up:
<canvas id="cvs" width="400" height="550" style="float: right">
    [No canvas support]
</canvas>
This is the code that generates the chart - it should be placed AFTER the canvas tag(s):
<script>
    // Create the Scatter chart but configure it in such a way that it has
    // the appearance of a vertical Line chart. One configuration option
    // that is used here is the X-axis scale - which can be used on any
    // Scatter chart instead of regular labels.
    new RGraph.Scatter({
        id: 'cvs',
        data: [[76, 6.5],[34,5.5],[12,4.5],[48,3.5],[43,2.5],[14,1.5],[5,0.5]],
        options: {
            xaxisScaleMax: 100,
            yaxisScaleMax: 7,
            textSize: 14,
            line: true,
            lineLinewidth: 3,
            backgroundGridHlines: false,
            yaxisLabelsSpecific: ['', 'Monday','', 'Tuesday','', 'Wednesday','', 'Thursday','', 'Friday','', 'Saturday','', 'Sunday',''],
            marginLeft: 110,
            xaxisScale: true,
            tickmarksStyle: null
        }
    }).draw();
</script>