Search in sources :

Example 11 with PlotOptionsLine

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);
}
Also used : PlotOptionsLine(com.vaadin.addon.charts.model.PlotOptionsLine) DataSeries(com.vaadin.addon.charts.model.DataSeries) PlotOptionsSpline(com.vaadin.addon.charts.model.PlotOptionsSpline)

Example 12 with PlotOptionsLine

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);
}
Also used : Configuration(com.vaadin.addon.charts.model.Configuration) PlotOptionsLine(com.vaadin.addon.charts.model.PlotOptionsLine) DataSeries(com.vaadin.addon.charts.model.DataSeries) Chart(com.vaadin.addon.charts.Chart)

Example 13 with PlotOptionsLine

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);
}
Also used : PlotOptionsLine(com.vaadin.addon.charts.model.PlotOptionsLine) AbstractPlotOptions(com.vaadin.addon.charts.model.AbstractPlotOptions) Chart(com.vaadin.addon.charts.Chart) Test(org.junit.Test)

Example 14 with PlotOptionsLine

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);
}
Also used : Configuration(com.vaadin.addon.charts.model.Configuration) PlotOptionsLine(com.vaadin.addon.charts.model.PlotOptionsLine) Marker(com.vaadin.addon.charts.model.Marker) Chart(com.vaadin.addon.charts.Chart)

Example 15 with PlotOptionsLine

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);
}
Also used : Configuration(com.vaadin.addon.charts.model.Configuration) PlotOptionsColumn(com.vaadin.addon.charts.model.PlotOptionsColumn) ListSeries(com.vaadin.addon.charts.model.ListSeries) PlotOptionsLine(com.vaadin.addon.charts.model.PlotOptionsLine) DataSeries(com.vaadin.addon.charts.model.DataSeries) Chart(com.vaadin.addon.charts.Chart)

Aggregations

PlotOptionsLine (com.vaadin.addon.charts.model.PlotOptionsLine)33 Configuration (com.vaadin.addon.charts.model.Configuration)25 Chart (com.vaadin.addon.charts.Chart)21 ListSeries (com.vaadin.addon.charts.model.ListSeries)19 YAxis (com.vaadin.addon.charts.model.YAxis)13 AxisTitle (com.vaadin.addon.charts.model.AxisTitle)10 DataLabels (com.vaadin.addon.charts.model.DataLabels)9 Test (org.junit.Test)9 DataSeries (com.vaadin.addon.charts.model.DataSeries)7 Legend (com.vaadin.addon.charts.model.Legend)6 Marker (com.vaadin.addon.charts.model.Marker)5 PlotOptionsSpline (com.vaadin.addon.charts.model.PlotOptionsSpline)4 XAxis (com.vaadin.addon.charts.model.XAxis)4 DataSeriesItem (com.vaadin.addon.charts.model.DataSeriesItem)3 SolidColor (com.vaadin.addon.charts.model.style.SolidColor)3 Elements (org.jsoup.select.Elements)3 Hover (com.vaadin.addon.charts.model.Hover)2 Labels (com.vaadin.addon.charts.model.Labels)2 Pane (com.vaadin.addon.charts.model.Pane)2 PlotOptionsColumn (com.vaadin.addon.charts.model.PlotOptionsColumn)2