Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Here is an example of an icon with a point.  The second line of code shown below is a finstack.eval which calls 4 points.   This query can be changed to output a different result.  

var ractiveComponent    = query('stackRactive');

finstack.eval("readAll(point and his and curVal).get(0..3)").then(function(data) {
    var points      = [];
    var realPoints  = data.result.toObj();
    
    realPoints.forEach(function(p,index) {
        points.push({
            mainIcon    : "icon-location",
            iconColor   : "#c9b4e0",
            backgroundColor : "#ff0000",
            mainText    : p.navName,
            mainValue   : fin.Data.PointUtil.GetPrettyValue(p),
            btIcon      : "icon-clockwise",
            btIconText  : "Refresh",
            view        : 'icon',
            range       : "today()",
            pointId     : p.id,
            index       : index,
            original    : p,
            fold        : "live" 
        });
    });
    
    ractiveComponent.ractive.set({points:points});
    ractiveComponent.ractive.get('updatePoll').call(ractiveComponent);
    
}, function(err) {
    console.error(err);
});


  • No labels