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 »

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]