Class ColorSchemes
- java.lang.Object
-
- org.pepstock.charba.client.plugins.AbstractPlugin
-
- org.pepstock.charba.client.impl.plugins.ColorSchemes
-
- All Implemented Interfaces:
Plugin
public final class ColorSchemes extends AbstractPlugin
Default plugin implementation to use color schemes instead the single colors for border and background colors of chart.
It enables to pick the color combination for charts from the predefined or custom color schemes.- Author:
- Andrea "Stock" Stocchero
-
-
Field Summary
Fields Modifier and Type Field Description static ColorSchemesOptionsFactory
FACTORY
Data labels options factorystatic String
ID
Plugin ID "charbacolorschemes".
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ColorSchemes
get()
Returns the singleton instance of plugin.void
onBeforeDestroy(IsChart chart)
Called before the chart is being destroyed.boolean
onBeforeUpdate(IsChart chart, PluginUpdateArgument argument)
Called before updating 'chart'.
If any plugin returnsfalse
, the update is cancelled (and thus subsequent render(s)) until another 'update' is triggered.void
onConfigure(IsChart chart)
Called before initializing configuration of 'chart'.-
Methods inherited from class org.pepstock.charba.client.plugins.AbstractPlugin
getId, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.pepstock.charba.client.Plugin
onAfterBuildTicks, onAfterDataLimits, onAfterDatasetDraw, onAfterDatasetsDraw, onAfterDatasetsUpdate, onAfterDatasetUpdate, onAfterDestroy, onAfterDraw, onAfterEvent, onAfterInit, onAfterLayout, onAfterRender, onAfterTooltipDraw, onAfterUpdate, onBeforeBuildTicks, onBeforeDataLimits, onBeforeDatasetDraw, onBeforeDatasetsDraw, onBeforeDatasetsUpdate, onBeforeDatasetUpdate, onBeforeDraw, onBeforeElementsUpdate, onBeforeEvent, onBeforeInit, onBeforeLayout, onBeforeRender, onBeforeTooltipDraw, onBeginDrawing, onEndDrawing, onInstall, onReset, onResize, onStart, onStop, onUninstall
-
-
-
-
Field Detail
-
ID
public static final String ID
Plugin ID "charbacolorschemes".- See Also:
- Constant Field Values
-
FACTORY
public static final ColorSchemesOptionsFactory FACTORY
Data labels options factory
-
-
Method Detail
-
get
public static ColorSchemes get()
Returns the singleton instance of plugin.- Returns:
- the singleton instance of plugin
-
onConfigure
public void onConfigure(IsChart chart)
Description copied from interface:Plugin
Called before initializing configuration of 'chart'.- Parameters:
chart
- the chart instance.
-
onBeforeUpdate
public boolean onBeforeUpdate(IsChart chart, PluginUpdateArgument argument)
Description copied from interface:Plugin
Called before updating 'chart'.
If any plugin returnsfalse
, the update is cancelled (and thus subsequent render(s)) until another 'update' is triggered.- Parameters:
chart
- the chart instance.argument
- the argument passed for update- Returns:
false
to cancel the chart update.
-
-