mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-20 23:26:53 +01:00
Update charts.md (#7609)
This commit is contained in:
committed by
Evert Timberg
parent
48f6de2413
commit
8f417162db
@@ -29,12 +29,8 @@ Dataset controllers must implement the following interface.
|
||||
// Create elements for each piece of data in the dataset. Store elements in an array on the dataset as dataset.metaData
|
||||
addElements: function() {},
|
||||
|
||||
// Create a single element for the data at the given index and reset its state
|
||||
addElementAndReset: function(index) {},
|
||||
|
||||
// Draw the representation of the dataset
|
||||
// @param ease : if specified, this number represents how far to transition elements. See the implementation of draw() in any of the provided controllers to see how this should be used
|
||||
draw: function(ease) {},
|
||||
draw: function() {},
|
||||
|
||||
// Remove hover styling from the given element
|
||||
removeHoverStyle: function(element, datasetIndex, index) {},
|
||||
@@ -43,8 +39,8 @@ Dataset controllers must implement the following interface.
|
||||
setHoverStyle: function(element, datasetIndex, index) {},
|
||||
|
||||
// Update the elements in response to new data
|
||||
// @param reset : if true, put the elements into a reset state so they can animate to their final values
|
||||
update: function(reset) {}
|
||||
// @param mode : update mode, core calls this method using any of `'active'`, `'hide'`, `'reset'`, `'resize'`, `'show'` or `undefined`
|
||||
update: function(mode) {}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -53,7 +49,7 @@ The following methods may optionally be overridden by derived dataset controller
|
||||
```javascript
|
||||
{
|
||||
// Initializes the controller
|
||||
initialize: function(chart, datasetIndex) {},
|
||||
initialize: function() {},
|
||||
|
||||
// Ensures that the dataset represented by this controller is linked to a scale. Overridden to helpers.noop in the polar area and doughnut controllers as these
|
||||
// chart types using a single scale
|
||||
|
||||
Reference in New Issue
Block a user