Open Flash Chart Lazy Rails Plugin

Pie

This is one of the graphs that cannot be done in css/html.

To create a pie you will need a Serie.



#label based
data=[['funky',200],['punky',300],['jazzy',120]]
soul = OpenFlashChartLazy::Serie.new(data)

then you will need to create the graph and add the serie



pie_chart = OpenFlashChartLazy::Pie.new('Media')
serie=OpenFlashChartLazy::Serie.new(soul)
pie_chart.add_serie(serie)

you can add attributes to the main graph



pie_chart.title[:style]='{bacground-color: #ffcc00;}'
pie_chart.bg_colour='#FFFFFF'
pie_chart.to_json
MIT License Pedro Visintin