xuzhf / gwt-fusionchart

Automatically exported from code.google.com/p/gwt-fusionchart
0 stars 0 forks source link

gwt client-side? #7

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In project home it sais:

"a set of classes for including Flash and FusionChart animations in GWT 
application"

I checked out from svn and I browsed the sources but I can't find a single 
line of GWT code for including fusion charts? Is this a GWT project?

However, there is alot of code to create fusion chart xml on the server 
side.

The question (for me anyway) is how to use it in the GWT app.

Anyone who sorted this out, Please post a example!!

Regards

Original issue reported on code.google.com by rmm...@gmail.com on 9 May 2009 at 10:10

GoogleCodeExporter commented 9 years ago
I agree with you rmmapp. In order to be able to make full use of this there 
really
needs to be some sample GWT code to show how to use this correctly

Original comment by bboyl...@gmail.com on 11 Sep 2009 at 11:41

GoogleCodeExporter commented 9 years ago
These guys don't seem to be supporting their software too much.  No concrete 
examples 
from the client side means difficult to get off the ground and running with 
this.  
Plus, I see a lot of unnecessary code in the code base.  I found a good 
alternative 
that is really simple to use.

http://code.google.com/p/gwt2swf/

All you do from within your gwt code is this...

        SWFWidget fusionChart = new SWFWidget( 
"/pub/l/fusionCharts/Column3D.swf", 500, 500);

        String xml = "<chart caption='Monthly Unit Sales' xAxisName='Month' 
yAxisName='Units' showValues='0' formatNumberScale='0' showBorder='1'>"
                + "<set label='Jan' value='462' />"
                + "<set label='Feb' value='857' />"
                + "<set label='Mar' value='671' />"
                + "<set label='Apr' value='494' />"
                + "<set label='May' value='761' />"
                + "<set label='Jun' value='960' />"
                + "<set label='Jul' value='629' />"
                + "<set label='Aug' value='622' />"
                + "<set label='Sep' value='376' />"
                + "<set label='Oct' value='494' />"
                + "<set label='Nov' value='761' />"
                + "<set label='Dec' value='960' />"
                + "</chart>";

        fusionChart.addFlashVar("dataXML", xml);
        fusionChart.addFlashVar("chartWidth", "500");
        fusionChart.addFlashVar("chartHeight", "500");

Granted I just hard coded the xml, but still this could easily be populated 
from an 
rpc call.  I supposed you could use these guys api get the server side xml.

Original comment by Kent.Fle...@gmail.com on 29 Dec 2009 at 9:24

GoogleCodeExporter commented 9 years ago
Also, see usage of gwt2swf.  There is an 'inherit' you need to add to your 
module.

http://code.google.com/p/gwt2swf/wiki/Usage

Original comment by Kent.Fle...@gmail.com on 29 Dec 2009 at 9:25