         .style("cursor", "ns-resize")
         .on("mouseover", (d) -> d3.select(this).style("font-weight", "bold"))
         .on("mouseout",  (d) -> d3.select(this).style("font-weight", "normal"))
-        .on("mousedown.drag",  self.yaxis_drag)
-        .on("touchstart.drag", self.yaxis_drag)
+        .on("mousedown.drag",  @yaxis_drag)
+        .on("touchstart.drag", @yaxis_drag)
 
     gy.exit().remove();
-    self.plot.call(d3.behavior.zoom().x(self.x).y(self.y).on("zoom", self.redraw));
-    self.update();    
+    @plot.call(d3.behavior.zoom().x(@x).y(@y).on("zoom", @redraw));
+    @update();    
 
   update: () =>
     lines = @vis.select("path").attr("d", @line(@points));

    gxe.append("line")
        .attr("stroke", stroke)
        .attr("y1", 0)
        .attr("y2", self.size.height)

    gxe.append("text")
        .attr("class", "axis")
        .attr("y", self.size.height)
        .attr("dy", "1em")
        .attr("text-anchor", "middle")
        .text(fx)
        .style("cursor", "ew-resize")
        .on("mouseover", (d) -> d3.select(this).style("font-weight", "bold"))
        .on("mouseout",  (d) -> d3.select(this).style("font-weight", "normal"))
        .on("mousedown.drag",  self.xaxis_drag)
        .on("touchstart.drag", self.xaxis_drag);

    gx.exit().remove();

    # Regenerate y-ticks…
    gy = self.vis.selectAll("g.y")
        .data(self.y.ticks(10), String)
        .attr("transform", ty)

    gy.select("text")

      return "translate(0," + self.y(d) + ")"
    stroke = (d) ->
      return if d then "#ccc" else "#666"
    fx = @x.tickFormat(10)
    fy = @y.tickFormat(10)

    # Regenerate x-ticks…
    gx = @vis.selectAll("g.x")
        .data(@x.ticks(10), String)
        .attr("transform", tx)

    gx.select("text")
