use of com.vaadin.addon.charts.model.Exporting in project charts by vaadin.
the class ExportingExample method getChart.
@Override
protected Component getChart() {
VerticalLayout verticalLayout = new VerticalLayout();
verticalLayout.setSpacing(true);
verticalLayout.addComponent(new Label(getDescription(), ContentMode.HTML));
Chart chart = (Chart) super.getChart();
// Enabling exporting adds a button to UI via users can download the
// chart e.g. for printing
Exporting exporting = new Exporting(true);
// One can customize the filename
exporting.setFilename("mychartfile");
// Exporting is by default done on highcharts public servers, but you
// can also use your own server
// exporting.setUrl("http://my.own.server.com");
// Actually use these settings in the chart
chart.getConfiguration().setExporting(exporting);
// Simpler boolean API can also be used to just toggle the service
// on/off
// chart.getConfiguration().setExporting(true);
verticalLayout.addComponent(chart);
return verticalLayout;
}
use of com.vaadin.addon.charts.model.Exporting 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);
}
use of com.vaadin.addon.charts.model.Exporting in project charts by vaadin.
the class AdvancedUse method chartsAdvancedExportSnippet3.
public void chartsAdvancedExportSnippet3() {
Exporting exporting = new Exporting(true);
exporting.setUrl("http://my.own.server.com");
}
Aggregations