• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

GWT visualization API

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It would probably help to include the error that you get...
 
Let me tell you a story about a man named Jed. He made this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic