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.

Installation

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.:
    colors="Gradient(#fff:grey:red),Gradient(rgba(10,10,10,0.6):blue:blue:blue)"
    
    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 Scatter chart with the lasso option
  29. A combined chart
  30. Drill in Chart with Tooltips
  31. A Pie chart capable of drilldown
  32. 3d Bar chart with multiple rows
  33. A Line Chart with logarithmic Scale
  34. A Bar Chart with Context Menu
  35. A Bubble Chart
  36. An animated Radar Chart
  37. A clickable interactive Fuel chart
  38. Funnel chart with an interactive key
  39. A basic Gantt chart
  40. A basic Odometer
  41. A 3D Rose chart
  42. A basic Waterfall chart
  43. A Gauge Chart
  44. A basic Radial Scatter Chart

 

Version 2.1.10 (Build Level 2.1.10.4): For scatter charts some improvements have been made, to ease the creation of scatter data. Now you may use the "tooltip" property for scatter charts.

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

  • A significant change has been done how the responsive clauses on charts are built - settings is now put in the main configuration of the chart instead of calling the responsive function after calling the draw function.
  • You can currently have rounded corners on your Bar chart by setting the corners property to round - you can now control whether the left and right corners are rounded individually with the cornersRoundLeft and cornersRoundRight properties. You can also set the radius of the corners individually as well with the cornersRoundLeftRadius and cornersRoundRightRadius properties
  • The Pie chart now has a new set of labelsInside properties for use when you're showing a Donut chart.
  • A new feature has come to the Scatter chart - the lasso options. These options, when enabled, allow you to draw rectangles around some (or all) of the points on your chart and use their properties.
Please read more Infos about this release on changelog of RGraph.

Version 2.1.10 (Build Level 2.1.10.1) 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 2.1.9.1) 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 2.1.8.2) 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 2.1.8.0) 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 2.1.7.1) 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 2.1.7.0) 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 2.1.6.5 if runninng on Joomla4 the calling of deprecated methods has been changed and corrected.

Version 2.1.6 (Build Level 2.1.6.4) - 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 2.1.6.3) - 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 2.1.6.1) - 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 2.1.5.6) 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 2.1.5.5) 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 2.1.5.4) 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 2.1.5.2) 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 2.1.4.1) 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 2.1.3.3) Code has been updated to be able to use Bootstrap V5 together with Joomla Version 4. Version 2.1.3 (Build Level 2.1.3.2) 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 2.1.2.2 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 2.1.2.0 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 2.1.1.0) now supports RGraph's version 525. With it major extensions for tooltips have been implemented.

Version 2.1.0 (Build Level 2.1.0.0) 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 2.0.0.1 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 1.2.4.2 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 1.2.2.5) uses RGraph's Version 4.67 javascript library

Release 1.2.2 now uses RGraph's version 4.66 javascript library

With Build Level 1.0.0.3 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 1.0.0.6 supports defining and using context menus for your charts.

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

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

Code delivered with version 1.1.0 (build level 1.1.0.0) 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

 

Acknowledgements

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.

Visitors

Today: 27
Yesterday: 21
This Week: 142
Last Week: 274
This Month: 1,167
Last Month: 1,355
Total: 228,341
0228341
Germany 30.1% Germany
USA 23.8% USA
France 3.3% 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

Total:

208

Countries

Weather

Weather in Ashburn

29th September, 2023 - 23:00
Overcast Clouds
68°F 66°F min 69°F max
13:03 0:56
Humidity: 79 %
Wind: 6.9 mph North
Pressure: 1,017 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.