anchor.diff:        .attr("fill", "white")
         .attr("opacity", 0.75);
   
  -    svg.append("text")
  +    mask.append("text")
         .text("Preview")
         .attr("dy", ".4em")
         .style("text-anchor", "middle")
         .style("font-size", "1.9em");
  +  }
  +  else if (!preview) {
  +    children.remove();
     }
   
   };
  
positive.code:   return 0;
  }
  
  function update_data() {
    hide_percent();
    total_amount = 0;
  
negative.code:     });
    }
    data.sort(compare_categories);
  
    /* ------- PREVIEW IF NO DATA -------*/
    // data = [];
    if (data.length == 0) {
      preview = true;
      data = [
        {amount:165.34, category:"Groceries", amount_str:"$165.34"},
        {amount:110.07, category:"Bills",     amount_str:"$110.07"},
        {amount:49.12,  category:"Gas",       amount_str:"$49.12" },
        {amount:20.81,  category:"Other",     amount_str:"$20.81" }
      ]
    }
  
    change(data);
  }
  
  </script>
  
  