I have a simple scatter line chart within a bootstrap panel created with Chart.js. It works/displays perfectly fine until I put it inside an ngIf div. Has anyone come across this? Any idea on how to make the chart display? The point of the
<div class="panel panel-primary" style="border-color: #464646;">
<div class="panel-heading" style="border-color: #BBBBBB; height: 35px; padding-top: 3px;">
<div style="float: left; margin-top: 5px;">Line Chart</div>
<canvas id="myChart" width="325" height="325"></canvas>
#myChart is not present in the DOM when you're trying to initialize the chart. Try with
ng-show instead of
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.