Fix part 1 of Issue 256: Annotations attachAtBottom Property
authorDan Vanderkam <danvdk@gmail.com>
Sat, 9 Feb 2013 00:54:12 +0000 (19:54 -0500)
committerDan Vanderkam <danvdk@gmail.com>
Sat, 9 Feb 2013 00:54:12 +0000 (19:54 -0500)
plugins/annotations.js

index 6a24894..2ed48ca 100644 (file)
@@ -118,7 +118,7 @@ annotations.prototype.didDrawChart = function(e) {
     }
     div.style.left = (p.canvasx - width / 2) + "px";
     if (a.attachAtBottom) {
-      div.style.top = (area.h - height - tick_height) + "px";
+      div.style.top = (area.y + area.h - height - tick_height) + "px";
     } else {
       div.style.top = (p.canvasy - height - tick_height) + "px";
     }