Fix time output in history.
Improve piechart coloring.