public interface Controller
Modifier and Type | Method and Description |
---|---|
void |
addElementAndReset(Context jsThis,
AbstractChart<?,?> chart,
int index)
Create a single element for the data at the given index and reset its state.
|
void |
addElements(Context jsThis,
AbstractChart<?,?> chart)
Create elements for each piece of data in the dataset.
|
void |
draw(Context jsThis,
AbstractChart<?,?> chart,
double ease)
Draw the representation of the dataset.
|
ChartType |
getChartType()
Controller must define the extended chart to use.
If the controller does not extend any existing chart, returns null |
Type |
getType()
Controller must define a unique id in order to be configurable.
Returns the controller id. |
void |
initialize(Context jsThis,
AbstractChart<?,?> chart,
int datasetIndex)
Initializes the controller.
|
void |
removeHoverStyle(Context jsThis,
AbstractChart<?,?> chart,
StyleElement element)
Remove hover styling from the given element.
|
void |
setHoverStyle(Context jsThis,
AbstractChart<?,?> chart,
StyleElement element)
Add hover styling to the given element.
|
void |
update(Context jsThis,
AbstractChart<?,?> chart,
boolean reset)
Update the elements in response to new data.
|
Type getType()
ChartType getChartType()
null
null
if the controller does not extend any chart.void initialize(Context jsThis, AbstractChart<?,?> chart, int datasetIndex)
jsThis
- context of controllerchart
- chart instancedatasetIndex
- dataset indexvoid addElements(Context jsThis, AbstractChart<?,?> chart)
jsThis
- context of controllerchart
- chart instancevoid addElementAndReset(Context jsThis, AbstractChart<?,?> chart, int index)
jsThis
- context of controllerchart
- chart instanceindex
- dataset indexvoid draw(Context jsThis, AbstractChart<?,?> chart, double ease)
jsThis
- context of controllerchart
- chart instanceease
- if specified, this number represents how far to transition elements.void removeHoverStyle(Context jsThis, AbstractChart<?,?> chart, StyleElement element)
jsThis
- context of controllerchart
- chart instanceelement
- element to be removed.void setHoverStyle(Context jsThis, AbstractChart<?,?> chart, StyleElement element)
jsThis
- context of controllerchart
- chart instanceelement
- element to be set.void update(Context jsThis, AbstractChart<?,?> chart, boolean reset)
jsThis
- context of controllerchart
- chart instancereset
- if true, put the elements into a reset state so they can animate to their final values