How do I change the legend position in a NVD3 chart?-open source projects novus/nvd3

Brian Hogan

You can permanently change the position of the legend for an nvd3 chart model by editing the JS file itself. This may work better for chart refreshing than including the positioning in your initialization. Search the JS (like multiBarChart.js or lineChart.js) for: g.select('.nv-legendWrap'). An .attr will be defined just after that, replace that with:

.attr('transform', 'translate(10,270)')

Where 10 is the x value the legend is shifted and 270 is the y value it is shifted.