public abstract class AbstractController extends Object implements Controller
null
, every method
will invoke the default implementation of parent chart.Constructor and Description |
---|
AbstractController() |
Modifier and Type | Method and Description |
---|---|
void |
addElementAndReset(ControllerContext context,
IsChart chart,
int index)
Create a single element for the data at the given index and reset its state.
|
void |
addElements(ControllerContext context,
IsChart chart)
Create elements for each piece of data in the dataset.
|
void |
draw(ControllerContext context,
IsChart chart,
double ease)
Draw the representation of the dataset.
|
void |
initialize(ControllerContext context,
IsChart chart,
int datasetIndex)
Initializes the controller.
|
void |
removeHoverStyle(ControllerContext context,
IsChart chart,
StyleElement element)
Remove hover styling from the given element.
|
void |
setHoverStyle(ControllerContext context,
IsChart chart,
StyleElement element)
Add hover styling to the given element.
|
void |
update(ControllerContext context,
IsChart chart,
boolean reset)
Update the elements in response to new data.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getType
public void initialize(ControllerContext context, IsChart chart, int datasetIndex)
Controller
initialize
in interface Controller
context
- context of controllerchart
- chart instancedatasetIndex
- dataset indexpublic void addElements(ControllerContext context, IsChart chart)
Controller
addElements
in interface Controller
context
- context of controllerchart
- chart instancepublic void addElementAndReset(ControllerContext context, IsChart chart, int index)
Controller
addElementAndReset
in interface Controller
context
- context of controllerchart
- chart instanceindex
- dataset indexpublic void draw(ControllerContext context, IsChart chart, double ease)
Controller
draw
in interface Controller
context
- context of controllerchart
- chart instanceease
- if specified, this number represents how far to transition elements.public void removeHoverStyle(ControllerContext context, IsChart chart, StyleElement element)
Controller
removeHoverStyle
in interface Controller
context
- context of controllerchart
- chart instanceelement
- element to be removed.public void setHoverStyle(ControllerContext context, IsChart chart, StyleElement element)
Controller
setHoverStyle
in interface Controller
context
- context of controllerchart
- chart instanceelement
- element to be set.public void update(ControllerContext context, IsChart chart, boolean reset)
Controller
update
in interface Controller
context
- context of controllerchart
- chart instancereset
- if true, put the elements into a reset state so they can animate to their final values