Installation information

  • Stack of coins - money money money! The benefits of using RGraph
    Read about the benefits of using RGraph to show charts on your website.

    Benefits include things such as saving money, better website performance and it also allows you to create pretty charts!

  • What web browsers does RGraph support? Browser support for RGraph
    Information about browser support for RGraph.

    For years now browser support for canvas and SVG has been good with most of both desktop and mobile browsers able to display them.

  • Getting started with RGraph Getting started with RGraph
    How to start with RGraph - a basic chart. This bit of information is an easy way to understand how RGraph works and how you can use it on your website.

    • Suggested structure for RGraph
      A suggested structure for the RGraph libraries. Having a good structure makes things easy to handle and makes things easier for future developers.

    • Alternative structure for RGraph
      An alternative structure for the RGraph libraries that could also be used. This layout includes dates in the filenames so can make upgrading to a newer RGraph release quicker and easier.

    • The $p(), $a(), $c() and $d() functions
      RGraph has a few useful debug functions that you can use while making your charts.

      These functions can make finding problems with your code easier. So much so in fact that you may want to add them to your own code.

  • Integrating RGraph Integration with server-side scripting
    Learn how to add RGraph to your server-side scripts.

    This page has examples of using the PHP MySQL, MySQLi and PDO extensions.

    Learn how to make AJAX requests, saving your (canvas) charts as images and how to read CSV data.

    • Integration with PHP and MySQL using the MySQL extension
      Information about integrating RGraph with the older PHP MySQL extension. This extension has been deprecated for some time but is still in use and is an easy way to connect to your database.

    • Integration with PHP and MySQL using the MySQLi extension
      Information about integrating RGraph with the PHP MySQLi extension. The MYSQLi extension is a newer way that PHP has available to connect to your MySQL database server.

    • Integration with PHP and MySQL using the PDO extension
      Information about integrating RGraph with the PHP PDO extension.

      Like the MySQLi extension, PDO is a newer way to fetch data from your database server, but PDO is more of an abstraction interface that can connect to other database servers as well as MySQL.

    • Making AJAX requests
      Information about making AJAX requests with RGraph.

      RGraph has some AJAX functions that are available to both the SVG and canvas libraries that make it much easier to fetch data by AJAX.

      If they're not good enough for you though you can always use other AJAX libraries or things such as the jQuery $.ajax() function.

    • Saving the chart as an image on the server
      How to save your charts as an image on the server. Like all (client-side) JavaScript RGraph runs in your browser. An easy way of fetching data from your server is to use AJAX.

      In some cases this can actually improve performance too as the amount of data that is sent by the server is smaller.

  • Improving the speed of your charts Improving the performance of your charts
    Hints and tips on how to improve the speed of your charts and also your entire website.

    The tips here are aimed at increasing the speed of your charts but many can also be applied across your whole site (eg using gzip compression) giving your website and your charts even more of a speed boost.

    Studies have shown that having a faster website can make your users happier and can then lead on to bigger sales figures and turnover!

    • A reasonable performance strategy
      What's a good way to improve the speed of your charts?

      Well not every tip or tweak needs to be used so this is what you should consider doing first as these tips give the biggest bang for your buck.

    • General website performance tools
      Links to a few useful more general website speed tools which can be used to gauge the effectiveness of your speed tweaks.

      These tools can be used to increase the speed of your entire website - not just your RGraph pages. You'll find that the PageSpeed tool, in particular, is very useful.

    • Note about performance and HTTP/2
      A note about how HTTP/2 means that some of the performance tweaks that are listed here will become less necessary.

      The main thing to remember with HTTP/2 is that it takes place over a single connection (per server) so keep that in mind when planning your performance tweaks.