Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Use the Google Visualization Annotated Timeline API with Rails

branch: master

This branch is 0 commits ahead and 0 commits behind master

add the license

latest commit 8ecb13fda3
Benjamin Stein authored September 09, 2008
Octocat-spinner-32 lib remove prototype dependency September 09, 2008
Octocat-spinner-32 tasks cleanup of svn files August 28, 2008
Octocat-spinner-32 test now taking dimensions as arguments. August 29, 2008
Octocat-spinner-32 LICENSE add the license September 09, 2008
Octocat-spinner-32 README add a license and improve the readme September 09, 2008
Octocat-spinner-32 Rakefile adding all the files. August 27, 2008
Octocat-spinner-32 init.rb Starting to make an actual test August 27, 2008
Octocat-spinner-32 install.rb adding all the files. August 27, 2008
Octocat-spinner-32 uninstall.rb adding all the files. August 27, 2008
README
AnnotatedTimeline
=================

AnnotatedTimeline is a Rails plugin that wraps up the for the Annotated Timeline widget from the Google Visualization API (http://code.google.com/apis/visualization/documentation/gallery/annotatedtimeline.html)

=== Usage: 

In your controller:
@data = {
	1.day.ago => { :foo=>123, :bar=>100 },
	2.day.ago => { :foo=>345, :bar=>200 }	
}

In the view:
<%= annotated_timeline @data, width, height, 'div-name', options %>

This will create a graph of "foo" & "bar" vs time.  It will be placed in a div with ID 'div-name'.


=== Options

:colors (array of strings) The colors to use to override the default google color scheme for the chart lines and labels. Each element is a string in a valid HTML color format. For example 'red' or '#00cc00'. 

:displayExactValues (boolean) - If set to false (the default), value displayed on top may be in a shorter approximated form (56.12k instead of 56123.45). If set to true, values will appear unchanged. 

:min (number) - Use to explicitly set the minimal value to show in the Y axis.

:scaleType (string) - 'fixed'(default) or 'maximize'. If 'maximize' is used, the range of the values axis will span between the minimal and maximal values of the DataTable. If 'fixed' is used, the range of the values axis will span between zero and the maximal values of the DataTable. 

:wmode (string) - 'opaque'(default), 'window' or 'transparent'. the Window Mode (wmode) parameter for the Flash chart. 

:zoomStartTime (datetime) -  	If specified, sets the start time of the selected zoom range. 

:zoomEndTime (datetime) -  If specified, sets the end time of the selected zoom range. 


=== Currently Unsupported options:
* :allowHtml
* :annotationsWidth
* :displayAnnotations
* :displayAnnotationsFilter


===License:

* MIT License


(C) Mobile Commons 2008
Something went wrong with that request. Please try again.