score:1

the legends namespace has been changed in v3, it is now configured in the plugins section, where you also configured the title.

to achieve an external legend you will need to use a custom plugin which you also need to configure in the plugins section.

you can copy paste the plugin from this official example: https://www.chartjs.org/docs/master/samples/legend/html.html

the only things you need to configure are:

  • for the internal legend plugin you need to disable it
  • for the custom legend plugin you need to provide it with the id of the div it needs to target to generate the legend in.

Related Query

More Query from same tag