splitting the label and data arrays as required for dygraph