added events and fixed yaxis