1

im am using primefaces linechart xaxis having dates month/day/hour and yaxis having count and what exactly i need is when i zoom to day level values should change to day level and same as hour i tried many ways but no result.

Interval Selection Event in Primefaces Chart Link related to this but plot undefined when i use above link example.

  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>

Managed Bean: dataModel.setExtender("open"); chartcount is my widgetvar,bottormform is my form in which chart is located In above code i am getting plot undefined,target undefined. Thanks in adavance

Community
  • 1
  • 1
Swetha
  • 11
  • 4
  • You cannot do that IN the extender function. It is only for config related things. Overriding functions should be done like in the generic way of overriding functions in PrimeFaces (no time to find an example in StackOverflow right now, but there are) – Kukeltje Apr 24 '17 at 10:48
  • when i zoom i am unable to capture xaxis min and max values i am getting plot undefined – Swetha Apr 24 '17 at 10:58
  • Read my comment carefully... – Kukeltje Apr 24 '17 at 10:59

0 Answers0