     .tickFormat(shortMagnitudeFormat)
     .tickSize(-w, 0, 0)
 
-  tseries = parent
+  tsvg = parent
     .append("svg")
       .datum(data)
       .attr("width", w + margin.left + margin.right)
       .attr("height", h + margin.top + margin.bottom)
-    .append("g")
+  
+  tsvg.append("text")  
+    .attr("class", "title")
+    .attr("x",  margin.left + w/2)
+    .attr("y", 20)
+    .attr("text-anchor", "middle")
+    .text(if title.length < 50 then title else title.substr(0, 47)+"..")
+
+  tseries = tsvg.append("g")
       .attr("transform", "translate(" + margin.left + "," + margin.top + ")")
 
   tseries.append("rect")


# data is expected to be in the following form:
# [{date:new Date(1978, 0), inbound:123, outbound:321}, ...]
createTimeSeries = (parent, data) ->
  margin = {top: 15, right: 3, bottom: 14, left: 46}
  w = 200 - margin.left - margin.right
  h = 100 - margin.top - margin.bottom

  hasIn = data[0]?.inbound?
  hasOut = data[0]?.outbound?





svg = d3.select("#bubblesChart")
  .append("svg")
    .attr("width", bubblesChartWidth)
    .attr("height", bubblesChartHeight)
