Hi,
I’m having a problem with the Vaadin Visualization Add-on. I wanted to implement the example that was displayed in Demo page for the addon, but every time I run the application nothing gets displayed.
Here is the source code for what I’ve done
package com.example.abc;
import org.vaadin.vaadinvisualizations.LineChart;
import com.vaadin.Application;
import com.vaadin.ui.*;
import com.google.gwt.visualization.*;
@SuppressWarnings("serial")
public class AbcApplication extends Application {
@Override
public void init() {
Window mainWindow = new Window("Abc Application");
LineChart lc = new LineChart();
lc.setOption("legend", "bottom");
lc.setOption("title", "Company Performance");
lc.addXAxisLabel("Year");
lc.addLine("Expenses");
lc.addLine("Sales");
lc.add("2004", new double[]{100,200});
lc.add("2005", new double[]{75,100});
lc.add("2006", new double[]{32,234});
lc.add("2007", new double[]{25,2534});
lc.add("2008", new double[]{2343,12});
VerticalLayout v = new VerticalLayout();
v.addComponent(lc);
mainWindow.addComponent(v);
v.addComponent(new Label("testLabel"));
setMainWindow(mainWindow);
}
}
The output of this is that the “testLabel” only gets displayed on top of the page, and nothing else.
Thanks