Moving revenue graphing into a function.