Refactor drawing functions, so that all functions now work on a graph.

- a graph has now `draw` ,`drawMetrcis` and `drawPoints` function
- every function works with canvas and SVG
- decouple the rendering from `graph`
- update API doc and example