Events sorting and chart redrawing.

Added code so that the event bars are redrawn every time a new event is
added. The events are sorted by days left until deadline and redrawn.