The RubyFreeChart is a wrapper for JFreeChart, a Java chart library that makes it easy for developers to display professional quality charts in their applications.
RubyFreeChart is an alternative for projects that for some reason cannot use JRuby and need to display data in high quality charts.
Currently, the only supported type of chart is a very small subset of the Pie Chart.
pie_chart = RubyFreeChart::PieChart.new pie_chart.title = "Cars by Color" pie_chart.width = 450 pie_chart.height = 300 pie_chart.add_value("Yellow", 87, "#FFFF00") pie_chart.add_value("Red", 34, "#FF0000") pie_chart.add_value("Black", 45, "#000") pie_chart.add_value("Blue", 60, "#0033CC") pie_chart.add_value("Green", 14, "#336633") pie_chart.render_png_to_file("test_chart.png")
Copyright © 2011 Christian Hein, released under the MIT license