     .attr "class", "d3plus_mouse_axis_label"
     .attr "id", (d) -> d+"_d3plusmouseaxislabel"
     .attr "dy", (d) ->
-      if d is "y"
+      if d.indexOf("y") is 0
         vars[d].ticks.font.size * 0.35
       else
         vars[d].ticks.font.size
-    .style "text-anchor", (d) -> if d is "y" then "end" else "middle"
+    .style "text-anchor", (d) ->
+      if d is "y"
+        "end"
+      else if d is "y2"
+        "start"
+      else
+        "middle"
     .attr "opacity", 0
     .attr "pointer-events", "none"
     .call textStyle


  rectStyle = (rect) ->
    getText = (axis) ->
      d3.select("text#"+axis+"_d3plusmouseaxislabel").node().getBBox()
    rect
      .attr "x", (d) ->
        width = getText(d).width
        if d is "x"
          x - width/2 - 5
        else
          graph.margin.left - vars[d].ticks.size - width - 10
      .attr "y", (d) ->
        mod = getText(d).height/2 + 5
        if d is "y" then y-mod else
          if node.d3plus.y0
            node.d3plus.y + (node.d3plus.y0 - node.d3plus.y)/2 +
            graph.margin.top - mod
          else graph.height + graph.margin.top + vars[d].ticks.size
      .attr "width", (d) -> getText(d).width + 10
      .attr "height", (d) -> getText(d).height + 10
      .style "stroke",

      .attr "font-family", (d) -> vars[d].ticks.font.family.value
      .attr "font-weight", (d) -> vars[d].ticks.font.weight
      .attr "x", (d) ->
        if d.indexOf("x") is 0
          x
        else if d is "y"
          graph.margin.left - 5 - vars[d].ticks.size
        else
          graph.margin.left + graph.width + 5 + vars[d].ticks.size
      .attr "y", (d) ->
        if d.indexOf("y") is 0
          y
        else if node.d3plus.y0
          node.d3plus.y + (node.d3plus.y0 - node.d3plus.y)/2 +
          graph.margin.top - 6
        else if d is "x"
          graph.height + graph.margin.top + 5 + vars[d].ticks.size
        else
          graph.margin.top - 5 - vars[d].ticks.size - (vars[d].ticks.font.size * 1.35)
      .attr "fill",
        if vars.shape.value is "area"
          "white"
