php-rgraph - Content Plugin for Joomla


rgraph logo

This document describes the function and features of php-rgraph plugin for Joomla!. php-rgraph has been developed to ease the inclusion of charts within your articles. It is based upon the Javascipt solution of RGraph. To get more information on RGraph visit Home of RGraph.

You can use php-rgraph to generate lots of diffferent types of chart, i.e. line, bar, and pie charts in 2D or 3D. For each chart type you can specify attributes such as size, colors, and labels, and so on. You can feed the data for your chart via manual entry, from database, local file system, from remote (or local) webserver or even from Google Sheets. With this plugin, you will be easily creating content article with dynamic charts defined by yourself. For complete set of chart types and data entries you can use, see sections below.


To include a chart created by php-rgraph into your article you must include the plugin tag {rgraph} with parameters to describe the attributes of your chart and a chart-id of your chart. You denote the end of the plugin with the end-of-plugin tag {/rgraph}. The plugin tag has the format of

{rgraph parm1="value" parm2="value" } chartid {/rgraph} .

Parameter values have to be enclosed by double quotes ("value"). The plugin has been setup already via its plugin parameters with lots of attributes for your charts (of course you can ovewrite those with your own setup or globally change them for your needs). To give you an idea how it works - you would request a chart via (settings below contain only mandatory parameters - all other attributes will be set by default plugin parameters):

"{rgraph data="50,60,70,80,90,60|109,120,100,130,140,100" title="Sample 1"} sample01{/rgraph}"

The "data"-tag describes your data for the chart. Each number will have to be separated by comma. If you have more than one datagroup you must seperate them by the or-sign "|" (the sample above has two datagroups). To see the chart setup with above settings just click here.


After you have downloaded installation zip-file, run the install via Joomla's admin backend. You will have to enable (publish) the plugin to use it. Via admin backend you also may set your site's default layout for your charts (e.g. fonts, font-sizes for text and title or axis layouts).

Description of php-rgraph Plugin Parameters

php-rgraph uses two kinds of parameters, one set is directly related to the plugin and second set is related to RGraph's chart properties (now about 580 different single attributes). To put detailed descriptions of all parameters into one single webpage makes it a bit difficult to find a specific option. Therefore I've restructured this reference to selectively provide the information.
Please select from form below a parameter - it will be shown on selection.


How to specify parameters

Values for parameters have to be put into double quotes. All parameter names are case sensitive, you will have to take care, that you use the correct name for them.

Though all parameter values are entered as strings, php-rgraph will try to transform values into their correct type (e.g. a number entered as string will be set to a float-value or integer value).

This will work, if you follow these rules:
  1. booleans may be specified as "1" or "true" and "0" or "false" (e. g. sql_labels="0")
  2. arrays must be entered as komma separated values. (e.g. data="20,30,40,50")
  3. multiple arrays will have to be separated by the or-sign "|" (e.g. data="10,20|20,5|30,40")
  4. colors may be specified as 4-byte or 7-byte value (e.g. backgroundColor="#fff"). Or you use the "rgb" or "rgba" html5-notation - e.g. highlightFill="rgba(255,255,255,0.5)" Or you use the gradient syntax which makes your charts a breeze. The syntax is purposefully very simple: "Gradient(color1:color2:color3:color4)" - e.g.:
    And that's all you have to specify instead of a color. The colors are parsed once when the .draw() method is first called and converted to real canvas gradients.
  5. null values you may assign a null-value using parm-name="null" or for arrays if you omit values - e.g. labels="one,two,,four"

If parameters are unknown or not correctly specified, they will be ignored.

rgraph - plugin parameter

select a plugin parameter, then click button to see a description

php-RGraph - Properties Reference for supported Charts

Properties of all charts implemented by php-RGraph

The javacript framework of RGraph has lots of configuration options for its various chart types. php-RGraph has implemented 580 single properties right now. Fortunately most of the defaults of those 580 properties are so meaningful that one can live with them and should not be deterred by their sheer number.

To get more information besides references shown here, have a look at my samples or see the docs at RGraph's site.


Select a Chart Type and Property, then click button to see descriptions

Select Chart Type

Examples using php-rgraph

