use of com.vaadin.addon.charts.model.Configuration in project charts by vaadin.
the class ChartTypes method chartTypesGaugeConfigurationSnippet1.
public void chartTypesGaugeConfigurationSnippet1() {
Chart chart = new Chart();
Configuration conf = chart.getConfiguration();
conf.setTitle("Speedometer");
conf.getPane().setStartAngle(-135);
conf.getPane().setEndAngle(135);
}
use of com.vaadin.addon.charts.model.Configuration in project charts by vaadin.
the class ChartTypes method chartTypesSolidGaugePlotoptionsSnippet1.
public void chartTypesSolidGaugePlotoptionsSnippet1() {
Chart chart = new Chart(ChartType.SOLIDGAUGE);
Configuration conf = chart.getConfiguration();
PlotOptionsSolidgauge options = new PlotOptionsSolidgauge();
// Move the value display box at the center a bit higher
DataLabels dataLabels = new DataLabels();
dataLabels.setY(-20);
options.setDataLabels(dataLabels);
conf.setPlotOptions(options);
}
use of com.vaadin.addon.charts.model.Configuration in project charts by vaadin.
the class ChartTypes method chartTypesOhlcSnippet1.
public void chartTypesOhlcSnippet1() {
Chart chart = new Chart(ChartType.OHLC);
chart.setTimeline(true);
Configuration configuration = chart.getConfiguration();
configuration.getTitle().setText("AAPL Stock Price");
DataSeries dataSeries = new DataSeries();
Collection<OhlcData> dataBank = null;
for (OhlcData data : dataBank) {
OhlcItem item = new OhlcItem();
item.setX(data.getDate());
item.setLow(data.getLow());
item.setHigh(data.getHigh());
item.setClose(data.getClose());
item.setOpen(data.getOpen());
dataSeries.add(item);
}
configuration.setSeries(dataSeries);
chart.drawChart(configuration);
}
use of com.vaadin.addon.charts.model.Configuration in project charts by vaadin.
the class BasicUse method basicUsePlotOptionsSnippet1.
public void basicUsePlotOptionsSnippet1() {
Chart chart = new Chart(ChartType.COLUMN);
Configuration conf = chart.getConfiguration();
PlotOptionsLine plotOptions = new PlotOptionsLine();
plotOptions.setMarker(new Marker(false));
conf.setPlotOptions(plotOptions);
}
use of com.vaadin.addon.charts.model.Configuration in project charts by vaadin.
the class BasicUse method basicUseDataSnippet1.
public void basicUseDataSnippet1() {
Chart chart = new Chart(ChartType.COLUMN);
Configuration conf = chart.getConfiguration();
ListSeries series = new ListSeries("Diameter");
series.setData(4900, 12100, 12800, 6800, 143000, 125000, 51100, 49500);
conf.addSeries(series);
}
Aggregations