title: showing custom tooltip for Discrete chart using nvd3
body: <p>I am looking for help to override default <strong>tooltip</strong> functionality for <strong>nvd3 bar (discrete) chart</strong>. </p>
  
  <p>The default tooltip picks yAxis ticks and show in the tooltip.</p>
  
  <p>However, in my case i don't want to show yAxis data (formatted in currency) in tooltip rather than i would like show actual yAxis value (original value without currency).</p>
  
  <p>This is how i am pushing values to my data[].</p>
  
  <pre><code>@foreach (var item in Model.BarChart)
    {
      string yvalue = item.Cost== 0 ? "undefined" : item.Cost.ToString();
      string xvalue = item.Date.ToString("yyyy/MM/dd");
      @:data[0].values.push({y: @yvalue, x: '@xvalue'});
    }
  </code></pre>
  
  <p>I am formatting yAxis tick using the following line of code</p>
  
  <pre><code>chart.yAxis.tickFormat(function(d) { return d3.format(".1s")(d) + " USD" });
  </code></pre>
  
  <p>Any hint?
  Let me know if you need more info? </p>
  
  <p>After googling, i found the following way but in this example <strong>'y'</strong> is yAxis value and not the original value. So, how i can replace this 'y' with orginal value?</p>
  
  <pre><code>chart.tooltip(function (key, x, y, e, graph) {
                  return '&lt;p&gt;&lt;strong&gt;' + key + '&lt;/strong&gt;&lt;/p&gt;' +
                  '&lt;p&gt;' + y + ' in the month ' + x + '&lt;/p&gt;';
              });
  </code></pre>