[HistoryView] Fix a potential bug that ticks for a long time span aren't correct
[HistoryView] Simplify timeTickFormatter()