Sign in to follow this  
RredCat

I Can't Update Cylinder Widget

Recommended Posts

Hi,

 

I try to use Cylinder widget on my project.

It'has worked perfect till I try update charts on fly.

I have created widget in the next manner:

 

var chartName = "myChartId<%:name %>";
var myChart = new  FusionCharts("../../Content/FusionGauge/Cylinder.swf", chartName, "150",  "200", "0", "1");
myChart.setDataXML("<chart  showBorder='0' cylFillColor='" + '<%:color %>' + "' lowerLimit='0'  upperLimit='100' numberSuffix=' ltrs.'  bgColor='FFFFFF'><value>" + <%:mainTankLevel %> +  "</value></chart>");
myChart.setTransparent(true);
myChart.render("chartdiv<%:name %>");

 

This part works perfect.

 

But I try to update charts. It doesn't work. I tried to write next bellow (under first part)

var chartObj = getChartFromId(chartName);
chartObj.setDataXML("<chart showBorder='0' cylFillColor='FF2631' lowerLimit='0' upperLimit='100' numberSuffix=' ltrs.' bgColor='FFFFFF'><value>50</value></chart>");

 

This still doesn't work and I catch next error. That "setDataXML" method doesn't exist for chartObj.

 

Please, let me answer as soon as possible. I requested to buy this widget and don't sure that it works in proper way now.

Share this post


Link to post
Share on other sites

Hi,

 

Please refer to the following link for further details on the method of updating the chart and see if it helps.

Ref.- http://www.fusioncha...setDataXML.html

 

Hope this helps. :D

 

Thanks Sanjukta,

 

But I've seen this sample and make my code according to way described in this document.

Looks like than getChartFromId gets incorrect object

Share this post


Link to post
Share on other sites

Hi,

 

Could you please send us the erroneous sample as an attachment so that we can test it?

 

Looking forward to your feedback.

 

Yeah. I catch a root of issue.

I try to update chart on Load event and chart wasn't created yet.

Sorry for inconvenience

 

Are there any way to check that chart is loaded?

Edited by RredCat

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