For more information, see https://www.chartjs.org/docs/latest/configuration/legend.html
Create a blank legend object that can then be updated with the below functions
Is the legend shown?
Position of the legend (relative to the chart)
Marks that this box should take the full width of the canvas (pushing down other boxes). This is unlikely to need to be changed in day-to-day use.
Legend will show datasets in reverse order
Set properties for the labels of this legend
Set properties for the title of this legend
Properties for the labels that make up the legend
Create a blank labels object that can then be updated with the below functions
Specify the width of the coloured box / icon next to each legend entry
Specify the height of the coloured box / icon next to each legend entry
Set the text color to be used for legend labels
Set the font properties to be used for legend labels
Set the padding around each legend label
Set a special point style for the legend label boxes
Create a blank legend title object that can then be updated with the below functions
Set the text color for the legend title
Set the font properties for the legend title
Set the padding around the legend title
The chart legend displays data about the datasets that are appearing on the chart