[Chartjs]-Ionic2: Use chartjs inside ion-segment

2๐Ÿ‘

โœ…

I had the same problem with chart.js in ion-segment and solved it by using the [hidden] directive, e.g.

 <canvas #canvas1 [hidden]="selectedValue!=1"></canvas>
 <canvas #canvas2 [hidden]="selectedValue!=2"></canvas>
 <canvas #canvas3 [hidden]="selectedValue!=3"></canvas>

Leave a comment