Javascript Motion Chart