mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-16 14:15:28 +01:00
Also removing some instance variables that were never invoked in the views. This sets up a future refactoring of the method of comptuting rolling averages, which differs between the two types of "last year" views being refactored.
31 lines
1.6 KiB
Text
Executable file
31 lines
1.6 KiB
Text
Executable file
<%-
|
|
url = url_for :controller => 'stats', :action => 'actions_done_last_years'
|
|
-%>
|
|
&title=<%= t('stats.actions_lastyear_title') %>,{font-size:16},&
|
|
&y_legend=<%= t('stats.legend.number_of_actions') %>,12,0x736AFF&
|
|
&x_legend=<%= t('stats.legend.months_ago') %>,12,0x736AFF&
|
|
&y_ticks=5,10,5&
|
|
&filled_bar=50,0x9933CC,0x8010A0,<%= t('stats.labels.created')%>,9&
|
|
&filled_bar_2=50,0x0066CC,0x0066CC,<%= t('stats.labels.completed') %>,9&
|
|
&line_3=2,0x00FF00, <%= t('stats.labels.avg_created') %>, 9&
|
|
&line_4=2,0xFF0000, <%= t('stats.labels.avg_completed') %>, 9&
|
|
&line_5=2,0x007700, <%= t('stats.labels.month_avg_created', :months => 3) %>, 9&
|
|
&line_6=2,0xAA0000, <%= t('stats.labels.month_avg_completed', :months => 3) %>, 9&
|
|
&line_7=1,0xAA0000&
|
|
&line_8=1,0x007700&
|
|
&values=<%= @actions_created_last12months_array.join(",")%>&
|
|
&links=<%= Array.new(13,url).join(",") %>&
|
|
&links_2=<%= Array.new(13,url).join(",") %>&
|
|
&values_2=<%= @actions_done_last12months_array.join(",")%>&
|
|
&values_3=<%= @created_count_array.join(",")%>&
|
|
&values_4=<%= @done_count_array.join(",")%>&
|
|
&values_5=<%= @actions_created_avg_last12months_array.join(",")%>&
|
|
&values_6=<%= @actions_done_avg_last12months_array.join(",")%>&
|
|
&values_7=<%= @interpolated_actions_created_this_month%>,<%=@actions_done_avg_last12months_array[1]%>&
|
|
&values_8=<%= @interpolated_actions_done_this_month%>,<%=@actions_created_avg_last12months_array[1]%>&
|
|
&x_labels=<%= @month_names.join(",")%>&
|
|
&y_min=0&
|
|
<% # 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,&
|