FusionChart

Hi,

I’m developing an application, which requires graph. I have decided to use FusionChart. Searched in vaadin forum for fusionchart integration and use that code for sample purpose. But i get no data to display message.

I have placed my Data.xml and swf file in Themes folder, but the relativeUri is empty always. FlashVar is not set.

Also where SWFComponent class located ?. I couldn’t find anywhere.

am i missing anything here ?

Code:

public class FusionchartsampleApplication extends Application {
@Override
public void init() {
setTheme(“pizhaigal”);
Window mainWindow = new Window(“Fusioncharts Sample Application”);

   		Embedded chart1 = new Embedded();
	String path  = getURL().getPath()+"Data.xml";
	System.out.println("path " + getURL().getPath() );
	chart1.setParameter("movie","FCF_MSColumn3D.swf");
	 chart1.setParameter("dataUrl",path);
	// chart1.setParameter("FlashVars", "dataUrl=Data.xml");
	chart1.setParameter("FlashVars","debugMode=1");
	chart1.setType(Embedded.TYPE_OBJECT);
	 chart1.setSource(new ThemeResource("FCF_MSColumn3D.swf") {
                  @Override
        public String getMIMEType() {
            return "application/x-shockwave-flash";
        }
    });
    
    chart1.setWidth("400px");
    chart1.setHeight("300px");
    mainWindow.addComponent(chart1);
    
       mainWindow.addURIHandler(new URIHandler() {
        private static final long serialVersionUID = 1L;
        
        public DownloadStream handleURI(URL context, String relativeUri) {
        	System.out.println("relativeUri" +relativeUri);
            if (relativeUri.startsWith("Data")) {
            	                   return new DownloadStream(getClass().getResourceAsStream(
                        relativeUri), "application/xml", relativeUri);
            }
            return null;
        }
    });

    setMainWindow(mainWindow);
}

}