Using Gage Pro Version and Multiple Gages

I’m using roughly 30 gages and all built dynamically using webix. All gages have a unique id value. I have a timer that refreshes every 30 seconds. To prevent flashing, I want to implement the webix.ajax(url) method. What is the best way to extrapolate my existing gage id’s and call url’s with the gage id in it’s url path?

Hello,

Perhaps the best yet optimized way is to return all values from one request as an array (or just hash) of data, for example

let values =  { id1:value1, id2:value2, ... };

And then map these values to the corresponding gage widgets.
There is a queryView method that can return an array of views which matches some criteria:

$$("layout").queryView({ view:"gage" },"all").map(view => {
    let myValue = values[view.config.id];
    if (myValue)
        view.setValue(values[view.config.id])
});

The same approach can be used to perform a separate request for each view. However, without a very special use-case, a request per each gage does not seem to be the best solution.

I basically did this through use of the data load that calls an MVC JsonAction for .NET and returns the json object data for all objects, and cleanly updates all the gages at specified intervals in javascript. Thanks!