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.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 »

Addition to the Bipolar library


Posted by Olivier at 11:22 on Sunday 23rd January 2022 [link]
Hi team,

I just improved bipolar graph to enable different colors left vs. right.
I would like to contribute to RGraph improvement but I don't know if that is possible and how to proceed.

Good day,
Olivier

Posted by Richard at 19:28 on Sunday 23rd January 2022 [link]
Feel free to post it in a reply to this message and I'll take a look at it.

Posted by Olivier at 10:07 on Sunday 6th February 2022 [link]
Here it is. In the bipolar.js

First proposal : be able to set a background color for text area
I declared a new property
     textBackground: null,

In drawLabels function
     if (properties.textBackground != null) {
this.context.fillStyle = properties.textBackground;
this.context.fillRect(this.marginLeft + this.axisWidth, this.marginTop, barAreaWidth, barAreaHeight);
     }

Second proposal : be able 2 differents set of colors Left and Right
I declared 2 new properties
    leftColors: null,
    rightColors: null,

In draw function, I added
    if (properties.leftColors === null)
properties.leftColors = properties.colors;
    if (properties.rightColors === null)
properties.rightColors = properties.colors;

And in drawLeftBars and drawRigthBars, I replace respectively colors by leftColors and rightColors.

Hope it is clear, Let me know if you need further information.
Have a good day

Posted by Richard at 15:01 on Sunday 6th February 2022 [link]
Thanks for that. I've implemented the left/right colors for the canvas Bipolar chart - the SVG Bipolar will be done soon.

Regarding the other change - is it supposed to set a background color for the labels in the center of the chart? A background color for the whole of the marginCenter area or just the text?

[Replies are closed]