title: Convert result to percentage in d3
body: <p>I'm only starting to learn d3.js + Line chart with Legend &amp; Tooltips. And I'm able to make it work but what I want is to have the yAxis result to be in percentage format. Tried using tickFormat but somehow it doesn't convert my raw number to percentage. T__T</p>
  
  <p>Here is my js code</p>
  
  <pre><code>chart = d3LineWithLegend()
              .xAxis.label('Date')
              .width(700)
              .height(300)
              .yAxis.label('Frequency');
  
  
  var svg = d3.select('#histogram svg').datum(data);
  
  svg.transition().duration(1000)
    .attr('width', 700)
    .attr('height', 300)
    .call(chart);
  
  
  chart.dispatch.on('showTooltip', function(e) {
      var offset = $('#histogram').offset(), // { left: 0, top: 0 }
      left = e.pos[0] + offset.left,
      top = e.pos[1] + offset.top,
      // formatter = d3.format(".04f");
      formatter = d3.format(".0%");
      var yAxis = d3.svg.axis().orient("left").tickFormat(formatter);//added this part but it didn't work
      console.log(yAxis);
  
      var dateObj = (new Date(e.point[0]));
  
      var year = dateObj.getFullYear();
      var month = dateObj.getMonth() + 1;
      var day = dateObj.getDate();
      var hours = dateObj.getHours();
      var date = month + '-' + day + '-' + year;
      if(filter === 'hour') {
        date = date + ', ' + hours + ':00';
      }
  
      var content = '&lt;h3&gt;' + date + '&lt;/h3&gt;' +
                '&lt;p&gt;' +
                '&lt;span class="value"&gt;' + (e.point[1]) + '&lt;/span&gt;' +
                '&lt;/p&gt;';
  
      nvtooltip.show([left, top], content);
  });
  
  chart.dispatch.on('hideTooltip', function(e) {
     nvtooltip.cleanup();
  });
  </code></pre>
  
  <p>What seem to be the problem in my above code? If I don't make it work on the client side I'm thinking of adjusting this in server side. But too much work.</p>