I'm using fusioncharts v3.9.0 with AngularJs v1.4.3. It works OK, but I need the charts to update in real time. In order to achieve this I followed this tutorial: feeding and retrieving data using javascript. This is my html using the fusioncharts directive:
<div fusioncharts
id="mychartContainer"
chartid="mychart"
width="99%"
height="98%"
type="area2d"
datasource="{{datasource1}}",
events="events1">
</div>
And my controller event looks like this:
var events1 = {
"rendered": function (evt, args) {
evt.sender.chartInterval = setInterval(function () {
//Get reference to the chart using its ID
var chartRef = evt.sender;
$http.post("mypost")
.success(function (response) {
if (response.success === true) {
var last = response.results[0];
var strData = "&label=" + last.label + "&value=" + last.value;
chartRef.feedData(strData);
}
});
}, 5000);
},
"disposed": function (evt, arg) {
clearInterval(evt.sender.chartInterval);
}
}
So I'm getting an error when chartRef.feedData(strData);: TypeError: chartRef.feedData is not a function.
This is a console.log of chartRef:

Thanks in advance!