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