mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-30 12:45:18 +01:00
Correct typo in variable name
This commit is contained in:
parent
1d932ccfe5
commit
ce9db80743
5 changed files with 14 additions and 14 deletions
|
|
@ -114,8 +114,8 @@ class StatsController < ApplicationController
|
|||
@actions_completion_time_array = cut_off_array_with_sum(@actions_completed_per_week_array, @count)
|
||||
@max_actions = @actions_completion_time_array.max
|
||||
|
||||
# get percentage done cummulative
|
||||
@cumm_percent_done = convert_to_cummulative_array(@actions_completion_time_array, @actions_completion_time.count)
|
||||
# get percentage done cumulative
|
||||
@cum_percent_done = convert_to_cumulative_array(@actions_completion_time_array, @actions_completion_time.count)
|
||||
|
||||
render :layout => false
|
||||
end
|
||||
|
|
@ -134,8 +134,8 @@ class StatsController < ApplicationController
|
|||
@actions_running_time_array = cut_off_array_with_sum(@actions_running_per_week_array, @count)
|
||||
@max_actions = @actions_running_time_array.max
|
||||
|
||||
# get percentage done cummulative
|
||||
@cumm_percent_done = convert_to_cummulative_array(@actions_running_time_array, @actions_running_time.count )
|
||||
# get percentage done cumulative
|
||||
@cum_percent_done = convert_to_cumulative_array(@actions_running_time_array, @actions_running_time.count )
|
||||
|
||||
render :layout => false
|
||||
end
|
||||
|
|
@ -163,8 +163,8 @@ class StatsController < ApplicationController
|
|||
@actions_running_time_array = cut_off_array_with_sum(@actions_running_per_week_array, @count)
|
||||
@max_actions = @actions_running_time_array.max
|
||||
|
||||
# get percentage done cummulative
|
||||
@cumm_percent_done = convert_to_cummulative_array(@actions_running_time_array, @actions_running_time.count )
|
||||
# get percentage done cumulative
|
||||
@cum_percent_done = convert_to_cumulative_array(@actions_running_time_array, @actions_running_time.count )
|
||||
|
||||
render :layout => false
|
||||
end
|
||||
|
|
@ -669,10 +669,10 @@ class StatsController < ApplicationController
|
|||
return Array.new(cut_off){|i| array[i]||0}
|
||||
end
|
||||
|
||||
def convert_to_cummulative_array(array, max)
|
||||
def convert_to_cumulative_array(array, max)
|
||||
# calculate fractions
|
||||
a = Array.new(array.size){|i| array[i]*100.0/max}
|
||||
# make cummulative
|
||||
# make cumulative
|
||||
1.upto(array.size-1){ |i| a[i] += a[i-1] }
|
||||
return a
|
||||
end
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ time_labels[@count] = "> #{@count}"
|
|||
&filled_bar=50,0x9933CC,0x8010A0&
|
||||
&values=<%= @actions_completion_time_array.join(",")%>&
|
||||
&line_2=2,0xFF0000&
|
||||
&values_2=<%= @cumm_percent_done.join(",")%>&
|
||||
&values_2=<%= @cum_percent_done.join(",")%>&
|
||||
&x_labels=<%= time_labels.join(",")%>&
|
||||
&y_min=0&
|
||||
<%
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ time_labels[@count] = "> #{@count}"
|
|||
&values=<%= @actions_running_time_array.join(",") -%>&
|
||||
&links=<%= url_labels.join(",") %>&
|
||||
&line_2=2,0xFF0000&
|
||||
&values_2=<%= @cumm_percent_done.join(",") %>&
|
||||
&values_2=<%= @cum_percent_done.join(",") %>&
|
||||
&x_labels=<%= time_labels.join(",") %> &
|
||||
&y_min=0&
|
||||
<%
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ time_labels[@count] = "> #{@count}"
|
|||
&values=<%= @actions_running_time_array.join(",") -%>&
|
||||
&links=<%= url_labels.join(",") %>&
|
||||
&line_2=2,0xFF0000&
|
||||
&values_2=<%= @cumm_percent_done.join(",") -%>&
|
||||
&values_2=<%= @cum_percent_done.join(",") -%>&
|
||||
&x_labels=<%= time_labels.join(",")%>&
|
||||
&y_min=0&
|
||||
<%
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue