Skip to content

kmarsh/chart_fu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chart_fu is a charting library for Ruby with multiple backend support and easy, convention over configuration, data access.

== Examples

The simplest thing that could possibly work:

<%= chart_fu Post %>

Would give you a Google Chart with the number of posts created per day.

Adding a few more options:

<%= chart_fu Post, :title => "Posts Over Time", :from => 1.week.ago %>

chart_fu understands other Ruby data structures as well:

<%= chart_fu [1, 2, 3, 4, 5], [5, 4, 3, 2, 1] %>

<%= chart_fu [1, 2, 3, 4, 5] %>

<%= chart_fu {"A" => [1, 2, 3, 4, 5], "B" => [1, 2, 3, 4, 5]} %>

<%= chart_fu {Date.new(2008, 2, 1) => 1, Date.new(2008, 3, 1) => 5},
      :from => Date.new(2008, 1, 1), :to => Date.new(2008, 12, 31) %>

== Principles

chart_fu aims to be civil when collecting data and displaying charts, using sensible defaults that will create meaningful, pleasing, and readable output.

== Backends

chart_fu doesn't generate graphics on its own, but rather acts as a abstract frontend to whatever charting library you choose. This means only having to write charting code once and only once.

Support is planned for:

== Inspiration

The inspiration for chart_fu came from the pain of switching charting libraries 3 times on lifemetric and spending way too much time trying to get simple charts done.

About

Easy charting library for Ruby with multiple backends

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages