score:0

Accepted answer

The chart is not visible because the component host is an inline element. As such, it should not contain block elements like the div wrapper created by the Chart.js library.

Setting the display style attribute of the host to block or inline-block will make the chart visible:

:host {
  display: inline-block;
}

See this stackblitz for a demo.


Related Query

More Query from same tag