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.

More »


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.

More »


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 »

My Horizontal Bar chart isn't showing all of the totals for the labelsAbove option

Posted by JamesT at 01:52 on Saturday 16th December 2023 [link]
I've created a Horizontal Bar chart and used labelsAbove to get totals printed on the right, but it seems that RGraph stops showing the totals after the 12th bar. Please see attached image.

Is this a bug, or do I need to adjust the options? Here is the code:

var data = [ [155,52],
[143,54] ];

        var labels = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23];

        // Draw the chart
        var bar = new RGraph.HBar({
            id: 'cvs',
            data: data,
            options: {
key: ['First Time','Second Time'],
keyPosition: 'margin',
title: 'Average Time by Hour',
xaxisScaleMax: 300,
xaxisLabelsCount: 6,
backgroundGridVlinesCount: 6,
backgroundGrid: true,

textSize: 12,
textColor: 'gray',
xaxisColor: 'gray',
yaxisColor: 'gray',

marginTop: 60,
labelsAbove: true,
labelsAboveUnitsPost: 'm',
labelsInBar: true,
titleSize: 18,
titleBold: true,
colors: ['red','#0c0'],
grouping: 'stacked',
yaxisLabels: labels,
colorsStroke: 'rgba(0,0,0,0)',
labelsInbar: true,
labelsInbarColor: 'white',
labelsInbarBold: true
Attached image:
Attached image

Posted by Richard at 10:15 on Saturday 16th December 2023 [link]
I think that I may have fixed this in the latest, as yet unreleased, 6.15 version. So you could try the libraries that you can get from GitHub and see if that resolves the issue for you (your chart works fine on my development website). You can get the libraries here:


Let me know how that works out for you. If you need more development libraries you can get them here:


(click on a file and then click on the RAW link).


Posted by JamesT at 23:24 on Monday 18th December 2023 [link]
Those 6.15 files appear to have fixed the issue, thanks Richard. What's the ETA on a 6.15 stable release?

Posted by Richard at 23:27 on Monday 18th December 2023 [link]
The weekend maybe - or perhaps sooner, I went through all the pages on the site checking that they looked OK today. ~1500 pages. That was fun...

[Replies are closed]