recently I've created a custom dashboard in moodle that show 2 pie chart next to each other but it's happening that, due to the fact their legends are different and occupy different height the pies are different conseguently.
So i have tought to not show the legend in order to have the pieswith the same size, as in the following code:
$chart = new \core\chart_pie();
$s = new \core\chart_series("Name", [10,20,30,40]);
$s->set_labels(["Label 1", "Label 2", "Label 3", "Label 4"]);
But, in this case when hovering on the pie an undefined text is showed in the tooltip because the tooltip code tryes to find the chartLabel that aren't provided.
So I've made this change to the lib/amd/src/chart_output_chartjs.js in order to not show the chartLabels if they are not provided.
Hope this could be merged in the moodle code base