Permalink
Browse files

pass along full details to hover details formatter callback

  • Loading branch information...
1 parent 358b3be commit e23031e70d92b509ed48445ccddcac2a7cc65b3f @dchester dchester committed Jun 3, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/js/Rickshaw.Graph.HoverDetail.js
@@ -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;
},
@@ -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);

0 comments on commit e23031e

Please sign in to comment.