Sample of an interactive Chart Application

This chart shows a measurement for downloads. I have added two buttons to trigger the measurement by calling a small javascript which issues a download request, calculates the timings and posts the result. The event script (see parameter event_script), which adds an events listener, catches the post and updates the meter chart.

 

[No canvas support]>

 

Installation of this Sample

Insert Script-tag for javascript measurement program into your Joomla Article:
<script src="/media/plg_content_rgraph/js/demo.js" type='text/javascript' ></script>
Having done this, code rgraph plugin-tags:
{rgraph type="Meter" max="100" value="0" labelsValueTextUnitsPost=" Mbps" title="Your Download Speed" width="600"
height="300" chart_name="chart" event_script="media/plg_content_rgraph/js/meter_event.js" titleSize="11"
colorsGreenColor="Gradient(rgba(0,128,0,0.3):rgba(0,128,0,0.4):rgba(0,128,0,0.8):rgb(0,102,34))"
colorsYellowColor="Gradient(rgba(255,191,0,0.3):rgba(255,191,0,0.4):rgba(255,191,0,0.8):rgba(230,170,0,1.0))"
colorsRedColor="Gradient(rgba(204,0,0,0.3):rgba(204,0,0,0.4):rgba(204,0,0,0.8):rgba(204,0,0,1.0))"
needleColor="rgba(77,77,77,0.9)" labelsValueDecimals="2" labelsValueUnitsPost=" Mbs" labelsValueText="true"
labelsValueTextSize="11" marginBottom="30"}chart{/rgraph}

And finally insert html-tags to define buttons for controlling application:
<button type="button" onclick="measure_speed('php-apps/RGraph/images');" >Start Measurement</button>
<button type="button" onclick="postMessage(0, '*');">Reset</button>
The measurement program uses 5MB sized Image "31120037-5mb.jpg" (you may have a look at it and download it). Directory for image needs to be added as parameter for the called measurement program in onclick-parameter of first button.
 
Important: If you want to test this sample via copy/paste, ensure that you paste with option "paste as plain text" otherwise imbedded html-codes may invalidate your input.
go back...

Visitors

Today: 32
Yesterday: 70
This Week: 251
Last Week: 590
This Month: 1,374
Last Month: 2,235
This Year: 6,739
Total: 239,332
0239332
Germany 30.9% Germany
USA 22.8% USA
France 3.3% France
Italy 2.7% Italy
Indonesia 2.1% Indonesia
Poland 2.0% Poland
Netherlands 1.8% Netherlands

Total:

209

Countries

Weather

Weather in Dublin

19th April, 2024 - 13:31
Overcast Clouds
57°F 54°F min 59°F max
6:47 20:14
Humidity: 77 %
Wind: 13.8 mph North-West
Pressure: 1,019 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.