Displays 60 data entries per page.
$ (Document). Ready (function (){
Mycharts ();
$ (". Dangqianpage"). Val (1 );
$ ("# Xia"). Click (function () {// next page
If (I1 + 60 <A. Length-1 ){
I1 = I1 + 60;
$ (". Dangqianpage"). Val (I1/60) + 1 );
$ ("P"). Val (I1/60) + 1 );
Mycharts ();
} Else {
Alert ("this last page! ");
}
});
$ ("# Shang"). Click (function () {// Previous Page
If (I1> = 1 ){
I1 = i1-60;
Mycharts ();
$ (". Dangqianpage"). Val (I1/60) + 1 );
$ ("P"). Val (I1/60) + 1 );
} Else {
Alert ("this is the homepage! ");
}
});
$ ("# First"). Click (function (){
I1 = 0;
Mycharts ();
$ (". Dangqianpage"). Val (I1/60) + 1 );
$ ("P"). Val (I1/60) + 1 );
});
$ ("# Last"). Click (function (){
I1 = A. Length-(A. Length % 60 );
Mycharts ();
$ (". Dangqianpage"). Val (I1/60) + 1 );
$ ("P"). Val (I1/60) + 1 );
});
$ ("# Jump"). Click (function (){
VaR jump = $ (". jumppage"). ATTR ("value ");
I1 = (jump-1) * 60
Mycharts ();
$ (". Dangqianpage"). Val (I1/60) + 1 );
VaR replace = (I1/60) + 1;
});
$ ("# Button1"). Click (function (){
});
});
Function mycharts () {// high Curve
Chart = new highcharts. Chart ({
Chart :{
Renderto: 'Container ',
Defaultseriestype: 'spline ',
Marginright: 10,
Zoomtype: 'X ',
Events :{
Load: function (){
VaR series = This. Series [0];
}
}
},
Title :{
Text: 'historical data curve'
},
Xaxis :{
Type: 'datetime ',
Tickpixelinterval: 100,
Datetimelabelformats:
{
Minute: '% E. % B % H: % m ',
Hour: '% B/% E % H: % m ',
Day: '% E/% B ',
Week: '% E. % B ',
Month: '% B % y ',
Year: '% y'
}
},
Yaxis :{
Title :{
Text: 'value'
},
Plotlines :[{
Value: 0,
Width: 1,
Color: '#000000'
}]
},
Tooltip :{
Formatter: function (){
Return '<B>' + this. Series. Name + '</B> <br/>' +
Highcharts. dateformat ('% Y-% m-% d % H: % m: % s', this. X) +' <br/> '+
Highcharts. numberformat (this. Y, 2 );
}
},
Plotoptions :{
Enabled: True
},
Legend :{
Enabled: false
},
Exporting :{
Enabled: false
},
Series :[{
Name: showtype,
Data: (function (){
VaR DATA = [],
Time = (new date (). gettime (),
I;
For (I = I1; I <I1 + 61 & I <A. length; I ++ ){
Data. Push ({
// Load data
X: T2 [I],
Y: A [I]
});
}
Return data;
})()
}]
});
Chart = NULL;
}