Pie Charts

INPUT:
    list with key and percent values which add up to 100%.

VARIABLES:
   columnOne - List of items, such as categories or status values.
   columnTwo - Percent values

DETAILS:

   When using the CLI pivot command use the -n option to remove the
   total row, and use the alter list command to drop the total column.

      pivot -n category statusClass
      alter list delete field TOTAL


EXAMPLE SCRIPT:

   tmpfilter init tracker
   tmpfilter set statusClass Open

   go $field.trackerId items
      pivot -n category statusClass

      # Get the sum of the open category values.
      ctf set total `function sum Open`

      # Do the averages.
      alter list add field percent expr (( $row.Open / $total ) * 100)

      # Tell the bar chart which field is column one.
      ctf set columnOne category
      ctf set columnTwo percent

      # Copy the results to the CLI clipboard - ALL Report scripts need this line.
      eval $obj->self->env->{ results } = $obj
