I’ve got a collection where I’m storing ping time data and the date / time it was run.
I’m using High Charts from the maazalik:highcharts package.
I can get the chart to populate, but I pass a variable to my publish function to limit the publish to 100 of the last pings for the URL the user clicks on.
So something like
Meteor.publish("pingStatus", function(myUrl) {
return PingStatus.find({ url: myUrl }, { sort: { runOn: -1 }, limit: 100 }});
});
When I click a row on a table, I pass the URL of the row clicked, to get the last 100 ping times for that url. I then open a modal with the high chart on it, and display a line graph of the ping time data.
It works, but I’ve noticed sometimes the data is not being refreshed after the publish function updates the data. I’ve tried using a timeout to give it time to get the new data, but it just isn’t working.
Is there a way to get the data in the highcharts object to use my reactive source? I’m using a Session.set to create the object, then Session.get to get it and use it in the high charts object, but still I’m seeing it not update the data.
I can post more code if needed.