Refactoring: abstracting, encapsulating Dygraph options and label setup.