]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Adding helpful note about legendCallback (#5094)
authorCameron Childress <cameronc@gmail.com>
Fri, 29 Dec 2017 07:52:17 +0000 (02:52 -0500)
committerSimon Brunel <simonbrunel@users.noreply.github.com>
Fri, 29 Dec 2017 07:52:17 +0000 (08:52 +0100)
I didn't realize you had to call generateLegend() manually and a quick search tells me that lots of other people have run into this too.

docs/configuration/legend.md

index bce69af79db1e2e88bc09066e753bd5654dde0ad..52bee8687c0440872e0c1ffdc41ba84b68aa5044 100644 (file)
@@ -164,3 +164,7 @@ var chart = new Chart(ctx, {
     }
 });
 ```
+
+Note that legendCallback is not called automatically and you must call `generateLegend()` yourself in code when creating a legend using this method.
+
+