use of com.vaadin.addon.charts.Chart in project charts by vaadin.
the class GettingStarted method configuringTheColors.
public void configuringTheColors() {
Chart chart = new Chart();
Configuration conf = chart.getConfiguration();
DataSeries girls = new DataSeries("Girls");
DataSeries boys = new DataSeries("Boys");
PlotOptionsLine girlsOpts = new PlotOptionsLine();
girlsOpts.setColor(SolidColor.HOTPINK);
girls.setPlotOptions(girlsOpts);
PlotOptionsLine boysOpts = new PlotOptionsLine();
boysOpts.setColor(SolidColor.BLUE);
boys.setPlotOptions(boysOpts);
}
use of com.vaadin.addon.charts.Chart in project charts by vaadin.
the class GettingStarted method combinationChartPreparationsSnippet2.
public void combinationChartPreparationsSnippet2(VaadinRequest request) {
Chart chart = new Chart();
final VerticalLayout layout = new VerticalLayout();
layout.addComponent(chart);
}
use of com.vaadin.addon.charts.Chart in project charts by vaadin.
the class GettingStarted method addColumnsSnippet1.
public void addColumnsSnippet1(List<WeatherInfo> weatherInfo) {
Chart chart = new Chart();
Configuration conf = chart.getConfiguration();
ListDataProvider<WeatherInfo> dataProvider = new ListDataProvider<>(weatherInfo);
DataProviderSeries<WeatherInfo> humidity = new DataProviderSeries<>(dataProvider);
humidity.setName("Humidity");
humidity.setX(WeatherInfo::getInstant);
humidity.setY(WeatherInfo::getMeanHumidity);
humidity.setPlotOptions(new PlotOptionsColumn());
conf.addSeries(humidity);
}
use of com.vaadin.addon.charts.Chart in project charts by vaadin.
the class GettingStarted method combinationChartPreparationsSnippet1.
public void combinationChartPreparationsSnippet1(VaadinRequest request) {
Chart chart = new Chart();
final VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
ChartsData data = new ChartsData();
layout.addComponent(chart);
}
use of com.vaadin.addon.charts.Chart in project charts by vaadin.
the class ChartConfiguration method plotOptionsSnippet1.
public void plotOptionsSnippet1(Configuration conf) {
Chart chart = new Chart();
Configuration configuration = chart.getConfiguration();
PlotOptionsColumn plotOptions = new PlotOptionsColumn();
plotOptions.setStacking(Stacking.NORMAL);
configuration.setPlotOptions(plotOptions);
}
Aggregations