An open API service indexing awesome lists of open source software.

https://github.com/chrishein/ruby_free_chart

Basic Ruby wrapper for JFreeChart
https://github.com/chrishein/ruby_free_chart

Last synced: about 2 months ago
JSON representation

Basic Ruby wrapper for JFreeChart

Awesome Lists containing this project

README

        

=Ruby Free Chart - Basic Ruby wrapper for JFreeChart

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.

==Usage

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")

==License
Copyright © 2011 Christian Hein, released under the MIT license