2๐
โ
I think you have missed the registeration of Legend
in your initChart
method. Can you try importing it and adding it as or refer the sample stackblitz:
Chart.register(LineController, LineElement, PointElement, LinearScale, CategoryScale, Legend);
Also check the documentation to verify if anymore imports are missing or check the alternative as well in the integration section.
Source:stackexchange.com