Frequently Asked Questions for RGraph
What is RGraph?
What operating systems is RGraph compatible with?
Does RGraph work well with all webservers?
What server-side frameworks does it integrate with?
Does RGraph use SVG or canvas to render the charts?
Both! RGraph started out as a canvas based library but ever since summer 2016 there are some shiny new SVG based charts too. So regardless of you preference or requirements RGraph will be able to accommodate you.
What capabilities does RGraph have?
RGraph has been around since 2008 and as such has a lot of abilities. Anything from tooltips, animations and events to zooming, resizing and annotation if you need it then RGraph may well have a feture that supports it. And if it doesn't then the API is quite straight-forward so writing code that integrates with RGraph is easy to do.
Will RGraph support AJAX, CSVs, Google Sheets or databases?
It supports all of these things! In terms of AJAX, CSV files and Google Sheets there's specific functionality available to you to help with the integration and with databases there's an integration guide for you to read in the installation documentation
Which should I use - canvas or SVG?
The canvas charts in RGraph are a lot more mature and they also have a few more dynamic features. On the other hand SVG has advantages when it comes to things such as the quality of the appearance when viewing on smaller resolutions. So it really comes down to what your use case and preferences are. If you need a certain feature like resizing - then only the canvas libraries support this. On the other hand if you just want a chart and that chart has to look good on small or large screens then SVG may be the way to go.
Can I use RGraph as a component of X?
RGraph is licensed using the MIT license so you can therefore do anything with it or make it a component of whatever software you want to.
What canvas charts does RGraph support?
The base canvas charts that RGraph supports are: Bar, Bipolar, Donut, Fuel, Funnel, Gantt, Gauge, Horizontal Bar, Horizontal Progress, Line, Meter, Odometer, Pie, Radar, Rose, Radial Scatter, Scatter, Semi-circular Progress, Thermometer, Vertical Progress and Waterfall. Many more types of chart can be created by either customising or combining the base types.
What other features does RGraph provide?
The RGraph canvas libraries has thing such as: Tooltips, events, context menus, annotation, zoom, resizing, adjusting, dynamic updates, keys, AJAX support, CSV support, Google Sheets support,, animation, 3D charts, and accessible text. You can read more on these features (and more) in the features documentation.
Is canvas faster than SVG?
Technically - yes it is. This can be seen in the way that canvas supports native video playback whereas SVG doesn't (though there are some interesting uses of SVG in-conjunction with HTML5 video). But SVG does provide functionality that canvas doesn't - such as events on objects. This does cut down the amount of code that you need to achieve the same functionality which makes things significantly easier to write.
Can I show wildly different values on my Bar/Line/Scatter chart?
Yes. What you can do is use a logarithmic scale. So instead of having values of 0/20/40/60/80/100 it could have values of 0/10/100/1,000/10,000/100,000. There's a demo of this here.
Does the Bar chart support an offset Y axis?
Yes. You can have an offset Y axis (where it's not precisely in the centre) and there's an example here.
- How can I import data from my CSV file/Google Sheets,AJAX,database?
Can I combine different chart types? eg A Bar and Line chart
You can. E ver since the ObjectRegistry was added to RGraph you could combine whatever different types of chart that you wish on to the same canvas tag. For example here's a combined Bar and Line chart.
when were SVG charts added to RGraph?
RGraph started out as a canvas only charts library but since mid-2016 SVG charts have been added. You can read more about the SVG charts in the SVG section of the website.
What SVG charts does RGraph support?
The SVG support is newer than canvas and as such there's fewer charts - and they are: Bar, Bipolar, Funnel, Horizontal Bar, Line, Pie, Radar, Rose, Scatter, Semi-circular Progress and Waterfall. Like the canvas types the SVG charts can be combined or customised so that more types of charts are possible.
Why are there fewer SVG libraries than canvas libraries?
That simply comes down to one simple thing: Age. RGraph was started in 2008 as a canvas charting library and SVG support was only added in 2016. So that's eight whole years that canvas has over SVG - and in that eight years it's done plenty of maturing.
Is SVG any harder to use than canvas?
Not at all! If you have a look at the source code for the numerous demo pages you'll see that the RGraph source code used for creating both types of charts is very similar. Some of the option names are different - a little better organised because the SVG libraries are newer - but SVG is certainly not harder to use. If anything RGraph smooths over the differences from the two technologies (SVG and canvas).