Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.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
Jquery Primefaces折线图缩放值根据月/日/小时变化_Jquery_Jsf_Primefaces_Jqplot - Fatal编程技术网

Jquery Primefaces折线图缩放值根据月/日/小时变化

Jquery Primefaces折线图缩放值根据月/日/小时变化,jquery,jsf,primefaces,jqplot,Jquery,Jsf,Primefaces,Jqplot,我正在使用primefaces折线图xaxis有日期月/日/小时,yaxis有计数,我需要的是当我缩放到日级别时,值应更改为日级别,与小时相同。我尝试了许多方法,但没有结果 链接与此相关,但当我使用上述链接示例时,绘图未定义 Primefaces chart: <p:panel id="pnlChart" rendered="# {networkAnalysisReportController.selectedEventData ne null}" st

我正在使用primefaces折线图xaxis有日期月/日/小时,yaxis有计数,我需要的是当我缩放到日级别时,值应更改为日级别,与小时相同。我尝试了许多方法,但没有结果

链接与此相关,但当我使用上述链接示例时,绘图未定义

  Primefaces chart:
 <p:panel id="pnlChart" rendered="#              {networkAnalysisReportController.selectedEventData ne null}"  style="font-size: 11px;">
            <p:chart type="line" model="#{networkAnalysisReportController.dataModel}" style="height:400px;"
                     id="chartCount" widgetVar="chartCount" responsive="true"/>
        </p:panel>

javascript:
   <script type="text/javascript" >
  function open(){

  $('#bottomForm\\:chartCount').plot.target.bind('jqplotZoom',     function(plot){
        var minVal = plot.axes.xaxis.minx;
                    var maxVal = plot.axis.axes.max;
                    //perform task
                     document.getElementById('plcMasterForm:extChart').click();
                    //perform any action with these values
                 });
        }

</script>
Primefaces图表:
javascript:
函数open(){
$('#bottomForm\\:chartCount').plot.target.bind('jqplotZoom',function(plot){
var minVal=plot.axes.xaxis.minx;
var maxVal=plot.axis.axis.max;
//执行任务
document.getElementById('plcMasterForm:extChart')。单击();
//使用这些值执行任何操作
});
}
托管Bean: setExtender(“打开”); chartcount是我的widgetvar,BottorForm是我的图表所在的表单 在上面的代码中,我得到了未定义的绘图,未定义的目标。
非常感谢

您不能在extender函数中执行此操作。它仅用于配置相关的内容。重写函数应该像在PrimeFaces中重写函数的一般方式一样进行(现在没有时间在StackOverflow中找到示例,但确实有),当我缩放时,我无法捕获xaxis最小值和最大值,我正在得到未定义的绘图,请仔细阅读我的注释…您不能在extender函数中这样做。它仅用于配置相关的内容。重写函数应该像在PrimeFaces中重写函数的一般方式一样进行(现在没有时间在StackOverflow中找到示例,但确实有),当我缩放时,我无法捕获xaxis最小值和最大值,我正在得到未定义的绘图,请小心我的注释。。。