0

I want to implement wrapping long labels like http://bl.ocks.org/mbostock/7555321 in NVD3 Horizontal Multi-Bar Chart http://nvd3.org/examples/multiBarHorizontal.html

I tried to do it by adding some line break by <br /> or \n in label text like below:

var xTicks = d3.select('.nv-x.nv-axis > g > g').selectAll('g').selectAll('text');
xTicks.text(function(d,i){
  return d+"<br />"+i; // trying to test by adding iteration but it does not work
})

but I did not achieve it so Please suggest, how can I implement it using NVD3 library.

Vivek
  • 663
  • 2
  • 13
  • 40

0 Answers0