我使用的是 primefaces 5.2 最新版本并尝试了折线图,它工作正常.
I'm using primefaces 5.2 latest version and tried for line chart, it's working fine.
我正在尝试更改折线图轴的颜色、背景、边框等,但扩展器属性在最新的 primefaces 版本中不起作用.
Am trying to change the line chart axes color,background,border, etc. but extender attribute is not working in latest primefaces version.
我的 XHTML:
<p:chart type="line" model="#{chartViewLine.lineModel1}" styleClass="legendpos" extender="chartExtender" style="height:300px; width:570px;"/>JAVASCRIPT:
JAVASCRIPT:
function chartExtender() { this.cfg.grid = { background: 'transparent', gridLineColor: '#303030', drawBorder: false, };'extender' 属性是否有任何替代方法或我的代码有任何错误的语法?
Is any alternative for 'extender' attribute OR my code have any wrong syntax?
推荐答案您现在应该从您的 chartViewLine bean 中的模型设置扩展器.
You should now set your extender from your model in your chartViewLine bean.
LineChartModel model = new LineChartModel(); model.setExtender("chartExtender");属性 extender 已在 PrimeFaces 5.0 中删除(另请参阅 p:chart 属性列表docs/guide/primefaces_user_guide_5_0.pdf" rel="noreferrer">PrimeFaces 5.0 文档)
Attribute extender has been removed in PrimeFaces 5.0 (see also list of p:chart attributes from PrimeFaces 5.0 Documentation)
更多推荐
PrimeFaces 5.2 及更高版本中图表扩展器属性的替代方法是什么
发布评论