Sign in to follow this  
NChart

Multi-level Pie Chart: hoverText problem

Recommended Posts

Hi,

 

I'm using various Multi-level Pie Chart loaded in a container SWF; each graph is called from a menu and loaded in a different frame with loadFusionCharts method:

 

 

 

MovieClip.prototype.loadFusionCharts = function (strSWFName, chartStartLevel, strURL, strXML, intChartWidth, intChartHeight, intChartStartX, intChartStartY)

 

{

 

//If no starting level has been defined for the chart, we automatically assume it to be 1000.

 

if (chartStartLevel == undefined || chartStartLevel == null)

 

{

 

chartStartLevel = 1000;

 

}

 

//Now, if dataURL has been specified, we use dataURL else dataXML

 

if (strURL != "" && strURL != undefined && strURL != null)

 

{

 

_root.dataURL = strURL;

 

}

 

else

 

{

 

//we use strXML (where strXML contains the full XML data)

 

_root.dataXML = strXML;

 

}

 

//chartWidth & chartHeight specifies the size of FusionCharts chart

 

_root.chartWidth = intChartWidth;

 

_root.chartHeight = intChartHeight;

 

//Set initial x and y position for the chart

 

//i.e., (where the chart would start from in this movie).

 

_root._FCXShift = intChartStartX;

 

_root._FCYShift = intChartStartY;

 

//Set the plot level.

 

_root._FCLastLevel = chartStartLevel;

 

//Finally, load the movie

 

this.loadMovie (strSWFName);

 

 

 

};

 

_root.loader_mc.loadFusionCharts ("graph1.swf", 1, "graph1.xml", null);

 

 

 

The only problem I'm facing is that the hover text tip is displayed always for the first graph I select; for example if I select "Graph1" the hover text is always displayed correctly but doesn't appear for the other charts I choose.

 

 

 

Am I wrong in coding?

 

 

 

Thanx

Share this post


Link to post
Share on other sites

Hi

It seems that you are loading the charts in the same container, loader_mc, replacing the previous one. In that case, you may try loader_mc.unLoadMovie() before reloading another one.

This type of anomalies can as well result from non-removal of all remnants of the charts. Please try using destroy() and remove() methods of the chart. Like

loader_mc.chart.destroy() [before unloading the chart obviously]

Hope the xml files have the attribute enabled for showing tooltips.

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