Sign in to follow this  
FusionCharts Support

Problem in Javascript while XML data Updating

Recommended Posts

Hi FC,

 

 

 

I am displaying chart with some default data,and i am updating the XML data it is giving JavaScript error as

 

 

 

chart1.setDataXML is not a function

 

 

 

My Code is :-

 

 

 

 

 

 

FusionGadgets

 

 

 

 

 

 

var myChart = new FusionCharts("../Charts/AngularGauge.swf", "myChartId", "350", "200", "0", "0");

 

myChart.setDataXML("&dataXML=");

 

myChart.render("chartdiv");

 

 

 

 

 

 

 

 

 

 

function update()

 

{

 

chart1=getChartFromId("myChartId");

 

chart1.setDataXML("&dataXML=");

 

 

 

}

 

Share this post


Link to post
Share on other sites

hi,

To update you chart from JavaScript you need to register the chart with JS this can be done while defining th chart...i am modifying your code :

var myChart = new FusionCharts("../Charts/AngularGauge.swf", "myChartId", "350", "200", "0", "1");

This 1 registers the chart with JS and you can now do interactions with the chart using javaScript.

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