public final class ChartBackgroundColor extends AbstractPlugin
DEFAULT_BACKGROUND_COLOR
background color.Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_BACKGROUND_COLOR
Default background color,
HtmlColor.WHITE . |
static ChartBackgroundColorOptionsFactory |
FACTORY
The factory to create options
|
static String |
ID
Plugin ID "charbabackgroundcolor".
|
Constructor and Description |
---|
ChartBackgroundColor()
Default constructor with
DEFAULT_BACKGROUND_COLOR background color. |
ChartBackgroundColor(Gradient gradient)
Builds the object with the default gradient for all charts.
|
ChartBackgroundColor(IsColor color)
Builds the object with the default background color for all charts.
|
ChartBackgroundColor(Pattern pattern)
Builds the object with the default pattern for all charts.
|
ChartBackgroundColor(String color)
Builds the object with the default background color for all charts.
|
Modifier and Type | Method and Description |
---|---|
IsColor |
getColor()
Returns the color if it has been set, otherwise
null . |
String |
getColorAsString()
Returns the color as string if it has been set, otherwise
null . |
Gradient |
getGradient()
Returns the gradient if it has been set, otherwise
null . |
String |
getId()
Plugins must define a unique id in order to be configurable.
Returns the plugin id. |
Pattern |
getPattern()
Returns the pattern if it has been set, otherwise
null . |
void |
onAfterDraw(IsChart chart,
double easing)
Called after the 'chart' has been drawn for the specific easing value.
|
boolean |
onBeforeDraw(IsChart chart,
double easing)
Called before drawing 'chart' at every animation frame specified by the given easing value.
|
void |
onDestroy(IsChart chart)
Called after the chart as been destroyed.
|
void |
onResize(IsChart chart,
SizeItem size)
Called after the chart as been resized.
|
onAfterDatasetDraw, onAfterDatasetsDraw, onAfterDatasetsUpdate, onAfterDatasetUpdate, onAfterEvent, onAfterInit, onAfterLayout, onAfterRender, onAfterTooltipDraw, onAfterUpdate, onBeforeDatasetDraw, onBeforeDatasetsDraw, onBeforeDatasetsUpdate, onBeforeDatasetUpdate, onBeforeEvent, onBeforeInit, onBeforeLayout, onBeforeRender, onBeforeTooltipDraw, onBeforeUpdate, onConfigure, toString
public static final String ID
public static final ChartBackgroundColorOptionsFactory FACTORY
public static final String DEFAULT_BACKGROUND_COLOR
HtmlColor.WHITE
.public ChartBackgroundColor()
DEFAULT_BACKGROUND_COLOR
background color.public ChartBackgroundColor(IsColor color)
color
- background default color for all charts.public ChartBackgroundColor(String color)
color
- background default color for all charts.public ChartBackgroundColor(Gradient gradient)
gradient
- background default gradient for all charts.public ChartBackgroundColor(Pattern pattern)
pattern
- background default pattern for all charts.public String getColorAsString()
null
.null
.public IsColor getColor()
null
.null
public Gradient getGradient()
null
.null
public Pattern getPattern()
null
.null
public String getId()
Plugin
public boolean onBeforeDraw(IsChart chart, double easing)
Plugin
false
, the frame drawing is cancelled until another 'render' is triggered.onBeforeDraw
in interface Plugin
onBeforeDraw
in class AbstractPlugin
chart
- the chart instance.easing
- The current animation value, between 0.0 and 1.0.false
to cancel the chart drawing.public void onAfterDraw(IsChart chart, double easing)
Plugin
onAfterDraw
in interface Plugin
onAfterDraw
in class AbstractPlugin
chart
- the chart instance.easing
- The current animation value, between 0.0 and 1.0.public void onResize(IsChart chart, SizeItem size)
Plugin
onResize
in interface Plugin
onResize
in class AbstractPlugin
chart
- the chart instance.size
- The new canvas display size (eq. canvas.style width and height).