use of com.vaadin.ui.Component in project charts by vaadin.
the class AbstractVaadinChartExample method setup.
protected void setup() {
if (content.getComponentCount() == 0) {
final Component map = getChart();
content.addComponent(map);
content.setExpandRatio(map, 1);
}
}
use of com.vaadin.ui.Component in project charts by vaadin.
the class ContainerWithLotsOfData method getChart.
@Override
protected Component getChart() {
HorizontalLayout lo = new HorizontalLayout();
ContainerDataSeries container = createContainer();
Component table = createTable(container.getVaadinContainer());
Component chart = createChart(container);
lo.addComponents(table);
lo.addComponent(chart);
table.setSizeFull();
chart.setSizeFull();
lo.setSizeFull();
lo.setExpandRatio(table, 1);
lo.setExpandRatio(chart, 5);
return lo;
}
use of com.vaadin.ui.Component in project charts by vaadin.
the class ChartWithExternalDataProvider method getChart.
@Override
protected Component getChart() {
HorizontalLayout lo = new HorizontalLayout();
lo.setSpacing(true);
DataProvider<Order, ?> dp = getOrderDataProvider();
DataProviderSeries<Order> chartDataSeries1 = createChartDataSeries1(dp);
DataProviderSeries<Order> chartDataSeries2 = createChartDataSeries2(dp);
Component table = createGrid(dp);
table.setSizeFull();
Chart chart1 = createChart1(chartDataSeries1);
chart1.setSizeFull();
Chart chart2 = createChart2(chartDataSeries2);
chart2.setSizeFull();
lo.setWidth("100%");
lo.setHeight("450px");
lo.addComponents(table);
lo.addComponent(chart1);
lo.addComponent(chart2);
lo.setExpandRatio(table, 0.2f);
lo.setExpandRatio(chart1, 0.4f);
lo.setExpandRatio(chart2, 0.4f);
return lo;
}
use of com.vaadin.ui.Component in project charts by vaadin.
the class DataProviderWithLotsOfData method getChart.
@Override
protected Component getChart() {
HorizontalLayout lo = new HorizontalLayout();
DataProviderSeries<Data> ds = createChartDS();
Component grid = createGrid();
Component chart = createChart(ds);
lo.addComponents(grid);
lo.addComponent(chart);
grid.setSizeFull();
chart.setSizeFull();
lo.setSizeFull();
lo.setExpandRatio(grid, 1);
lo.setExpandRatio(chart, 5);
return lo;
}
use of com.vaadin.ui.Component in project charts by vaadin.
the class SimpleChartWithDataProviderSeries method getChart.
@Override
protected Component getChart() {
HorizontalLayout lo = new HorizontalLayout();
Component table = createGrid();
DataProviderSeries<Browser> ds = createChartDS();
Component chart = createChart(ds);
table.setSizeFull();
chart.setSizeFull();
lo.setWidth("100%");
lo.setHeight("450px");
lo.addComponents(table);
lo.addComponent(chart);
return lo;
}
Aggregations