Package com.vaadin.flow.component.charts
Class ChartOptions
java.lang.Object
com.vaadin.flow.component.charts.model.AbstractConfigurationObject
com.vaadin.flow.component.charts.ChartOptions
- All Implemented Interfaces:
Serializable
The ChartOptions configures a page local global options like localized texts
for charts.
Use get() or get(UI) to get an
instance for the current or specified UI.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ChartOptionsget()Returns a ChartOptions instance for the current UI.static ChartOptionsget(com.vaadin.flow.component.UI ui) Returns a ChartOptions instance for the given UI.getLang()Returns theLangin use ornullif no lang configuration has been set.getTheme()Returns theThemein use ornullif no theme has been set.voidChanges the language of all charts.voidSets the theme to use.
-
Constructor Details
-
ChartOptions
protected ChartOptions()
-
-
Method Details
-
setLang
Changes the language of all charts.- Parameters:
lang-
-
getLang
Returns theLangin use ornullif no lang configuration has been set.- Returns:
- the
Langin use ornull.
-
getTheme
Returns theThemein use ornullif no theme has been set.- Returns:
- the
Themein use ornull.
-
setTheme
Sets the theme to use. Note that if the view is already drawn, all existingCharts will be redrawn.- Parameters:
theme-
-
get
Returns a ChartOptions instance for the given UI. If a ChartOptions extension has not yet been added, a new one is created and added.- Parameters:
ui- the UI for which the ChartOptions should be returned, notnull- Returns:
- the ChartOptions instance connected to the given UI
-
get
Returns a ChartOptions instance for the current UI. If a ChartOptions extension has not yet been added, a new one is created and added.- Returns:
- a ChartOptions instance connected to the currently active UI
-