prefer to use offsetWidth & offsetHeight when applicable. Add auto_test for dygraph...