I tried height="100" and [height]="100" and both are ignored. The chart canvas continues to take up available space.
+1
Be carefull to something...
When you use Chart.js there is a default option called "maintainAspectRation" set to true.
So with this is option set to true, your graph height is overridden by the computed height according to the width.
I use the following option parameter :
this.diveChartOptions = {
scales: {
xAxes: [{
type: 'linear',
position: 'bottom'
}]
},
maintainAspectRatio: false
};
With this, my "height" parameter works well.
So I think there is no issue here.
Please try with the latest PrimeNG version and comment if the issue still persists.
Most helpful comment
Be carefull to something...
When you use Chart.js there is a default option called "maintainAspectRation" set to true.
So with this is option set to true, your graph height is overridden by the computed height according to the width.
I use the following option parameter :
With this, my "height" parameter works well.
So I think there is no issue here.