I've been playing with Google Charts today and incorporating them into HSTouch screens, these are very easy to incorporate into your own screens and its free to use !
You just create a link to the Google Charts website with your data, labels, etc embedded in it and it returns a chart.
In the text object of a element on a screen I've put in the following code to read the link details from a device string, this will cause it to read the string from device D20 and go and get that web page/chart.
The contents of device D20 are updated every hour by a script which creates the Google Charts link with the relevant data embedded in it that I wish to be displayed, in this example I'm showing a graph of the last 24 hours worth of electricity usage.
Image below is a partial screen shot of a screen that I've just dumped this chart on for now, haven't managed to figure out the transparency option yet !
Attached is a copy of the script that I run every hour.
I hope that someone finds this interesting and it's free !
You just create a link to the Google Charts website with your data, labels, etc embedded in it and it returns a chart.
In the text object of a element on a screen I've put in the following code to read the link details from a device string, this will cause it to read the string from device D20 and go and get that web page/chart.
Code:
[$SCRIPT=&hs.DeviceString("D20")]
Code:
http://chart.apis.google.com/chart?chtt=Electricity Usage per hour (KWh)&cht=bvg&chs=400x100chd=t:65.3999999999996,66.4999999999999,65.3000000000006,141.3,85.0999999999999,67.7,68.3,82.6000000000001,80.9000000000005,81.2999999999995,154.9,181.8&chxt=x,y&chxl=0:|08:00|09:00|10:00|11:00|12:00|13:00|14:00|15:00|16:00|17:00|18:00|19:00|1:|0|1|2
Attached is a copy of the script that I run every hour.
I hope that someone finds this interesting and it's free !
Comment