beispielWith the samples provided here, you may get some hints or get some ideas how you could use content plugin php-rgraph. With the lastest releases vou now have lots of options how to setup charts and chart attributes. Please click on the links to see them.

  1. simple Bar Chart in a modal Window
  2. Content in a modal Window
  3. simple hbar chart
  4. A 3D Progressive Bar
  5. A Semi-circular Progress chart
  6. Using Effects for Bar charts
  7. Line chart with calculated Data
  8. Line chart built from csv Data
  9. Line chart with labeling of the line
  10. Line chart with HBar Background
  11. A vertical Line Chart
  12. Line chart with data from Server
  13. Usage of background image for charts
  14. 3d bar with data from MySql database
  15. Access of Remote Data
  16. 3d bar chart created/displayed as Image
  17. Update bar chart with a click
  18. stacked 3d bar built from csv data
  19. Stacked 3d bar built from Google Sheets Data
  20. 3D Bipolar chart
  21. Bipolar chart showing world population by age
  22. 3d Pie chart with various Properties
  23. 3d Donut chart same settings as 3d Pie chart
  24. A Meter Chart Application
  25. A Gauge Chart Application
  26. A basic Scatter chart
  27. A combined Scatter chart
  28. A combined chart
  29. Drill in Chart with Tooltips
  30. A Pie chart capable of drilldown
  31. 3d Bar chart with multiple rows
  32. A Line Chart with logarithmic Scale
  33. A Bar Chart with Context Menu
  34. A Bubble Chart
  35. An animated Radar Chart
  36. A clickable interactive Fuel chart
  37. Funnel chart with an interactive key
  38. A basic Gantt chart
  39. A basic Odometer
  40. A 3D Rose chart
  41. A basic Waterfall chart
  42. A Gauge Chart
  43. A basic Radial Scatter Chart


