3.7.1 How can I hide the legend in a donut chart?

944 views
Skip to first unread message

Kristy Atkins

unread,
Feb 28, 2022, 7:56:33 AM2/28/22
to Chart.js User Discussion
I see in the docs:
" The doughnut, pie, and polar area charts override the legend defaults. To change the overrides for those chart types, the options are defined in Chart.overrides[type].plugins.legend."

I cannot figure out how to do this.
Using version 3.7.1 how do I hide the legend?

Kristy Atkins

unread,
Feb 28, 2022, 8:19:01 AM2/28/22
to Chart.js User Discussion
Chart.overrides.doughnut.plugins.legend.display = false;
Reply all
Reply to author
Forward
0 new messages