Note: I decided to refactor the code further after recording the episode. I moved the helper code into the Order model and changed the way the prices are grouped so there's no need for the ugly first.try(:total_price) call. The refactored version is below.
//= require raphael//= require morris
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
ykeys: ['price', 'shipping_price', 'download_price']
labels: ['Total Price', 'Shipping Price', 'Download Price']