events:{
afterSetExtremes:function() {
var singleGraphMinMaxTableData=[];
for(z=0;z<singleGraphResponeFromAPIUserWhereRequired.length;z++){
var minAxis = this.min,
maxAxis = this.max,
points = this.chart.series[z].points;
/*
min = points[z].options.y,
max = points[z].y; */
//console.log("series
::"+JSON.stringify(this.chart.series[z].name));
var localArray=[];
$.each(points, function(i, p) {
if(p.x >=
minAxis && p.x <= maxAxis) {
localArray.push(p.y);
}
});
var min=
Math.min.apply(Math, localArray);
var max=
Math.max.apply(Math, localArray);
var name =this.chart.series[z].name;
var zoneAxis =this.chart.series[z].zoneAxis;
var
splittedName=name.split("/");
singleGraphMinMaxTableData[z]= new Array(splittedName[0],zoneAxis,splittedName[splittedName.length-1],min,max);
}
$('#singleGraphLineMinMaxTable').DataTable( {
data:
singleGraphMinMaxTableData,
"bDestroy":true,
columns: [
{
title: "<fmt:message key="lbl.text.name"/>" },
{
title: "<fmt:message key="lbl.text.type"/>" },
{
title: "<fmt:message key="lbl.text.selected"/>" },
{
title: "<fmt:message key="lbl.text.min"/>" },
{
title: "<fmt:message key="lbl.text.max"/>" }
]
} );
//console.log("singleGraphMinMaxTableData-->"+JSON.stringify(singleGraphMinMaxTableData));
}
},
No comments:
Post a Comment