如果可能的话,我想更改浏览器窗口的图表大小。
这是我的代码:
<b:column col-xs="12" col-md="12" >
<p:chart widgetVar="foo" type = "pie" model="#{graphicBean.pieModel}" rendered="#{not empty graphicBean.pieModel}"/>
</b:column>
答案 0 :(得分:2)
The <p:chart>
supports responsive mode. Set it to 'true'. The following line is from Primefaces documentation.
In responsive mode, chart is redrawn when window is resized
<p:chart type="line" model="#{chartView.lineModel1}" style="height:300px;" responsive="true"/>
Please refer this for an example.