Skip to content

Commit

Permalink
Merge pull request #1023 from danxshap/time_fix
Browse files Browse the repository at this point in the history
Remove some incorrect else-if logic in time plugin.
  • Loading branch information
dnschnur committed Apr 20, 2013
2 parents bb52518 + a35c7ab commit 87f9c78
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions jquery.flot.time.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,17 +294,23 @@ API.txt for details.

if (step >= timeUnitSize.minute) {
d.setSeconds(0);
} else if (step >= timeUnitSize.hour) {
}
if (step >= timeUnitSize.hour) {
d.setMinutes(0);
} else if (step >= timeUnitSize.day) {
}
if (step >= timeUnitSize.day) {
d.setHours(0);
} else if (step >= timeUnitSize.day * 4) {
}
if (step >= timeUnitSize.day * 4) {
d.setDate(1);
} else if (step >= timeUnitSize.month * 2) {
}
if (step >= timeUnitSize.month * 2) {
d.setMonth(floorInBase(d.getMonth(), 3));
} else if (step >= timeUnitSize.quarter * 2) {
}
if (step >= timeUnitSize.quarter * 2) {
d.setMonth(floorInBase(d.getMonth(), 6));
} else if (step >= timeUnitSize.year) {
}
if (step >= timeUnitSize.year) {
d.setMonth(0);
}

Expand Down

0 comments on commit 87f9c78

Please sign in to comment.