PDA

View Full Version : Show multiple charts within single page



babbarkrishan
7 Dec 2010, 3:05 AM
I would like to show multiple charts in the same page. I tried following but page gets empty
String url = "ExtGWT/chart/open-flash-chart.swf";
final Chart chart1 = new Chart(url);
final Chart chart2 = new Chart(url);

FlexTable chartsTable = new FlexTable();
chartsTable.setBorderWidth(1);
chartsTable.setWidget(0, 0, chart1);
chartsTable.setWidget(0, 1, chart2);

dashboardPanel.add(chartsTable);

chart1.setChartModel(getChartModel(Random.nextInt(10)));
chart2.setChartModel(getChartModel(Random.nextInt(10)));


Kindly let me know how can i add multiple charts within a page?

Thanks
Krishan Babbar

sven
7 Dec 2010, 3:12 AM
This should work fine. Make sure the url to your swf file is correct.

Also please try to post a fully working testcase implementing EntryPoint so everybody could run and debug your code.