• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

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
18
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...
 
The overall mission is to change the world. When you've done that, then you can read this tiny ad:
Enterprise-grade Excel API for Java
https://products.aspose.com/cells/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!