Primefaces 5.2从p:chart获取jqplot实例
我的网站上有这样的p:chartPrimefaces 5.2从p:chart获取jqplot实例,primefaces,jqplot,Primefaces,Jqplot,我的网站上有这样的p:chart <p:chart id="chart" type="line" widgetVar="chart" model="#{resultsViewController.areaModel}" style="height:600px"/> $('#chart').data('jqplot').plot.replot( { resetAxes: true } ); 不产生data()函数 另外,我知道可以为图表扩展Primefaces渲染器,但这不是我的
<p:chart id="chart" type="line" widgetVar="chart" model="#{resultsViewController.areaModel}" style="height:600px"/>
$('#chart').data('jqplot').plot.replot( { resetAxes: true } );
不产生data()函数
另外,我知道可以为图表扩展Primefaces渲染器,但这不是我的选择。好的,所以我通过PF客户端API上的有用链接找到了答案: 简单的回答是,您需要访问一个widgetVar属性,然后使用
PrimeFaces
object获取jqplot的实例,如下所示:
<p:chart id="chart" type="line" widgetVar="chart" model="#{resultsViewController.areaModel}" style="height:600px"/>
好的,多亏了PF客户端API上的有用链接,我找到了答案: 简单的回答是,您需要访问一个widgetVar属性,然后使用
PrimeFaces
object获取jqplot的实例,如下所示:
<p:chart id="chart" type="line" widgetVar="chart" model="#{resultsViewController.areaModel}" style="height:600px"/>