[Chartjs]-Chart doesn't render in angular 2 app

0๐Ÿ‘

โœ…

As it seems from your markup, it might be an issue with the warping of canvas element. Generally it is required to wrap the canvas element with a div element (or a element that has the style display: block set), like so :

<div class="chart-container">
    <canvas baseChart
            [data]="chartData"
            [labels]="chartLabels"
            [options]="chartOptions"
            [chartType]="chartType">
    </canvas>
</div>

This should solve your issue.

Leave a comment