Class ExportOptions
- java.lang.Object
-
- com.vaadin.flow.component.charts.model.AbstractConfigurationObject
-
- com.vaadin.flow.component.charts.export.ExportOptions
-
- All Implemented Interfaces:
Serializable
public class ExportOptions extends AbstractConfigurationObject
Optional settings for exporting charts in the server.
Options include:
- width: Width of the exported image.
- height: Height of the exported image.
- theme: Theme used to style the chart. For example:
LumoDarkTheme - lang: Lang specifications for internationalization purposes.
- timeline: Determines if the generated chart is in timeline mode.
- executeFunctions: execute JavaScript functions (for example: formatter functions)
- Since:
- 21.0
- See Also:
SVGGenerator, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ExportOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetExecuteFunctions()Check flag to see if generators will execute JavaScript functions when using aConfigurationwith JS functions.NumbergetHeight()Get the height the resulting chart will have.LanggetLang()Get theLangobject used to add i18n features to the chart.ThemegetTheme()Get theThemeused to style the chart.BooleangetTimeline()Check flag to see if the generated chart will be in timeline mode.NumbergetWidth()Get the width the resulting chart will have.voidsetExecuteFunctions(Boolean executeFunctions)Set flag to execute JS functions when exporting charts.voidsetHeight(Number height)Get the height the resulting chart will have.voidsetLang(Lang lang)Set theLangobject used to add i18n features to the chart.voidsetTheme(Theme theme)Set theThemeused to style the chart.voidsetTimeline(Boolean timeline)Set flag to mark the generated chart in timeline mode.voidsetWidth(Number width)Set the width the resulting chart will have.
-
-
-
Method Detail
-
getTheme
public Theme getTheme()
Get theThemeused to style the chart.- Returns:
- the
Themeused to style the chart.
-
setTheme
public void setTheme(Theme theme)
Set theThemeused to style the chart.- Parameters:
theme- the theme to use when styling the chart.- See Also:
LumoLightTheme,LumoDarkTheme
-
getLang
public Lang getLang()
Get theLangobject used to add i18n features to the chart.- Returns:
- the lang object used to provide i18n to the chart.
-
setLang
public void setLang(Lang lang)
Set theLangobject used to add i18n features to the chart.- Parameters:
lang- theLangobject used to provide the i18n features of the chart.
-
getWidth
public Number getWidth()
Get the width the resulting chart will have.- Returns:
- the width the resulting chart will have.
-
setWidth
public void setWidth(Number width)
Set the width the resulting chart will have.- Parameters:
width- the width the resulting chart will have.
-
getHeight
public Number getHeight()
Get the height the resulting chart will have.- Returns:
- the height the resulting chart will have.
-
setHeight
public void setHeight(Number height)
Get the height the resulting chart will have.- Parameters:
height- the height the resulting chart will have.
-
getTimeline
public Boolean getTimeline()
Check flag to see if the generated chart will be in timeline mode.- Returns:
trueif generated chart will be in timeline mode,falseotherwise.
-
setTimeline
public void setTimeline(Boolean timeline)
Set flag to mark the generated chart in timeline mode.- Parameters:
timeline- if the generated chart should be in timeline mode.
-
getExecuteFunctions
public boolean getExecuteFunctions()
Check flag to see if generators will execute JavaScript functions when using aConfigurationwith JS functions.- Returns:
trueif the generator will execute JavaScript functions,falseotherwise.
-
setExecuteFunctions
public void setExecuteFunctions(Boolean executeFunctions)
Set flag to execute JS functions when exporting charts.- Parameters:
executeFunctions- if the generator should execute JS functions.
-
-