Hi we are using paid version of Fusioncharts.
We use a websocket connection to update live data of Gauges.
While we try to set the new value to the rendered guage we are getting this error
Uncaught TypeError: Object [object Object] has no method 'setData'
When we do a console.log of the chartinstance we can see the setData method on the object. But the same is not accessible when we try to use the function.
Please help us proceed.
The sample code is
var gauge2 = new FusionCharts("AngularGauge.swf", "gauge2_dial", "280", "140", "0");
var data = {
"chart": {
"lowerlimit": "0",
"upperlimit": "100",
"lowerlimitdisplay": "Bad",
"upperlimitdisplay": "Good",
"numbersuffix": "%",
"showvalue": "1"
},
"colorrange": {
"color": [{
"minvalue": "0",
"maxvalue": "75",
"code": "FF654F"
}, {
"minvalue": "75",
"maxvalue": "90",
"code": "F6BD0F"
}, {
"minvalue": "90",
"maxvalue": "100",
"code": "8BBA00"
}]
},
"dials": {
"dial": [{
"value": "40"
}]
}
}
gauge2.setJSONData(data);
gauge2.render("gauge2");
gauge2.setData(1,80);