如何在primefaces 5.2中使用折线图扩展器属性 [英] How to use line chart extender attribute in primefaces 5.2

查看:286
本文介绍了如何在primefaces 5.2中使用折线图扩展器属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用primefaces 5.2最新版本并尝试使用折线图,其工作正常。

I'm using primefaces 5.2 latest version and tried for line chart,its working fine.

我试图更改折线图轴颜色,背景,边框。 ..etc.but extender属性在最新的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");






属性扩展器已在PrimeFaces 5.0中删除(另请参阅 p:chart 属性列表/guide/primefaces_user_guide_5_0.pdfrel =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中使用折线图扩展器属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