ragraph"><div class="docs-examples"><div class="docs-example"><div class="docs-example-body"><div id="example"></div><script>// function that fills a node with a random pie chart for this example
function createPie(node, color) {
  var count = 10000
  var n1 = Math.random() * count
  var n2 = count - n1

  pie = new hx.PieChart(node);
  pie.setData({
    name: "Orders Dispatched",
    segments: [
      {
        name: "Completed",
        size: n1,
        color: color
      },
      {
        name: "Remain