deblock language-js"><pre><code class="qm-code-font"><span class="hljs-comment">// function that fills a node with a random pie chart for this example</span>
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">createPie</span>(<span class="hljs-params">node, color</span>) </span>{
  <span class="hljs-keyword">var</span> count = <span class="hljs-number">10000</span>
  <span class="hljs-keyword">var</span> n1 = <span class="hljs-built_in">Math</span>.random() * cou