Skip to content

Commit

Permalink
make sure to reference graph from this
Browse files Browse the repository at this point in the history
  • Loading branch information
dchester committed May 1, 2012
1 parent 4fbbfd2 commit dcb2ab9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/js/Rickshaw.Graph.HoverDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Rickshaw.Graph.HoverDetail = Rickshaw.Class.create({

if (e.target.nodeName != 'path' && e.target.nodeName != 'svg') return;

var graph = this.graph;

var eventX = e.offsetX || e.layerX;
var eventY = e.offsetY || e.layerY;

Expand Down Expand Up @@ -150,7 +152,7 @@ Rickshaw.Graph.HoverDetail = Rickshaw.Class.create({
var item = document.createElement('div');
item.className = 'item';
item.innerHTML = this.formatter(d.series, domainX, d.value.y, formattedXValue, d.formattedYValue);
item.style.top = graph.y(d.value.y0 + d.value.y) + 'px';
item.style.top = this.graph.y(d.value.y0 + d.value.y) + 'px';

this.element.appendChild(item);

Expand Down

0 comments on commit dcb2ab9

Please sign in to comment.