use of com.vaadin.addon.charts.model.PlotOptionsAreaspline in project charts by vaadin.
the class Migration method exampleResult.
public Chart exampleResult() {
Chart chart = new Chart();
Configuration config = chart.getConfiguration();
config.setTitle("Charts migration");
config.getTitle().setAlign(HorizontalAlign.LEFT);
Crosshair xCrossHair = new Crosshair();
xCrossHair.setColor(SolidColor.BLACK);
xCrossHair.setDashStyle(DashStyle.SOLID);
xCrossHair.setWidth(10);
xCrossHair.setZIndex(0);
config.getxAxis().setCrosshair(xCrossHair);
Crosshair yCrossHair = new Crosshair();
yCrossHair.setColor(new SolidColor("#880000"));
yCrossHair.setDashStyle(DashStyle.DOT);
yCrossHair.setWidth(5);
yCrossHair.setZIndex(1);
config.getyAxis().setCrosshair(yCrossHair);
config.getLegend().setEnabled(false);
config.getTooltip().setEnabled(false);
ListSeries ls = new ListSeries();
ls.setName("Data");
ls.setData(29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4);
PlotOptionsAreaspline plotOptions = new PlotOptionsAreaspline();
plotOptions.setColor(SolidColor.BURLYWOOD);
plotOptions.setDataLabels(new DataLabels(false));
ls.setPlotOptions(plotOptions);
config.setSeries(ls);
return chart;
}
Aggregations