   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

      { label: "last 24 hours", duration: "-1d" }
    ]
    dateFormat: "M d, yy"
    series: {
      renderer: "line"
    }
    detailSmoothing: 10
    overviewSmoothing: 10
    yAxisTickFormat: (y) -> y

# Graph looks weird with series that have extreme drops to x: 0

class PG.DataGraph

