Humorous Charts thread

Examples of humorous charts you can create using
. Give it a try and let me know what you come up with:-)

I tried to use this component but ended up with an error while compiling:

Unable to find ‘com/google/gwt/visualization/Visualization.gwt.xml’ on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?

I’ll re-evaluate my rating for the component when there’s a jar that works directly out-of-the-box, or when there is some kind documentation on how to get this fixed.

Ok simple fix, download the GWT Visualization jar from
GWT-google-api downloads
and (Eclipse) drag it into your WebContent…WEB-INF… lib…
I tested this, by downloading the Add on, downloading the GWT jar and created a quick Vaadin project compiling it all and ran in it Firefox and IE8.

I’ll update the docs for the Add On.

package com.example.testvisualizations;

import org.vaadin.vaadinvisualizations.PieChart;

import com.vaadin.Application;
import com.vaadin.ui.*;

public class TestvisualizationsApplication extends Application {
	public void init() {
		Window mainWindow = new Window("Testvisualizations Application");
		Label label = new Label("Hello Vaadin user");
		PieChart pc = new PieChart();

        pc.add("Work", 7);
        pc.add("Play", 3);
        pc.add("Eat", 1);
        pc.add("Sleep", 6);
        pc.add("Do Vaadin", 7);
        pc.setOption("width", 400);
        pc.setOption("height", 400);
        pc.setOption("is3D", true);
        mainWindow.addWindow(createSubWindow(pc, "Pie Chart", "536px","436px"));

	private Window createSubWindow(Component component, String type, String height, String width){
        Window subwindow = new Window("A subwindow showing " + type);

        // Configure the windws layout; by default a VerticalLayout
        VerticalLayout layout = (VerticalLayout) subwindow.getContent();

        return subwindow;



Jens, did the explanation fix your problem?

yeah, I got forward with it. Actually I’m still hitting a “java.lang.UnsupportedClassVersionError: Bad version number in .class file” but it is probably due to my configurations (even if I tried to compile it with java 1.5 and 1.6. Maybe I need a different version of Vaadin).

You mention these requirements in the add-on description but I still urge you to do even better! Having to figure out what to download and from where (especially which link of those tens of the google-gwt-api page) is still an extra step the user has to take.

I have three solutions that I would like to present. They are in the order from the worst to the best in my opinion:

  1. Publish the widget as a zip which contains the jar and a txt describing what the user has to download and do to get this working

  2. Add the most recent version of the gwt visualization jar as a bundle to the zip mentioned above.

  3. This one may require some work, but bundle the gwt visualization jar
    your jar. You probably have to extract the jar into your project, but it would make the usage a heck lot easier.

The (although short) instructions added to the page is already an improvement, and I’ll remove my negative review because of this. I’ll try to find time to figure out how to compile the widgetset so that it works, and possibly add it to my golf score tracking application. I’ll give you a proper review when I’m finished :slight_smile:

Seems funny, I tried on a windows xp, windows vista and mac setup and didnt find any problems. Mac for example is just using the jvm 1.6.0 mac osx default, vaadin 6.3, then the jar for the Add on and the gwt-visualization… jar, dropped them and that was that.
OK I admit there are a few jars on the page
gwt visualization jar download location
but its fairly easy to find the gwt visualization ones.
I tried to see what others have done when they need to have reference to other jars, seems there is no real good solution and I guess its pretty standard java development when you have to download this that and the other jar.

If you want you can always zip your eclipse project and send it to me and I can try and see if there is something funny going on.

As a side thought…
I wonder if the Vaadin eclipse plugin could help, maybe that could read some directive that you add in to the add on for included jars. The plugin could then auto suggest downloads depending on OS. Actually maybe the Vaadin Eclipse plugin should be linked to the directory, could give you a list of add ons, allow you to download more than one at a time, auto download of included jars, documentation, samples etc.

These last problems are probably just my own faults. I’m guessing the fault is in that the last time I tested the plugin I used a workspace that had JDK 1.5 as default. It will probably work if I try it with a clean workspace, but I just haven’t had time to do that yet. I’ll get back to you on this when I have tested it.

Hi there,

Nice stuff. It worked when I installed the gwt-visualization.jar but for some reason, when I try and built a piechart in a popupwindow, I need to resize the window before the component becomes visible. Any idea why?

Even I tried this. But the WIndow has to be resized manually to see the Chart. Any help would be appreciated.

Also want to know if we can have a datetime instead of just date as in Google Visualization API Annotated Timeline.

I have the same problem… chart or map will not be visible until i resize the window… any workarounds?


I want to change colors of my pieChart with java. could anyone help me please ?