Optional height and width. Added window resize redraw.

Made height and width optional. If missing, the height or width will
be taken from the parent element.

Added a window resize hook to redraw graph. Combined with the parent
element dimensions, we can now make responsive graphs possible.