-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
76 lines (50 loc) · 1.69 KB
/
README
File metadata and controls
76 lines (50 loc) · 1.69 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Chartr
=======
The chartr plugin helps you create charts using the google chart API.
You can make
- line charts with a single line
- line charts with multiple lines
- stacked bar charts
Line charts:
============
The Google Chart API requires arguments that look roughly like this:
for size: chs=200x125
values : chd=s:4gsGr6a0
chart type: cht=lc
label types: chxt=x,y
labels: chxl=0:|Mar|Apr|May|June|July|1:||50+Kb
The plugin helps generate these values and format them correctly.
Colors for graphs with multiple lines alternate between
['FF0000', '00FF00', '0000FF', '000000', 'EAD5FC', 'FECF3D', '8F8F94', 'FFFF00', '00FFFF', '3F3F3F', 'D0D0D0']
and a legend labels array is also required.
Bar Chart
=========
You can also supply colors.
Args:
value_sets,
labels,
legend_labels,
title,
size="200x100",
max_y = nil,
colors = nil
Examples
========
Chartr.make_simple_line_chart [7,5,4,3,3,2,4],
['mon','tue','wed','thu','fri','sat','sun'],
'cups of coffee per day',
'200x100'%>
Chartr.make_multiple_line_chart [[7,5,4,3,3,2,4], [1,2,0,1,3,1]]
['mon','tue','wed','thu','fri','sat','sun'],
['coffee', 'wine'],
'cups of stuff per day',
'200x100'%>
Chartr.make_stacked_bar_chart(
[[8,8,8,8,8,16,16],[8,8,8,8,8,0,1],[8,8,8,8,8,8,7]],
day_labels(beginning_of_hour, 28),
['good', 'bad', "forgot"],
'Daily Good Hours Total',
'840x200',
24,
['00FF00', 'FF0000', '0000FF'])
Copyright (c) 2008 [Daniel Wiesmann], released under the MIT license