5
#myChart
is not present in the DOM when youโre trying to initialize the chart. Try with ng-show
instead of ng-if
.
Anyhow, it loook like youโre not initializing the chart from the controller once the data is populated, like you should do.
Hope it helps.
0
you have to create the Chart object only after the div is created, so call the function that create the Chart on the same place where you change the chartData.length
instead of calling it right after the component is created
Source:stackexchange.com