Browser support
Summary: Information about the browser support for RGraph. Browser support is excellent - desktops and mobile devices all support the canvas and SVG tags. There's also a link below to PhantomJS which allows you to create views of webpages without using a browser.
- HTML5 canvas & Microsoft Internet Explorer (MSIE)
- Other devices
- Creating your charts without a browser
Since the charts are made using HTML5 features (the new SVG and canvas tags), browser support includes:
- Mozilla Firefox 3.0+
- Google Chrome 1+
- Apple Safari 3+
- Opera 9.5+
- Microsoft Internet Explorer 9+ (see note)
- Edge
- iPhone (text support from iOS v4+)
- iPad (text support from iOS v4.2+)
The HTML5 canvas and SVG tags are part of the HTML5 standard, and all of the above browsers have some sort of support for them.
HTML5 canvas, HTML5 SVG & Microsoft Internet Explorer (MSIE)
Microsoft Internet Explorer 9 added support for the <canvas>
and
<SVG>
tags at the start of 2011. Older versions of MSIE are no longer supported
by RGraph.
Also note that as of version 5.27 the responsive()
function was switched
from using the window.onresize
function to using media queries that are installed
via the JavaScript API (the window.matchMedia()
function). With Internet Explorer this
function is only supported from version 10.
However the older version of the function that uses the window.onresize
function is
still available in the RGraph.common.core.js
file. Simply search for the phrase
RGraph.responsive_old
and change it to RGraph.responsive
. The way that
the functions are created means that this will overwrite the newer responsive()
function and the end result will be that you use the old version of the
responsive()
function.
The two functions use different styles of configuration so their configurations are incompatible. If you want to use the old function you can of course - just keep in mind that the conditions should be listed in reverse order - from smallest screen condition to largest screen condition. Like this:
.responsive([
{maxWidth: 800,width:400,height:200,options:{marginInner: 5,textSize:10}},
{maxWidth: null,width:600,height:250,options:{marginInner: 10,textSize:12}}
]);
Other devices
Other devices (eg mobile devices) may support or may be intending to support the canvas and/or the SVG tags as part of their HTML5 support.
Typically the newer a device or its OS is the higher the chances are that it has support for the HTML5 canvas and SVG tags.
Creating your charts without a browser
If you wish to make charts without a browser or user involved - eg from a script - there's something called PhantomJS that you can use to make images from webpages automatically.
There's a HOWTO document here that goes through the process of using PhantomJS. This document, despite being in the canvas section of the website, applies also to SVG based charts.
You can also find a little bit of information about PhantomJS on the download page .