package com.appdev.test.client;
import com.google.gwt.core.client.EntryPoint;
import com.smartgwt.client.types.Overflow;
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.VLayout;
/**
*EntryPoint
*/
public class Chart implements EntryPoint {
private VLayout panel;
@Override
public void onModuleLoad() {
// TODO Auto-generated method stub
panel = new VLayout();
panel.setSize("900", "700");
panel.setStyleName("crm-ContextArea");
panel.setOverflow(Overflow.AUTO);
drawFusionCharts(panel);
}
private void drawFusionCharts(VLayout panel) {
FusionChart chart1 = new FusionChart("FCF_Area2D.swf", "400", "350", "Area2D.xml");
FusionChart chart2 = new FusionChart("FCF_StackedBar2D.swf", "400","350", "StBar2D.xml");
FusionChart chart3 = new FusionChart("FCF_Doughnut2D.swf", "400", "350","Doughnut2D.xml");
FusionChart chart4 = new FusionChart("FCF_Funnel.swf", "350", "300","Funnel.xml");
HLayout northLayout = new HLayout();
northLayout.setHeight("50%");
northLayout.setBackgroundColor("#FFFFFF");
northLayout.addMember(chart1);
northLayout.addMember(chart2);
HLayout southLayout = new HLayout();
southLayout.setHeight("50%");
southLayout.setBackgroundColor("#FFFFFF");
southLayout.addMember(chart3);
southLayout.addMember(chart4);
panel.addMember(northLayout);
panel.addMember(southLayout);
panel.draw();
}
}