added option to flot to recalculate timestamps in local time.
use this options in vz options.
This commit is contained in:
parent
0f842f375a
commit
b849ae009f
2 changed files with 3 additions and 0 deletions
|
@ -1238,6 +1238,8 @@
|
|||
};
|
||||
|
||||
formatter = function (v, axis) {
|
||||
if (opts.useLocalTime)
|
||||
v -= new Date(v).getTimezoneOffset()*60000;
|
||||
var d = new Date(v);
|
||||
|
||||
// first check global format
|
||||
|
|
|
@ -53,6 +53,7 @@ vz.options.plot = {
|
|||
legend: { show: false },
|
||||
xaxis: {
|
||||
mode: 'time',
|
||||
useLocalTime: true,
|
||||
max: new Date().getTime(), // timeinterval to request
|
||||
min: new Date().getTime() - vz.options.defaultInterval,
|
||||
monthNames: ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
|
||||
|
|
Loading…
Add table
Reference in a new issue