Sign in to follow this  
miqbal

StackedColumn2D chart not publishing correctly

Recommended Posts

Hi,

 

 

 

I have this code working for MSColumn2D chart but when ever I put in the StackedColumn2D Flash gives the following code while publishing.

 

 

 

The class or interface 'com.fusioncharts.core.charts.StackedColumn2D' could not be loaded.

 

 

 

Help needed urgently.

 

 

 

var strXML:String = "[chart yAxisName=Active Borrowers' xAxisName='Year/Quarter' showBorder='0' bgAlpha='0,0' palette='1' useRoundEdges='1' canvasBgAlpha='100]";

 

 

 

//Add data to chart

 

strXML = strXML + "[categories][category label='" + _root.receive.datatoFlash_peer_1_1_lastyear + "/" + _root.receive.datatoFlash_secondlastquarter + "'/][category label='" + _root.receive.datatoFlash_lastyear + "/" + _root.receive.datatoFlash_lastquarter + "'/][/categories]";

 

strXML = strXML + "[dataset seriesName=CFI]" + "[set value='" + _root.receive.datatoFlash_peer_1_1_lastyear + "'/][set value='" + _root.receive.datatoFlash_peer_2_1_secondlastyear + "'/][/dataset]";

 

strXML = strXML + "[dataset seriesName=MFB]" + "[set value='" + _root.receive.datatoFlash_peer_1_2_lastyear + "'/][set value='" + _root.receive.datatoFlash_peer_2_2_secondlastyear + "'/][/dataset]";

 

strXML = strXML + "[dataset seriesName=MFI]" + "[set value='" + _root.receive.datatoFlash_peer_1_3_lastyear + "'/][set value='" + _root.receive.datatoFlash_peer_2_3_secondlastyear + "'/][/dataset]";

 

strXML = strXML + "[dataset seriesName=NGO]" + "[set value='" + _root.receive.datatoFlash_peer_1_4_lastyear + "'/][set value='" + _root.receive.datatoFlash_peer_2_4_secondlastyear + "'/][/dataset]";

 

strXML = strXML + "[dataset seriesName=RSP]" + "[set value='" + _root.receive.datatoFlash_peer_1_5_lastyear + "'/][set value='" + _root.receive.datatoFlash_peer_2_5_secondlastyear + "'/][/dataset]";

 

strXML = strXML + "[/chart]";

 

var xmlData:XML = new XML(strXML);

 

import com.fusioncharts.core.charts.StackedColumn2D;

 

 

 

var chartContainerMC:MovieClip = _root.right_panel_graph.graph_movie.graph.createEmptyMovieClip("ChartHolder", 1);

 

 

 

var Chart:StackedColumn2D = new StackedColumn2D(chartContainerMC, 1, 340, 164, 20, 15, false, "EN", "noScale");

 

 

 

Chart.setXMLData(xmlData);

 

 

 

Chart.render();

Share this post


Link to post
Share on other sites

Sorry, I found the problem. I wasn't spelling the filename correct when importing the class, but now after its publishing correctly the chart is not showing up at all. Is there an XML error in my code?

Share this post


Link to post
Share on other sites

Really need help on this one. I have been trying this for two days now and it won't work at all. It even works fine with StackedColumn3DChart but its not working with StackedColumn2DChart. I have even replaced this file with the original copy I downloaded but its not working.

Share this post


Link to post
Share on other sites

Hi,

try the trick.

You need to edit the following lines :

1.

import com.fusioncharts.core.charts.StackedColumn2D;

make it

import com.fusioncharts.core.charts.StackedColumn2DChart;

2. Likewise ,

var Chart:StackedColumn2D = new StackedColumn2D(chartContainerMC, 1, 340, 164, 20, 15, false, "EN", "noScale");

will be

var Chart:StackedColumn2DChart = new StackedColumn2DChart(chartContainerMC, 1, 340, 164, 20, 15, false, "EN", "noScale");

 

Hope, things will work out now.

IF you have any problem like this, you can open the related .as file and see the class name defined in it and use it while importing and defining.

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