public interface Plugin
Modifier and Type | Method and Description |
---|---|
String |
getId()
Plugins must define a unique id in order to be configurable.
Returns the plugin id. |
void |
onAfterDatasetDraw(AbstractChart<?,?> chart,
DatasetPluginItem item)
Called after the 'chart' datasets at the given 'args.index' have been drawn (datasets are drawn in the reverse order).
|
void |
onAfterDatasetsDraw(AbstractChart<?,?> chart,
double easing)
Called after the 'chart' datasets have been drawn.
|
void |
onAfterDatasetsUpdate(AbstractChart<?,?> chart)
Called after the 'chart' datasets have been updated.
|
void |
onAfterDatasetUpdate(AbstractChart<?,?> chart,
DatasetPluginItem item)
Called after the 'chart' datasets at the given 'args.index' has been updated.
|
void |
onAfterDraw(AbstractChart<?,?> chart,
double easing)
Called after the 'chart' has been drawn for the specific easing value.
|
void |
onAfterEvent(AbstractChart<?,?> chart,
ChartNativeEvent event)
Called after the 'event' has been consumed.
|
void |
onAfterInit(AbstractChart<?,?> chart)
Called after 'chart' has been initialized and before the first update.
|
void |
onAfterLayout(AbstractChart<?,?> chart)
Called after the 'chart' has been layed out.
|
void |
onAfterRender(AbstractChart<?,?> chart)
Called after the 'chart' has been fully rendered (and animation completed).
|
void |
onAfterTooltipDraw(AbstractChart<?,?> chart,
TooltipPluginItem item)
Called after drawing the 'tooltip'.
|
void |
onAfterUpdate(AbstractChart<?,?> chart)
Called after 'chart' has been updated and before rendering.
|
boolean |
onBeforeDatasetDraw(AbstractChart<?,?> chart,
DatasetPluginItem item)
Called before drawing the 'chart' dataset at the given 'args.index' (datasets are drawn in the reverse order).
|
boolean |
onBeforeDatasetsDraw(AbstractChart<?,?> chart,
double easing)
Called before drawing the 'chart' datasets.
|
boolean |
onBeforeDatasetsUpdate(AbstractChart<?,?> chart)
Called before updating the 'chart' datasets.
|
boolean |
onBeforeDatasetUpdate(AbstractChart<?,?> chart,
DatasetPluginItem item)
Called before updating the 'chart' dataset at the given 'args.index'.
|
boolean |
onBeforeDraw(AbstractChart<?,?> chart,
double easing)
Called before drawing 'chart' at every animation frame specified by the given easing value.
|
boolean |
onBeforeEvent(AbstractChart<?,?> chart,
ChartNativeEvent event)
Called before processing the specified 'event'.
|
void |
onBeforeInit(AbstractChart<?,?> chart)
Called before initializing 'chart'.
|
boolean |
onBeforeLayout(AbstractChart<?,?> chart)
Called before laying out 'chart'.
|
boolean |
onBeforeRender(AbstractChart<?,?> chart)
Called before rendering 'chart'.
|
boolean |
onBeforeTooltipDraw(AbstractChart<?,?> chart,
TooltipPluginItem item)
Called before drawing the 'tooltip'.
|
boolean |
onBeforeUpdate(AbstractChart<?,?> chart)
Called before updating 'chart'.
|
void |
onConfigure(AbstractChart<?,?> chart)
Called before initializing configuration of 'chart'.
|
void |
onDestroy(AbstractChart<?,?> chart)
Called after the chart as been destroyed.
|
void |
onResize(AbstractChart<?,?> chart,
SizeItem size)
Called after the chart as been resized.
|
String getId()
void onConfigure(AbstractChart<?,?> chart)
chart
- the chart instance.void onBeforeInit(AbstractChart<?,?> chart)
chart
- the chart instance.void onAfterInit(AbstractChart<?,?> chart)
chart
- the chart instance.boolean onBeforeUpdate(AbstractChart<?,?> chart)
false
, the update is cancelled (and thus subsequent
render(s)) until another 'update' is triggered.chart
- the chart instance.false
to cancel the chart update.void onAfterUpdate(AbstractChart<?,?> chart)
chart
- the chart instance.boolean onBeforeLayout(AbstractChart<?,?> chart)
false
, the layout update is cancelled until another
'update' is triggered.chart
- the chart instance.false
to cancel the chart layout.void onAfterLayout(AbstractChart<?,?> chart)
chart
- the chart instance.boolean onBeforeDatasetsUpdate(AbstractChart<?,?> chart)
false
, the datasets update is cancelled
until another 'update' is triggered.chart
- the chart instance.false
to cancel the datasets update.void onAfterDatasetsUpdate(AbstractChart<?,?> chart)
chart
- the chart instance.boolean onBeforeDatasetUpdate(AbstractChart<?,?> chart, DatasetPluginItem item)
false
, the
datasets update is cancelled until another 'update' is triggered.chart
- the chart instance.item
- the dataset item.false
to cancel the chart datasets drawing.void onAfterDatasetUpdate(AbstractChart<?,?> chart, DatasetPluginItem item)
chart
- the chart instance.item
- the dataset item.boolean onBeforeRender(AbstractChart<?,?> chart)
false
, the rendering is cancelled until another
'render' is triggered.chart
- the chart instance.false
to cancel the chart rendering.void onAfterRender(AbstractChart<?,?> chart)
chart
- the chart instance.boolean onBeforeDraw(AbstractChart<?,?> chart, double easing)
false
, the frame drawing is cancelled until another 'render' is triggered.chart
- the chart instance.easing
- The current animation value, between 0.0 and 1.0.false
to cancel the chart drawing.void onAfterDraw(AbstractChart<?,?> chart, double easing)
chart
- the chart instance.easing
- The current animation value, between 0.0 and 1.0.boolean onBeforeDatasetsDraw(AbstractChart<?,?> chart, double easing)
false
, the datasets drawing is cancelled
until another 'render' is triggered.chart
- the chart instance.easing
- The current animation value, between 0.0 and 1.0.false
to cancel the chart datasets drawing.void onAfterDatasetsDraw(AbstractChart<?,?> chart, double easing)
chart
- the chart instance.easing
- The current animation value, between 0.0 and 1.0.boolean onBeforeDatasetDraw(AbstractChart<?,?> chart, DatasetPluginItem item)
false
, the datasets drawing is cancelled until another 'render' is triggered.chart
- the chart instance.item
- the dataset item.false
to cancel the chart datasets drawing.void onAfterDatasetDraw(AbstractChart<?,?> chart, DatasetPluginItem item)
chart
- the chart instance.item
- the dataset item.boolean onBeforeTooltipDraw(AbstractChart<?,?> chart, TooltipPluginItem item)
false
, the tooltip drawing is cancelled until
another 'render' is triggered.chart
- the chart instance.item
- The tooltip instance.false
to cancel the chart tooltip drawing.void onAfterTooltipDraw(AbstractChart<?,?> chart, TooltipPluginItem item)
chart
- the chart instance.item
- The tooltip instance.boolean onBeforeEvent(AbstractChart<?,?> chart, ChartNativeEvent event)
false
, the event will be discarded.chart
- the chart instance.event
- The event object.false
to discard the event.void onAfterEvent(AbstractChart<?,?> chart, ChartNativeEvent event)
chart
- the chart instance.event
- The event object.void onResize(AbstractChart<?,?> chart, SizeItem size)
chart
- the chart instance.size
- The new canvas display size (eq. canvas.style width and height).void onDestroy(AbstractChart<?,?> chart)
chart
- the chart instance.