forked from JeffLtz/annotatedtimeline-for-rails
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathREADME
49 lines (28 loc) · 1.79 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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