Sign in to follow this  
kappuz

Displaying Stacked Columns 2D chart inside a ScrollPane component.

Recommended Posts

When I insert a 2d Stacked Column chart inside a scrollPane component content, it does'nt display the Legend content. I believe it is because the legend itself uses a scroll. The problem persists even when the scoll is not needed.

 

 

 

Thank you ..

Share this post


Link to post
Share on other sites

Can you once try legendPosition='Right' and see what's happening? The legend scroll wouldn't cause any conflict, as it's an internal FusionCharts component and not a Flash Component.

Share this post


Link to post
Share on other sites

I tried legendPosition='right'. The graphic just renders the Legend area that is visible when rendering. The part outside the viewport of the scrollPane is not rendered (only of the legend). There is an important issue, when I publish the SWF embedded in HTML it works fine!, but the standalone SWF played in the flashplayer does'nt render OK and I need a standalone swf.

 

 

 

 

 

...

 

 

 

Thanks!

Share this post


Link to post
Share on other sites

I have now a partial solution ... I think it is not the cleanest way to do it but it works... I make the scrollPane size bigger when rendering the graph, and the I set it's size to the needed size, and then all contents of the graph (including the legend) are rendered.. this kind of solution is what mexicans call "chapuza" : (something that works... but it's not the "right" solution).

 

 

 

I know with all this information you can orient me to solve the problem in a professional way....

 

 

 

Thanks again!!

Share this post


Link to post
Share on other sites

Are you directly loading the chart into a ScrollPane? If yes, I'm afraid it won't work, as FusionCharts classes do not derive from UIObject class and hence the scroll bar needs to be manipulated before it can actually function well.

Share this post


Link to post
Share on other sites

First, I attach an empty movie clip to the ScrollPane.content property, then I get a reference variable of that movieclip, and then I render the graph inside that movieClip, everything works fine when the scrollpane.content movieclip have the enough size for the graph to render, then if I resize the ScrollPane viewPort to a smaller size (in witch not all the graph is displayed) it works ok.

 

 

 

The error is when I try to render the graph inside the ScrollPane when the viewport of the ScrollPane masks some part of the Legend of the graph. The strange thing is that if I run the SWF inside an HTML, the graph renders perfect even if the scrollPane's vewport is smaller than the graph. But in a standalone SWF, the lengend does'nt render fine...

 

 

 

I think one solution is to disable your scrollBar routine from the legend, I don't really need it as well... Can you orient me a little in that issue?

 

 

 

Thanks again !

 

 

 

Daniel

Share this post


Link to post
Share on other sites

To disable the scroll bars from Legend component, you need to edit to comfusionchartshelperLegend.as

The addition of scroll bar is done in render() function of that class.

Share this post


Link to post
Share on other sites

Ok, I will do it from there. Thanks!

 

 

 

Now I have another problem. I dynamically create movieclips for attaching the graphs.

 

 

 

When I create an empty movieClip, it

Share this post


Link to post
Share on other sites

This is because of the following lines in com/fusioncharts/core/Chart.as:

private var testTFX : Number = - 2000;

private var testTFY : Number = - 2000;

You can change it to 0.

Also, in comfusionchartshelperToolTip.as, you'll need to change the following values to 0:

this.tf._x = - 100;

this.tf._y = - 100;

However, this might cause an initial flicker of tool tip.

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