• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

GWT visualization API

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am not very good in java and encountered this problem of invalid character constant while trying to do out a pie chart with annotatedtimeline and barchart and not sure how to solve it
The code are as below... Could someone please help? desperate.. thks

public void onModuleLoad() {
VisualizationUtils.loadVisualizationApi(new Runnable() {
public void run() {
Widget bar = createBarChart();
Widget pie = createPieChart();
Widget timeline = createTimeLine();
DockPanel d = new DockPanel();
RootPanel.get().add(d);
d.add(bar, DockPanel.EAST);
d.add(pie, DockPanel.WEST);
d.add(timeline, DockPanel.NORTH);
}
}, new String[] { BarChart.PACKAGE, PieChart.PACKAGE, AnnotatedTimeLine.PACKAGE});
}

private Widget createTimeLine(){
DataTable data = DataTable.create();

data.addColumn('date', 'Date'); <-------------- the error shows here
data.addColumn('number', 'Sold Pencils');
data.addColumn('string', 'title1');
data.addColumn('string', 'text1');
data.addColumn('number', 'Sold Pens');
data.addColumn('string', 'title2');
data.addColumn('string', 'text2');
data.addRows(6);
 
Bartender
Posts: 11445
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not swing related. Moving to a more appropriate forum.
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would probably help to include the error that you get...
 
Curse your sudden but inevitable betrayal! And this tiny ad too!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!