Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/multithreading/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Primefaces 5.2从p:chart获取jqplot实例_Primefaces_Jqplot - Fatal编程技术网

Primefaces 5.2从p:chart获取jqplot实例

Primefaces 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

<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"/>