Class ColorSchemesOptionsBuilder
- java.lang.Object
-
- org.pepstock.charba.client.commons.AbstractBaseBuilder
-
- org.pepstock.charba.client.impl.plugins.ColorSchemesOptionsBuilder
-
- All Implemented Interfaces:
IsBuilder
public final class ColorSchemesOptionsBuilder extends AbstractBaseBuilder
Comfortable object to createColorSchemes.ID
plugin options by a builder.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ColorSchemesOptions
build()
Returns a configured plugin options.static ColorSchemesOptionsBuilder
create()
Returns new builder instance, using the global options as default.static ColorSchemesOptionsBuilder
create(IsChart chart)
Returns new builder instance using chart global options as default.ColorSchemesOptionsBuilder
setBackgroundColorAlpha(double backgroundColorAlpha)
The transparency value for the background color.ColorSchemesOptionsBuilder
setReverse(boolean reverse)
If set totrue
, the order of the colors in the selected scheme is reversed.ColorSchemesOptionsBuilder
setScheme(ColorScheme scheme)
Sets the color scheme.ColorSchemesOptionsBuilder
setSchemeScope(SchemeScope schemeScope)
Sets the color scheme scope when the scheme is applied to hoving flex datasets, like bars charts.-
Methods inherited from class org.pepstock.charba.client.commons.AbstractBaseBuilder
isBuilt, setBuilt
-
-
-
-
Method Detail
-
create
public static ColorSchemesOptionsBuilder create()
Returns new builder instance, using the global options as default.- Returns:
- new builder instance
-
create
public static ColorSchemesOptionsBuilder create(IsChart chart)
Returns new builder instance using chart global options as default.- Parameters:
chart
- chart instance related to the plugin options- Returns:
- new builder instance
-
build
public ColorSchemesOptions build()
Returns a configured plugin options.- Returns:
- a configured plugin options.
-
setSchemeScope
public ColorSchemesOptionsBuilder setSchemeScope(SchemeScope schemeScope)
Sets the color scheme scope when the scheme is applied to hoving flex datasets, like bars charts.- Parameters:
schemeScope
- the color scheme scope when the scheme is applied to hoving flex datasets, like bars charts.- Returns:
- builder instance
-
setScheme
public ColorSchemesOptionsBuilder setScheme(ColorScheme scheme)
Sets the color scheme.- Parameters:
scheme
- the color scheme.- Returns:
- builder instance
-
setBackgroundColorAlpha
public ColorSchemesOptionsBuilder setBackgroundColorAlpha(double backgroundColorAlpha)
The transparency value for the background color. Must be a number between 0.0 (fully transparent) and 1.0 (no transparency).- Parameters:
backgroundColorAlpha
- the transparency value for the background color- Returns:
- builder instance
-
setReverse
public ColorSchemesOptionsBuilder setReverse(boolean reverse)
If set totrue
, the order of the colors in the selected scheme is reversed.- Parameters:
reverse
- if set totrue
, the order of the colors in the selected scheme is reversed- Returns:
- builder instance
-
-