This is basic demo of using Web Workers (which are child threads) to generate a random value which is posted back to the main thread (this page with event script "gauge_event.js"). The value is then used to update the Gauge. This sample has been developed based on a sample shown on the demos of RGraph.

Parameter for creation of chart

{rgraph type="Gauge" min="0" max="1" value="0" chart_name="chart" 
 event_script="media/plg_content_rgraph/js/gauge_event.js" scaleDecimals="1" }cvs{/rgraph} 

 

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