Search in sources :

Example 6 with IndexedContainer

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;
}
Also used : Item(com.vaadin.v7.data.Item) PlotOptionsArea(com.vaadin.addon.charts.model.PlotOptionsArea) IndexedContainer(com.vaadin.v7.data.util.IndexedContainer) ContainerDataSeries(com.vaadin.v7.addon.charts.model.ContainerDataSeries)

Aggregations

IndexedContainer (com.vaadin.v7.data.util.IndexedContainer)5 ContainerDataSeries (com.vaadin.v7.addon.charts.model.ContainerDataSeries)3 Item (com.vaadin.v7.data.Item)3 Chart (com.vaadin.addon.charts.Chart)1 AbstractVaadinChartExample (com.vaadin.addon.charts.examples.AbstractVaadinChartExample)1 Configuration (com.vaadin.addon.charts.model.Configuration)1 DataLabelsRange (com.vaadin.addon.charts.model.DataLabelsRange)1 PlotOptionsArea (com.vaadin.addon.charts.model.PlotOptionsArea)1 PlotOptionsColumnrange (com.vaadin.addon.charts.model.PlotOptionsColumnrange)1 Tooltip (com.vaadin.addon.charts.model.Tooltip)1 XAxis (com.vaadin.addon.charts.model.XAxis)1 YAxis (com.vaadin.addon.charts.model.YAxis)1 ExternalResource (com.vaadin.server.ExternalResource)1 Label (com.vaadin.ui.Label)1 Link (com.vaadin.ui.Link)1 VerticalLayout (com.vaadin.ui.VerticalLayout)1 TextChangeEvent (com.vaadin.v7.event.FieldEvents.TextChangeEvent)1 TextChangeListener (com.vaadin.v7.event.FieldEvents.TextChangeListener)1 Table (com.vaadin.v7.ui.Table)1 TextField (com.vaadin.v7.ui.TextField)1