pull dygraph stuff into helper—had to move some JS into header :(