mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 19:20:13 +01:00
41 lines
No EOL
1.1 KiB
Text
Executable file
41 lines
No EOL
1.1 KiB
Text
Executable file
&title=Completion time (all completed actions),{font-size:16},&
|
|
&y_legend=Actions,10,0x8010A0&
|
|
&y2_legend=Percentage,10,0xFF0000&
|
|
&x_legend=Running time of an action (weeks),12,0x736AFF&
|
|
&y_ticks=5,10,5&
|
|
&filled_bar=50,0x9933CC,0x8010A0&
|
|
&values=
|
|
<% @count = @max_days > @cut_off*7 ? @cut_off : @max_days/7
|
|
@count = @count.to_i
|
|
0.upto @count-1 do |i| -%>
|
|
<%= @actions_completion_time_hash[i] -%>,
|
|
<% end -%>
|
|
<%
|
|
@sum=0
|
|
@count.upto @max_days/7 do |i|
|
|
@sum += @actions_completion_time_hash[i]
|
|
end -%>
|
|
<%=@sum%>&
|
|
&line_2=2,0xFF0000&
|
|
&values_2=
|
|
<% total=0
|
|
@count = @max_days > @cut_off*7 ? @cut_off : @max_days/7
|
|
0.upto @count-1 do |i|
|
|
total += @actions_completion_time_hash[i]*100.0/@sum_actions -%>
|
|
<%= total -%>,
|
|
<% end -%>
|
|
<%= total+@sum*100.0/@sum_actions%>&
|
|
&x_labels=within 1,
|
|
<% 1.upto @count-1 do |i| -%>
|
|
<%= i %>-<%= i+1 %>,
|
|
<% end -%>
|
|
> <%= @count %>&
|
|
&y_min=0&
|
|
<% # add one to @max for people who have no actions completed yet.
|
|
# OpenFlashChart cannot handle y_max=0 -%>
|
|
&y_max=<%=1+@max_actions+@max_actions/10-%>&
|
|
&show_y2=true&
|
|
&y2_lines=2&
|
|
&y2_min=0&
|
|
&y2_max=100&
|
|
&x_label_style=9,,2,1& |