I am somewhat familiar with OFCGWT, but the code for basic chart in the 2.0M1 examples is a little different.
http://extjs.com/examples-dev/explorer.html#basicchart
Code:
public void onModuleLoad() {
String url = !isExplorer() ? "../../" : "";
url += "gxt/chart/open-flash-chart.swf";
final Chart chart = new Chart(url);
chart.setBorders(true);
chart.setChartModel(getPieChartData());
ContentPanel panel = new ContentPanel();
panel.add(chart);
RootPanel.get().add(panel);
}
I tried copying the whole resources folder with the open-flash-chart.swf from 2.0M1 into my project folder but that didn't work. Here is the exception when the page loads:
[ERROR] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (TypeError): '$wnd.swfobject' is null or not an object
number: -2146823281
description: '$wnd.swfobject' is null or not an object
at com.extjs.gxt.ui.client.widget.flash.SwfObject.embedSWT(Native Method)
at com.extjs.gxt.ui.client.widget.flash.SwfObject.embedSWF(SwfObject.java:113)
at com.extjs.gxt.ui.client.widget.flash.FlashComponent.injectFlash(FlashComponent.java:221)
at com.extjs.gxt.ui.client.widget.flash.FlashComponent.onAttach(FlashComponent.java:185)
at com.extjs.gxt.charts.client.Chart.onAttach(Chart.java:199)
at com.extjs.gxt.ui.client.widget.ComponentHelper.doAttach(ComponentHelper.java:23)
at com.extjs.gxt.ui.client.widget.Container.doLayout(Container.java:377)
at com.extjs.gxt.ui.client.widget.Container.layout(Container.java:294)
at com.extjs.gxt.ui.client.widget.LayoutContainer.layout(LayoutContainer.java:238)
at com.extjs.gxt.ui.client.widget.Container$1.execute(Container.java:448)
at com.google.gwt.user.client.CommandExecutor.doExecuteCommands(CommandExecutor.java:310)
at com.google.gwt.user.client.CommandExecutor$2.run(CommandExecutor.java:205)
at com.google.gwt.user.client.Timer.fireImpl(Timer.java:160)
at com.google.gwt.user.client.Timer.fireAndCatch(Timer.java:146)
at com.google.gwt.user.client.Timer.fire(Timer.java:138)