use of com.vaadin.addon.charts.model.PlotOptionsLine in project charts by vaadin.
the class Migration method abstractclassPlotoptions.
public void abstractclassPlotoptions(PointOptions options) {
DataSeries series = null;
DataSeries series2 = null;
PlotOptionsSpline plotOptions = new PlotOptionsSpline();
PlotOptionsLine plotOptions2 = new PlotOptionsLine();
setCommonProperties(plotOptions);
setCommonProperties(plotOptions);
series.setPlotOptions(plotOptions);
series2.setPlotOptions(plotOptions2);
}
use of com.vaadin.addon.charts.model.PlotOptionsLine 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.model.PlotOptionsLine in project charts by vaadin.
the class ConfigurationTest method getPlotOptionsForType_PlotOptionsLineIsCreated_ReturnTheLinePlotOptions.
@Test
public void getPlotOptionsForType_PlotOptionsLineIsCreated_ReturnTheLinePlotOptions() {
Chart chart = new Chart();
PlotOptionsLine expected = new PlotOptionsLine();
chart.getConfiguration().setPlotOptions(expected);
AbstractPlotOptions result = chart.getConfiguration().getPlotOptions(ChartType.LINE);
assertEquals(expected, result);
}
use of com.vaadin.addon.charts.model.PlotOptionsLine 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.PlotOptionsLine in project charts by vaadin.
the class BasicUse method basicUseMixed.
public void basicUseMixed() {
Chart chart = new Chart(ChartType.COLUMN);
Configuration conf = chart.getConfiguration();
// A data series as column graph
DataSeries series1 = new DataSeries();
PlotOptionsColumn options1 = new PlotOptionsColumn();
options1.setColor(SolidColor.BLUE);
series1.setPlotOptions(options1);
series1.setData(4900, 12100, 12800, 6800, 143000, 125000, 51100, 49500);
conf.addSeries(series1);
// A data series as line graph
ListSeries series2 = new ListSeries("Diameter");
PlotOptionsLine options2 = new PlotOptionsLine();
options2.setColor(SolidColor.RED);
series2.setPlotOptions(options2);
series2.setData(4900, 12100, 12800, 6800, 143000, 125000, 51100, 49500);
conf.addSeries(series2);
}
Aggregations