mirror of
https://github.com/wezm/wezm.net.git
synced 2024-11-10 01:42:32 +00:00
Add buttons to show different time ranges
This commit is contained in:
parent
fa34d3eeb9
commit
c45adf16fa
1 changed files with 35 additions and 0 deletions
|
@ -33,6 +33,41 @@ jQuery(function() {
|
|||
};
|
||||
|
||||
jQuery.plot(self, data.history, options);
|
||||
|
||||
|
||||
$("#year").click(function () {
|
||||
$.plot(self, data.history, {
|
||||
xaxis: {
|
||||
mode: "time",
|
||||
minTickSize: [1, "month"] //,
|
||||
// min: (new Date("1990/01/01")).getTime(),
|
||||
// max: (new Date()).getTime()
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
$("#month").click(function () {
|
||||
$.plot(self, data.history, {
|
||||
xaxis: {
|
||||
mode: "time",
|
||||
min: (new Date("2010/08/21")).getTime(),
|
||||
max: (new Date()).getTime()
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#day").click(function () {
|
||||
$.plot(self, data.history, {
|
||||
xaxis: {
|
||||
mode: "time",
|
||||
min: (new Date("2010/09/21 00:00")).getTime(),
|
||||
max: (new Date()).getTime()
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue