fixed canvas onclick, graph will now be drawn on document ready