com.vaadin.flow.component.charts.
Class ChartOptions
All Implemented Interfaces:
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 ChartOptions
get()
Returns a ChartOptions instance for the current UI.
static ChartOptions
Returns a ChartOptions instance for the given UI.
getLang()
Returns the
Lang
in use ornull
if no lang configuration has been set.getTheme()
Returns the
Theme
in use ornull
if no theme has been set.void
Changes the language of all charts.
void
Sets the theme to use.
-
Constructor Details
-
ChartOptions
protected ChartOptions()
-
-
Method Details
-
setLang
Changes the language of all charts.
Parameters:
lang
- -
getLang
Returns the
Lang
in use ornull
if no lang configuration has been set.Returns:
the
Lang
in use ornull
. -
getTheme
Returns the
Theme
in use ornull
if no theme has been set.Returns:
the
Theme
in use ornull
. -
setTheme
Sets the theme to use.
Note that if the view is already drawn, all existing
Chart
s 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
-