Good afternoon.
I ask you how to solve the problem with xAxis labels when the data is huge (overlapping layers) and you indicate me the insertion of a new lines (*), althought I have a probleme in my slipt function.
Someone have a soggestion for this problem.
My chart: http://jsfiddle.net/superboggly/tL2hW/
Solution:
var insertLinebreaks = function (d) {
var el = d3.select(this);
var words = d.split(' ');
el.text('');
for (var i = 0; i < words.length; i++) {
var tspan = el.append('tspan').text(words[i]);
if (i > 0)
tspan.attr('x', 0).attr('dy', '15');
}
};
svg.selectAll('g.x.axis g text').each(insertLinebreaks);