Update Bar Chart with click

This is a sample how to update a chart dynamicly. If one of buttons below is clicked it will trigger an event script in file "media/plg_content_rgraph/js/test_event.js", which then will update current chart.

Parameter for creation of chart

{rgraph chart_name="chart" type="Bar" title="Update Chart with a click" width="600" height="300"
 data="5000,5000,5000,5000,6000,7000,8000,8000,11000,9000" colorsSequential="true" yaxisScaleMax="12000"
 variant="3d" marginBottom="105" marginLeft="70" event_script="media/plg_content_rgraph/js/test_event.js" }cvs{/rgraph}   

Setting of Buttons:

<button type="button" onclick="postMessage('7000,8000,7000,4000,5000,8000,6000,10000,9000,10000', '*');">update</button>
<button type="button" onclick="postMessage('5000,5000,5000,5000,6000,7000,8000,8000,11000,9000', '*');">reset</button>  


[No canvas support]>


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...


Today: 48
Yesterday: 34
This Week: 82
Last Week: 620
This Month: 1,778
Last Month: 1,635
Total: 220,574
Germany 29.7% Germany
USA 24.6% USA
France 3.1% France
Italy 2.7% Italy
Indonesia 2.2% Indonesia
Poland 2.0% Poland
Spain 1.8% Spain
India 1.8% India
Netherlands 1.7% Netherlands





Weather in Ashburn

22nd March, 2023 - 0:46
Clear Sky
13°C 10°C min 15°C max
12:12 0:22
Humidity: 27 %
Wind: 2.1 km/h South
Pressure: 1,028 hPa
Visibility: 10,000m
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.