0👍
You have to call your createChart function AFTER the chart canvas is visible i.e. after you switch (and have shown) the tab.
Doing it before that will result in Chartjs reading the canvas width and height as 0, thereby not showing the chart.
Source:stackexchange.com