Sign in to follow this  
andrei9992000

rendering chart from external .as class

Recommended Posts

Hello,

 

 

 

I'm trying to load an external xml MS chart from a custom class I made. The XML loads fine however the chart would not render/display. I have attached my main, xml as well as my class code.

 

 

 

Please let me know what the issues is.

 

 

 

Thanks,

 

 

 

Andrei

main2.zip

Share this post


Link to post
Share on other sites

Hi,

 

 

 

Please find the attached modified code.

 

 

 

Modified in your code:

 

 

 

1. Added : import com.fusioncharts.core.charts.MSLine2DChart; in extendChart.as

 

 

 

2. Modified draw function in extendChart.as

 

 

 

public function buildAndDisplay()

 

{

 

 

 

var thisclass = this;

 

 

 

var xml:XML = new XML();

 

xml.ignoreWhite=true;

 

xml.onLoad = function(success)

 

{

 

if (success)

 

{

 

mainChart = new MSLine2DChart( thisclass.movieContainer , 3, 550, 425, 0, 0, true, "EN", "noScale");

 

mainChart.setXMLData(this);

 

mainChart.render();

 

stop();

 

}

 

}

 

xml.load(xmlFile);

 

}

MainModified.zip

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

You are most welcome.

Keep smiling and keep FusionCharting. :)

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