RailsCod3rFuture said over 6 years ago on Charts and Graphs :

Your method is working perfectly in the rails console. I will test in the view today. Thanks.