]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Example code plugin outdated (#8230)
authorLeeLenaleee <39033624+LeeLenaleee@users.noreply.github.com>
Thu, 24 Dec 2020 14:40:13 +0000 (15:40 +0100)
committerGitHub <noreply@github.com>
Thu, 24 Dec 2020 14:40:13 +0000 (09:40 -0500)
Update example code.
As stated in the migration guide: `All plugin hooks have unified signature with 3 arguments: chart, args and options.`

docs/docs/developers/plugins.md

index cd3d62386d0edcdc586468a54b18fe50329b09ee..3156ac14cacc7eda06ea1b5f8a2f771d0d1f284a 100644 (file)
@@ -29,7 +29,7 @@ Plugins can also be defined directly in the chart `plugins` config (a.k.a. *inli
 ```javascript
 var chart = new Chart(ctx, {
     plugins: [{
-        beforeInit: function(chart, options) {
+        beforeInit: function(chart, args, options) {
             //..
         }
     }]