Accepted answer

According to that link you have to set two options for the chart:

<p-chart type="bar" width="400" height="400" [data]="data" [options]="options"></p-chart>

And in your Typescript Code:

options = {
  responsive: false,
  maintainAspectRatio: false


Looking over the source code, p-chart takes width and height as component inputs, so putting them in [] should do the trick:

<p-chart type="bar" [width]="400" [height]="400" [data]="data"></p-chart>

Related Query

More Query from same tag