Charts 无法更改素描饼图、条形图和折线图的宽度和高度?
我在应用程序中使用了素数饼图、折线图、条形图。在将打底版本更新为“打底”之前,我可以更改宽度和高度“^5.2.0-rc.1” 它在早期版本中运行良好。更新版本后,这些图表的宽度和高度不起作用。你能帮我解决这个问题吗Charts 无法更改素描饼图、条形图和折线图的宽度和高度?,charts,primeng,Charts,Primeng,我在应用程序中使用了素数饼图、折线图、条形图。在将打底版本更新为“打底”之前,我可以更改宽度和高度“^5.2.0-rc.1” 它在早期版本中运行良好。更新版本后,这些图表的宽度和高度不起作用。你能帮我解决这个问题吗 html: <p-chart type="pie" [data]="piedata" [width]="600" [height]="600" [options]="pieOptions"></p-chart> component.ts this.pie
html:
<p-chart type="pie" [data]="piedata" [width]="600" [height]="600" [options]="pieOptions"></p-chart>
component.ts
this.piedata = {
labels: this.chartGroupList,
datasets: [{
data: this.itemCountList,
backgroundColor:this.itemColorList,
hoverBackgroundColor:this.itemColorList
}]
};
pieOptions = {
responsive: false,
maintainAspectRatio: false,
};
html:
组件技术
此.piedata={
标签:this.chartGroupList,
数据集:[{
数据:此.itemCountList,
backgroundColor:this.itemColorList,
hoverBackgroundColor:this.itemColorList
}]
};
选项={
回答:错,
MaintaintAspectRatio:false,
};
在删除[选项]后,它工作正常
<p-chart type="pie" width="550px" height="550px" [data]="piedata"></p-chart>