use of com.vaadin.v7.data.util.IndexedContainer in project charts by vaadin.
the class ContainerWithLotsOfData method createContainer.
@SuppressWarnings("unchecked")
private ContainerDataSeries createContainer() {
IndexedContainer vaadinContainer = new IndexedContainer();
ContainerDataSeries container = new ContainerDataSeries(vaadinContainer);
vaadinContainer.addContainerProperty("y", Number.class, null);
for (int i = 0; i < getContainerData().length; i++) {
Item item = vaadinContainer.addItem(i);
item.getItemProperty("y").setValue(getContainerData()[i]);
}
container.setName("USD to EUR");
container.setPlotOptions(new PlotOptionsArea());
container.setYPropertyId("y");
return container;
}
Aggregations