Keen.io graph / query update

The following docs make me feel like my code should work, however I am getting an undefined error, I am sure this is something simple but I cannot hug it.

https://github.com/keen/keen-js/blob/master/docs/visualization.md#automatic-updates

var clicks_keen = new Keen.Query("count", {
eventCollection: "clicks",
groupBy: "campaign.id",
interval: window.interval,
timeframe: window.timeframe
});

clicks_keen.refresh();

      

+3


source to share


1 answer


Turns out bebraw was correct. You need to store the result of client.run () in a variable and call this object to update.



You also need to store the original query in a variable, although you need this object to update any actual data for the query (change timeframe, etc.).

+3


source







All Articles