PrimeFaces 5.2 及更高版本中图表扩展器属性的替代方法是什么

编程入门 行业动态 更新时间:2024-10-27 04:27:49
本文介绍了PrimeFaces 5.2 及更高版本中图表扩展器属性的替代方法是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我使用的是 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 及更高版本中图表扩展器属性的替代方法是什么

本文发布于:2023-11-27 01:29:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1636012.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:更高   图表   属性   版本   方法

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!