I´m using https://github.com/jtblin/angular-chart.js (and angular 1.5 components) and trying to simulate "realtime data"
<canvas id="base" class="chart-line"
chart-data="$ctrl.realTimeClicks"
chart-labels="$ctrl.domains"
chart-colors="$ctrl.colors"
chart-dataset-override="$ctrl.realTimeClicksOptions">
</canvas>
and in the component
this.realTimeClicks = [];
setInterval( function() {
var random = ( Math.floor( ( Math.random() * 10 ) + 1 ) );
this.realTimeClicks.push(random);
}, 2000 );
But I get "Cannot read property 'push' of undefined"