Center D3 Piechart in the center of a div, respecting it's dimensions
<p>I'm having some difficulties with centering a piechart I created in D3 in it's parents div. I've set up a JS-fiddle right here: <a href="https://jsfiddle.net/86czgLnu/" rel="nofollow noreferrer">https://jsfiddle.net/86czgLnu/</a></p>

<p>The problem is that it overflows it's parents dimensions and I want it to scale to fit and be in the center of the parent. I found documentation about preserveAspectRatio and viewBox but wasn't able to fix it with those.</p>

<pre><code>All the code is in the fiddle
</code></pre>

<p>Thanks for having a look.</p>