Search in sources :

Example 81 with Chart

use of com.vaadin.addon.charts.Chart 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 82 with Chart

use of com.vaadin.addon.charts.Chart in project charts by vaadin.

the class AdvancedUse method chartsAdvancedExportSnippet2.

public void chartsAdvancedExportSnippet2() {
    Chart chart = new Chart();
    Exporting exporting = new Exporting(true);
    exporting.setFilename("mychartfile.pdf");
    chart.getConfiguration().setExporting(exporting);
}
Also used : Exporting(com.vaadin.addon.charts.model.Exporting) Chart(com.vaadin.addon.charts.Chart)

Example 83 with Chart

use of com.vaadin.addon.charts.Chart in project charts by vaadin.

the class AdvancedUse method chartsAdvancedExportSnippet1.

public void chartsAdvancedExportSnippet1() {
    Chart chart = new Chart();
    chart.getConfiguration().setExporting(true);
}
Also used : Chart(com.vaadin.addon.charts.Chart)

Example 84 with Chart

use of com.vaadin.addon.charts.Chart in project charts by vaadin.

the class BasicUse method basicUseSnippet1.

public void basicUseSnippet1() {
    Chart chart = new Chart(ChartType.COLUMN);
    // 100% by default
    chart.setWidth("400px");
    // 400px by default
    chart.setHeight("300px");
}
Also used : Chart(com.vaadin.addon.charts.Chart)

Example 85 with Chart

use of com.vaadin.addon.charts.Chart 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)

Aggregations

Chart (com.vaadin.addon.charts.Chart)243 Configuration (com.vaadin.addon.charts.model.Configuration)196 YAxis (com.vaadin.addon.charts.model.YAxis)105 DataSeries (com.vaadin.addon.charts.model.DataSeries)81 ListSeries (com.vaadin.addon.charts.model.ListSeries)76 XAxis (com.vaadin.addon.charts.model.XAxis)71 DataSeriesItem (com.vaadin.addon.charts.model.DataSeriesItem)57 SolidColor (com.vaadin.addon.charts.model.style.SolidColor)55 AxisTitle (com.vaadin.addon.charts.model.AxisTitle)50 DataLabels (com.vaadin.addon.charts.model.DataLabels)45 Tooltip (com.vaadin.addon.charts.model.Tooltip)44 PlotOptionsColumn (com.vaadin.addon.charts.model.PlotOptionsColumn)34 Legend (com.vaadin.addon.charts.model.Legend)29 Marker (com.vaadin.addon.charts.model.Marker)23 PlotOptionsLine (com.vaadin.addon.charts.model.PlotOptionsLine)21 Style (com.vaadin.addon.charts.model.style.Style)20 PlotOptionsPie (com.vaadin.addon.charts.model.PlotOptionsPie)19 Labels (com.vaadin.addon.charts.model.Labels)18 VerticalLayout (com.vaadin.ui.VerticalLayout)18 PlotOptionsSpline (com.vaadin.addon.charts.model.PlotOptionsSpline)16