Skip to content

Commit

Permalink
pass along full details to hover details formatter callback
Browse files Browse the repository at this point in the history
  • Loading branch information
dchester committed Jun 3, 2012
1 parent 358b3be commit e23031e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/Rickshaw.Graph.HoverDetail.js
Expand Up @@ -30,7 +30,7 @@ Rickshaw.Graph.HoverDetail = Rickshaw.Class.create({
this.formatter = args.formatter || this.formatter;
},

formatter: function(series, x, y, formattedX, formattedY) {
formatter: function(series, x, y, formattedX, formattedY, d) {
return series.name + ': ' + formattedY;
},

Expand Down Expand Up @@ -155,7 +155,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.innerHTML = this.formatter(d.series, domainX, d.value.y, formattedXValue, d.formattedYValue, d);
item.style.top = this.graph.y(d.value.y0 + d.value.y) + 'px';

this.element.appendChild(item);
Expand Down

0 comments on commit e23031e

Please sign in to comment.