   getSeries: (data) ->
     @seriesDataNames = {}
     series = []
-    _(data).each (seriesData, name) =>
-      seriesData = _.map seriesData, (s) -> { x: s[0], y: s[1] }
+
+    initialOrder = _.keys(data)
+
+    if @options.series
+      seriesOrder = _.keys(@options.series)
+      for name in seriesOrder
+        initialOrder = _.without initialOrder, name
+      initialOrder = seriesOrder.concat(initialOrder)
+
+    @seriesOrder = initialOrder unless @seriesOrder?
+
+    for name in @seriesOrder
+      seriesData = _.map data[name], (s) -> { x: s[0], y: s[1] }
       if @seriesColors[name]?
         color = @seriesColors[name]
       else

# Graph looks weird with series that have extreme drops to x: 0
# Series label get messed up when dragging brush

class PG.DataGraph


        stroke = no
      else
        stroke = color.stroke
      renderer = @options.series[name]?.renderer or @options.renderer
      seriesName = @options.series[name]?.name or name
      @seriesDataNames[seriesName] = name
      series.push {
