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