]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Update charts.md (#7609)
authorJukka Kurkela <jukka.kurkela@gmail.com>
Sun, 12 Jul 2020 22:28:39 +0000 (01:28 +0300)
committerGitHub <noreply@github.com>
Sun, 12 Jul 2020 22:28:39 +0000 (18:28 -0400)
docs/docs/developers/charts.md

index dd98fd57aefa7154d7f3a5c4f77980b8c5d4c810..c415c52a27db35a2f9d4abc7c8f9847ff6f9c890 100644 (file)
@@ -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