Hmm, sounds like a bug to me. The problem is this bit of code in this file:
if ( margin.top != legend.height()) {
margin.top = legend.height();
availableHeight = (height || parseInt(container.style('height')) || 400)
- margin.top - margin.bottom;
}
This ignores the setting of margin.top
if a legend is shown by setting it to the height of the legend. You can of course hide the legend to get the top margin to be taken into account (which I have done here), but you can also set the top margin of the legend to achieve this:
chart.legend.margin({top: 30});
Complete demo here.