Skip to content

Commit

Permalink
Fix x axis on history graph when only one item (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
rk1274 authored Nov 7, 2024
1 parent c3d7fd8 commit 879ae3b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/static/wrstat/src/HistoryGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ const paddingXL = 80,

const projectDate = maxDate = maxDate += (maxDate - minDate) / 5;

if (minDate === maxDate) {
minDate -= 2.5*86400000;
maxDate += 2.5*86400000;
}

minDate -= (maxDate - minDate) / 10;
maxDate += (maxDate - minDate) / 10;

Expand Down

0 comments on commit 879ae3b

Please sign in to comment.