Version 2.1.10 (Build Level Code has been updated to be able to use RGraph's Version 6.12.

  • This Version now supports RGraphs's Semi-circular Progress charts.
  • There's now a better way to produce vertical Line charts. Previously these were achieved by using the Scatter chart and adjusting the data so that a vertical line was produced. Now, however, you can use the Horizontal Bar charts to get a vertical line in a simpler way.
  • There's also a new set of properties - the highlightDataset properties which make doing this a breeze and makes it very familiar if you're already comfortable with how RGraph charts are configured.
Please read more Infos about this release on changelog of RGraph

Version 2.1.9 (Build Level Code has been updated to be able to use RGraph's Version 6.11. For this release the title code has been rewritten - so check your charts and ensure that they appear OK.
The interface to retrieve Google sheets data has been reworked with tis release. New chart options for pie charts, scatter charts and bubble charts have been introduced - please read more Infos about these on changelog of RGraph.

Version 2.1.8 (Build Level Code has been updated to be able to support the new property "horizontalLines". With this setting you can add horizontal lines to your chart. This feature is designed to add an average line indicator to your chart. Usage is explained in the plugin parameter description of this reference.

Version 2.1.8 (Build Level Code has been updated to be able to use RGraph's Version 6.10. The title option has had a little massaging for this release so check that your charts are appearing correctly. E.g. with it the charts have all the titleSubtitle* options added to them.
See more Infos about this new version of RGraph on changelog of RGraph.

Version 2.1.7 (Build Level Code has been updated to be able to use RGraph's Version 6.09.
See more Infos about this new version of RGraph on changelog of RGraph.

Version 2.1.7 (Build Level Code has been updated to be able to use RGraph's Version 6.08. A significant change in this release is a switch from using accessible text by default to using native canvas text. The defaults in the libraries have also been set to not use the textAccessible feature.
See more Infos about this new version of RGraph on changelog of RGraph.

With build if runninng on Joomla4 the calling of deprecated methods has been changed and corrected.

Version 2.1.6 (Build Level - new parameter to suppress error messages "suppress_error" has been provided. You may set its default via plugin parms.

Version 2.1.6 (Build Level - Code has been updated to be able to use RGraph's Version 6.07. The "colorsLeft" and "colorsRight" options have been added for bipolar charts.
See more infos about version 6.07 of RGraph on changelog of RGraph.

Version 2.1.6 (Build Level - Code has been updated to be able to use RGraph's Version 6.05. The "labelsAngled" feature that dealt with adding angled labels to your Line chart has now been added to the main Line chart library. This feature allows you to add a set of labels to your chart that follow the up and down undulations of your Line chart (not just sitting above each point as the "labelsAbove" labels do).
See more infos about version 6.05 of RGraph on changelog of RGraph.

Version 2.1.5 (Build Level This version was supplemented by the new plugin parameter "reverse_csv". It enables data that is provided in cvs format to be reversed.

Version 2.1.5 (Build Level Code has been updated to be able to use RGraph's Version 6.04
Previously, the canvas tooltips used a fade-in effect when they were shown. Now the charts have three options for the "tooltipsEffect" property: "slide", "fade" or "none". You also may now set the default setting for the "tooltipsEffect" property via php-rgraphs's plugin parameter.
See more Infos about this new version of RGraph on changelog of RGraph.

Version 2.1.5 (Build Level Code has been updated to be able to use RGraph's Version 6.03 See more Infos about this new version of RGraph on changelog of RGraph.

Version 2.1.5 (Build Level Code has been updated to be able to use RGraph's Version 6.01 See more Infos about this new version of RGraph on changelog of RGraph.

Version 2.1.4 (Build Level Code has been updated to be able to use RGraph's Version 6. From RGraph's Version 6 release features from JavaScript ES6 will start being used. This means that older browsers will no longer be supported. See more Infos about this new version of RGraph on changelog of RGraph. Version 2.1.3 (Build Level Code has been updated to be able to use Bootstrap V5 together with Joomla Version 4. Version 2.1.3 (Build Level now supports RGraph's version 5.28. See more Infos about this new version of RGraph on changelog of RGraph. With this version you may now create and use modal popup windows not only for charts but also for any other types of content (pls. have a look at new plugin parameter "popup_window").

With Build Level a new javascript library for scatter and bubble charts is used. To create bubble charts new parameter have been introduced: "bubbleData", "bubbleWidth", "bubbleMin" and "bubbleMax".

Build Level introduces the "responsive Feature" of RGraph. With a new parameter "responsive" you define how chart should be displayed if browser size (client size) is changed or if you are using a device like smartphone or tablet with smaller screensizes. More Infos via php-rgraph plugin Parameter and RGraph Responsive Function.</a

Version 2.1.1 (Build Level now supports RGraph's version 525. With it major extensions for tooltips have been implemented.

Version 2.1.0 (Build Level has been restructured and tested to be used with Joomla V4. All media (javascript and styles) have been moved to directory "media/plg_content_rgraph" (incl. sample and demo scripts).

Build level has now support for formatted tooltips. This feature was introduced with RGraph's Version 522.

I've deployed a reworked new Version of php-rgraph, version 2.0.0. With it RGraph's version 524 Javascript API has been built in. This API changed or deleted a major part of chart property names or property functions. This means if using this version you must rework/check all your charts in order to work correctly.

With build-level using parameter "create_png" you may create/display charts as images.

Release 1.2.4 now uses RGraph's version 4.68 javascript library and fixes some minor bugs.

Version 1.2.3 now uses Joomla's namespaced API which has been used since Joomla version 3.3. php-rgraph therefore already has been tested and runs with joomla version 3.9 and will run with joomla version 4.

A problem with php V7.2 has been fixed and release 1.2.2 (Build Level uses RGraph's Version 4.67 javascript library

Release 1.2.2 now uses RGraph's version 4.66 javascript library

With Build Level a new function has been released. With parameter "log_scale" set to true, you may request a logarithmic scale for your chart's data.

Build Level supports defining and using context menus for your charts.

Build Level fixes a bug defining color arrays using "rgb" or "rgba" format.

Build Level fixes a bug within php-rgraph's mysql db-interface.

Code delivered with version 1.1.0 (build level has been optimized and restructured.

With Version 1.2.0 you now may create drill in charts. See my samples (sample 17. and sample 18.), how to use this new feature.

With Version 1.2.1 latest version of RGraph (Version 4.56) is used. With string-tags, "title" und "sql" you now can provide variables, which will be replaced with their current values when the article is requested.


Download php-rgraph content plugin

php-rgraph is free software - however you have to adhere to the GPL-license conditions to use it. Please learn more about GPL and free software at GNU Org.

To download rgraph please click the download button:

Version 2.1.10

 download php-rgraph plugin for Joomla



Without the excellent work done by the developers of RGraph my development of a Joomla plugin to build RGraph charts, would not have been possible. Therefore many thanks to the RGraph development team! They have produced an outstanding piece of work. e of work.


Today: 1
Yesterday: 22
This Week: 274
Last Week: 278
This Month: 51
Last Month: 1,275
Total: 223,676
Germany 29.8% Germany
USA 24.3% USA
France 3.2% France
Italy 2.7% Italy
Indonesia 2.2% Indonesia
Poland 2.0% Poland
Spain 1.8% Spain
Netherlands 1.8% Netherlands
India 1.8% India





Weather in Ashburn

3rd June, 2023 - 6:52
Scattered Clouds
72°F 67°F min 76°F max
11:45 2:30
Humidity: 64 %
Wind: 6.9 mph North
Pressure: 1,011 hPa
Visibility: 32,808 ft
We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.