nvd3.js - NVD3 RotateLabels not working on MultiChart -
first , last labels rendered incorrectly. know if there's way fix this, or bug?
here's how it's rendering me
the solution can change depending of elements you've inside body tag. i've selected .nv-x
.nv-axis
elements inside <body>
. line defines attr
option, can change de translate , rotate values.
var chart = nv.models.discretebarchart(); nv.addgraph(function() { ... (chart options chart.x , chart.y, load data, etc.) d3.select('body') .selectall('.nv-x.nv-axis > g') .selectall('g') .selectall('text') .attr('transform', function(d) { return 'translate (-13, 15) rotate(-45 0,0)' }); }); return chart; });
Comments
Post a Comment