Chart.js custom legend with doughnut chart; Chartjs doughnut with multiple dataset issue in legend creation; Pie chart legend setting; ChartJS with legend; Add mouseout event handler to legends in Chart.js; Chart.js - Increase spacing between legend and chart; Chartjs custom dynamic legend; Chart js show/hide legend during runtime via buttonClick ; ChartJS to display legend; ChartJs to ⦠See the version list below for details. We can alter our chart to be responsive, and decide whether or not to maintain aspect ratio. For doghnut chart, the hidden attribute can work with datasets and data both. this will give you the event and legandItem. Otherwise refs will always be empty. You also learned about some global configuration options that can be used to change the fonts and tooltips of different charts. # legend_custom.css.legend span { width: 33.333333%; display: inline-block; text-align: center; cursor: pointer; color: white; } Doughnut and pie charts are both for the presentation of data distribution, so they come with the same settings. On the gif demo below, you can see how our chart will look like: Chart.js requires two variables: one that captures the HTML element (ctx in the example below) and one that holds the custom Chart object (myChart below). Package Manager .NET CLI PackageReference Paket CLI Install-Package ChartJs.Blazor -Version 0.6.0. dotnet add package ChartJs.Blazor --version 0.6.0