Added option to pass callback and prepare function to constructor.

The callback is called with the chart at the end of all rendering.
The prepare function is called right before the chart is rendered,
thus allowing one to setup any context before changing the dom.