Sign in to follow this  
jega@jega.in

method setData Undefined

Recommended Posts

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);

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

We have tested with the latest FusionWidgets XT v3.3.1sr3 version and it seems "setData()" working fine from our end.

 

Could you please try once by using the below line of code?

FusionCharts("gauge2_dial").setData(1,80);

Hope this helps!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this