Hello folks, I'm trying to implement the real time bar chart, but I do not have any initial data properly, I'm getting the data through ajax call to json each second, but when I use the .push method to update my chart, nothing happens.
That is my chart:
$('#mem-chart').epoch({ type: 'time.bar', axes: ['top', 'right', 'bottom', 'left'], data:[{ label: "Memory", values: [{time: parseInt(new Date().getTime()/1000), y: 78}}]}] });
Hello folks, I'm trying to implement the real time bar chart, but I do not have any initial data properly, I'm getting the data through ajax call to json each second, but when I use the .push method to update my chart, nothing happens.
That is my chart:
$('#mem-chart').epoch({ type: 'time.bar', axes: ['top', 'right', 'bottom', 'left'], data:[{ label: "Memory", values: [{time: parseInt(new Date().getTime()/1000), y: 78}}]}] });
And here is where a call push method:
$('#mem-chart').push([{time: parseInt(new Date().getTime()/1000), y: data.freeMemory}]);