public final class DatasetsItemsSelector extends AbstractPlugin
AtLeastOneDatasetHandler
Modifier and Type | Field and Description |
---|---|
static DatasetsItemsSelectorOptionsFactory |
FACTORY
The factory to read options for plugin
|
static String |
ID
Plugin ID "charbadatasetsitemsselector".
|
Modifier and Type | Method and Description |
---|---|
void |
cleanSelection(IsChart chart)
Clears the selection on the chart.
|
void |
cleanSelection(IsChart chart,
boolean fireEvent)
Clears the selection on the chart and set if an event should fire on clear action.
|
static DatasetsItemsSelector |
get()
Returns the singleton instance of plugin.
|
double |
getPadding(IsChart chart)
Returns the padding height used by selection cleaner element if enabled.
This is very helpful when you have added padding for your purposes and you need to know the amount of space that the element allocated. |
boolean |
onBeforeEvent(IsChart chart,
PluginEventArgument argument)
Called before processing the specified 'event'.
If any plugin returns false , the event will be discarded. |
void |
onBeginDrawing(IsChart chart,
boolean overridePreviousUpdate)
Called before every drawing cycle, coming from initialization, updating or rendering of chart.
|
void |
onConfigure(IsChart chart)
Called before initializing configuration of 'chart'.
|
void |
onDestroy(IsChart chart)
Called after the chart as been destroyed.
|
void |
onEndDrawing(IsChart chart)
Called after every drawing cycle, coming from initialization, updating or rendering of chart.
|
void |
setSelection(IsChart chart,
Date from,
Date to)
Selects an area, invoked programmatically.
Values on axis are retrieved as date ( CartesianTimeAxis or CartesianTimeSeriesAxis ). |
void |
setSelection(IsChart chart,
double from,
double to)
Selects an area, invoked programmatically.
Values on axis are retrieved as number ( CartesianLinearAxis or CartesianLogarithmicAxis ). |
void |
setSelection(IsChart chart,
String from,
String to)
Selects an area, invoked programmatically.
Values on axis are retrieved as string ( CartesianCategoryAxis ). |
getId, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
onAfterBuildTicks, onAfterDataLimits, onAfterDatasetDraw, onAfterDatasetsDraw, onAfterDatasetsUpdate, onAfterDatasetUpdate, onAfterDraw, onAfterEvent, onAfterInit, onAfterLayout, onAfterRender, onAfterTooltipDraw, onAfterUpdate, onBeforeBuildTicks, onBeforeDataLimits, onBeforeDatasetDraw, onBeforeDatasetsDraw, onBeforeDatasetsUpdate, onBeforeDatasetUpdate, onBeforeDraw, onBeforeElementsUpdate, onBeforeInit, onBeforeLayout, onBeforeRender, onBeforeTooltipDraw, onBeforeUpdate, onInstall, onReset, onResize, onStart, onStop, onUninstall
public static final String ID
public static final DatasetsItemsSelectorOptionsFactory FACTORY
public static DatasetsItemsSelector get()
public double getPadding(IsChart chart)
chart
- chart instanceSelectionCleaner.DEFAULT_VALUE
if disabledpublic void cleanSelection(IsChart chart)
chart
- chart instance to clear the selectionpublic void cleanSelection(IsChart chart, boolean fireEvent)
chart
- chart instance to clear the selectionfireEvent
- if true
an event is fired otherwise not.public void setSelection(IsChart chart, String from, String to)
CartesianCategoryAxis
).chart
- chart instance to use for selectionfrom
- starting axis valueto
- ending axis valuepublic void setSelection(IsChart chart, double from, double to)
CartesianLinearAxis
or CartesianLogarithmicAxis
).chart
- chart instance to use for selectionfrom
- starting axis valueto
- ending axis valuepublic void setSelection(IsChart chart, Date from, Date to)
CartesianTimeAxis
or CartesianTimeSeriesAxis
).chart
- chart instance to use for selectionfrom
- starting axis valueto
- ending axis valuepublic void onConfigure(IsChart chart)
Plugin
chart
- the chart instance.public void onBeginDrawing(IsChart chart, boolean overridePreviousUpdate)
Plugin
chart
- the chart instanceoverridePreviousUpdate
- if true
the drawing was already running.public void onEndDrawing(IsChart chart)
Plugin
chart
- the chart instancepublic void onDestroy(IsChart chart)
Plugin
chart
- the chart instance.public boolean onBeforeEvent(IsChart chart, PluginEventArgument argument)
Plugin
false
, the event will be discarded.chart
- the chart instance.argument
- instance which contains event contextfalse
to discard the event.