Pie graph data update

How can I update automatically the pie chart data via scripting. I just need to show the alarm percentage present in the system which is categorized by alarm priority (critical, high, medium and low alarms)

image

I would do this by creating a dataset expression tag using runScript.
runScript would execute a script (in the gateway scripting project) that runs system.alarm.queryStatus, then transforms the information into the dataset format you want.

By using a gateway expression tag, you’re ensuring that the data is only ever calculated once. Then you just bind your Vision pie chart to the dataset tag directly.

1 Like