title: d3 - attaching data to an axis for rescaling
body: <p>I want to switch between showing actual values and percentages on a scale.  At present the data is imported from a csv file and I process the csv to find the domain for the data and display the chart fine.  I can switch to showing percentage because the axis domain becomes 0 to 100, but I want to be able to switch back to the actual data domain without having to reprocess the csv file.</p>
  
  <p>Is it possible to attach the data to the axis so I can retrieve it?
   Something like this:</p>
  
  <pre><code>     vis.append("g")
                  .data([calculated_y_domain, [0, 100]])
                  .attr("class", "axis yaxis")
                  .attr("transform", "translate("+padding+",0)")
                  .call(yAxis);
  </code></pre>
  
  <p>Or is there a better approach?</p>
  
  <p>There is an example here <a href="http://bl.ocks.org/3131368" rel="nofollow">http://bl.ocks.org/3131368</a>
  Which I am in the process of tidying up, but the way I do it will depend on the best approach to switching the axis domain.</p>