RailsCod3rFuture said about 7 years ago on Charts and Graphs :

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