Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/CoralineAda/seer
Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.
https://github.com/CoralineAda/seer
Last synced: 3 months ago
JSON representation
Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.
- Host: GitHub
- URL: https://github.com/CoralineAda/seer
- Owner: CoralineAda
- License: mit
- Created: 2009-11-24T20:22:29.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2011-09-06T00:28:45.000Z (about 13 years ago)
- Last Synced: 2024-07-22T22:18:54.186Z (4 months ago)
- Language: Ruby
- Homepage: http://www.idolhands.com/ruby-on-rails/gems-plugins-and-engines/graphing-for-ruby-on-rails-with-seer
- Size: 174 KB
- Stars: 133
- Watchers: 5
- Forks: 15
- Open Issues: 6
-
Metadata Files:
- Readme: README.rdoc
- License: LICENSE
Awesome Lists containing this project
README
=Seer
Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.
==Usage
Add the following to the head of the page that will display a chart, or add it to your layout file:
<%= Seer::init_visualization -%>
Gather the data you want to visualize in an instance variable in your controller, then use the visualize method to insert the appropriate chart in your view.
== Example
In your controller:
# @data must be an array, and each object in the array must respond to the data method specified
# in the visualize call (in this example, 'quantity')
@data = Widget.all
In your view:
<%= Seer::visualize(
@widgets,
:as => :bar_chart,
:in_element => 'chart',
:series => {:series_label => 'name', :data_method => 'quantity'},
:chart_options => {
:height => 300,
:width => 200 * @widgets.size,
:is_3_d => false,
:legend => 'none',
:colors => ["#990000"],
:title => "Widget Quantities",
:title_x => 'Quantity',
:title_y => 'Widgets'
}
)
-%>== More information
For examples of additional chart types, refer to the documentation for each of the individual chart objects, or see the blog post announcing Seer: {Simple, Semantic Graphing for Ruby on Rails with Seer}[http://www.idolhands.com/ruby-on-rails/gems-plugins-and-engines/graphing-for-ruby-on-rails-with-seer]
A {sample project}[http://github.com/Bantik/seer_sample] that demonstrates each of the chart types is available on GitHub.
Seer is developed and maintained by {Corey Ehmke}[http://www.idolhands.com/] at {SEO Logic}[http://www.seologic.com/].
Copyright (c) 2010 Corey Ehmke / SEO Logic, released under the MIT license