mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-25 08:34:08 +01:00
Updated to svn tags/tracks-1.6
This commit is contained in:
parent
103fcb8049
commit
02496f2d44
2274 changed files with 0 additions and 0 deletions
42
app/views/stats/actions_running_time_data.html.erb
Executable file
42
app/views/stats/actions_running_time_data.html.erb
Executable file
|
|
@ -0,0 +1,42 @@
|
|||
&title=Current running time of all incomplete actions,{font-size:16},&
|
||||
&y_legend=Actions,10,0x736AFF&
|
||||
&y2_legend=Percentage,10,0xFF0000&
|
||||
&x_legend=Running time of an action (weeks). Click on a bar for more info,11,0x736AFF&
|
||||
&y_ticks=5,10,5&
|
||||
&filled_bar=50,0x9933CC,0x8010A0&
|
||||
&values=
|
||||
<% @count = @max_days > @cut_off*7 ? @cut_off : (@max_days/7).to_i
|
||||
0.upto @count-1 do |i| -%>
|
||||
<%= @actions_running_time_hash[i] -%>,
|
||||
<% end -%>
|
||||
<%
|
||||
@sum=0
|
||||
@count.upto((@max_days/7).to_i) {|i| @sum += @actions_running_time_hash[i]} -%>
|
||||
<%=@sum%>&
|
||||
&links=<%
|
||||
0.upto(@count-1) { |i| %><%= url_for :controller => 'stats', :action => 'show_selected_actions_from_chart', :index => i, :id=> "art" %>, <% }
|
||||
%><%= url_for :controller => 'stats', :action => 'show_selected_actions_from_chart', :index => @count, :id=> "art_end" %>&
|
||||
&line_2=2,0xFF0000&
|
||||
&values_2=
|
||||
<% total=0
|
||||
@count = @max_days > @cut_off*7 ? @cut_off : (@max_days/7).to_i
|
||||
0.upto @count-1 do |i|
|
||||
total += @actions_running_time_hash[i] -%>
|
||||
<%= total*100.0/@sum_actions -%>,
|
||||
<% end -%>
|
||||
<%= (total+@sum)*100.0/@sum_actions%>&
|
||||
&x_labels=< 1,
|
||||
<% 1.upto @count-1 do |i| -%>
|
||||
<%= i %>-<%= i+1 %>,
|
||||
<% end -%>
|
||||
><%=@count-%>&
|
||||
&y_min=0&
|
||||
<% @max_actions = @sum > @max_actions ? @sum : @max_actions -%>
|
||||
<% # 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-%>&
|
||||
&x_label_style=9,,2,2&
|
||||
&show_y2=true&
|
||||
&y2_lines=2&
|
||||
&y2_min=0&
|
||||
&y2_max=100&
|
||||
Loading…
Add table
Add a link
Reference in a new issue