9👍
Try updating your template and wrap your canvas-element inside a div. Don’t know the cause to it but the problem seems to appear when the canvas-element is at the root of the template html.
Updated template:
<h2>Statistic</h2>
<div>
<canvas #canvas id="canvas"></canvas>
</div>
- [Chartjs]-How to make bar chart animation where all bars grow at the same speed?
- [Chartjs]-Charts.js candlestick (Financial Charts) displays half the bar in the beginning and the end
0👍
Have you considered looking into an existing adaptation to ChartJs with Angular2. For example
ng2-charts is a great alternative that you might be able to utilize that makes it easier to incorporate into your angular2 app.
Source:stackexchange.com