mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-25 19:48:48 +01:00
42 lines
No EOL
1.3 KiB
Text
Executable file
42 lines
No EOL
1.3 KiB
Text
Executable file
&title=Actions in the last 30 days,{font-size:16},&
|
|
&y_legend=Number of actions,12,0x736AFF&
|
|
&x_legend=Number of days ago,12,0x736AFF&
|
|
&y_ticks=5,10,5&
|
|
&filled_bar=50,0x9933CC,0x8010A0,Created,9&
|
|
&filled_bar_2=50,0x0066CC,0x0066CC,Completed,9&
|
|
&line_3=3,0x00FF00, Avg Created, 9&
|
|
&line_4=3,0xFF0000, Avg Completed, 9&
|
|
&values=
|
|
<% 0.upto 29 do |i| -%>
|
|
<%= @actions_created_last30days_hash[i]%>,
|
|
<% end -%><%= @actions_created_last30days_hash[30]%>&
|
|
&values_2=
|
|
<% 0.upto 29 do |i| -%>
|
|
<%= @actions_done_last30days_hash[i]%>,
|
|
<% end -%><%= @actions_done_last30days_hash[30]%>&
|
|
&values_3=
|
|
<%0.upto 29 do |i| -%>
|
|
<%=@sum_actions_created_last30days/30.0-%>,
|
|
<%end-%>
|
|
<%=@sum_actions_created_last30days/30.0-%>&
|
|
&values_4=
|
|
<%0.upto 29 do |i| -%>
|
|
<%=@sum_actions_done_last30days/30.0-%>,
|
|
<%end-%>
|
|
<%=@sum_actions_done_last30days/30.0-%>&
|
|
&x_labels=
|
|
<%0.upto 29 do |i|
|
|
seconds = i * 24 * 60 * 60
|
|
delta = Time.now-seconds
|
|
-%>
|
|
<%= delta.strftime("%a %d-%m") -%>,
|
|
<% end
|
|
seconds = 29*25*60*60
|
|
delta = Time.now-seconds-%>
|
|
<%= delta.strftime("%a %d-%m") -%>&
|
|
&y_min=0&
|
|
<% # max + 10% for some extra space at the top
|
|
# add one to @max for people who have no actions completed yet.
|
|
# OpenFlashChart cannot handle y_max=0 -%>
|
|
&y_max=<%=@max+@max/10+1 -%>&
|
|
&x_label_style=9,,2,3& |