require 'alone' require 'al_graph_pie' class GraphSampleController < AlController def action_index() AlTemplate.run( 'index.rhtml' ) end def action_graph_sample() ydata1 = [5, 3, 6, 3, 2, 5, 6] labels = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] graph = AlGraphPie.new graph.add_data(ydata1, labels) graph.draw end end