mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
48 lines
2 KiB
Text
48 lines
2 KiB
Text
<%= render :partial => 'time_to_complete', :locals => {:ttc => actions.ttc} -%>
|
|
<%
|
|
options = {
|
|
width: "400px",
|
|
height: "400px",
|
|
maintainAspectRatio: false,
|
|
responsive: false,
|
|
plugins: {
|
|
colorschemes: {
|
|
scheme: 'brewer.Paired12'
|
|
}
|
|
}
|
|
}
|
|
%>
|
|
|
|
<p><%= t('stats.actions_actions_avg_created_30days', :count => (actions.created_last30days*10.0/30.0).round/10.0 )%>
|
|
<%= t('stats.actions_avg_completed_30days', :count => (actions.done_last30days*10.0/30.0).round/10.0 )%>
|
|
<%= t('stats.actions_avg_created', :count => (actions.created_last12months*10.0/12.0).round/10.0 )%>
|
|
<%= t('stats.actions_avg_completed', :count => (actions.done_last12months*10.0/12.0).round/10.0 )%></p>
|
|
|
|
<% actions.completion_charts.each do |chart| %><%=
|
|
render :partial => 'chart', :locals => {:chart => chart}
|
|
-%><% end %>
|
|
|
|
<br style="clear:both">
|
|
|
|
<% actions.timing_charts.each do |chart| %><%=
|
|
render :partial => 'chart', :locals => {:chart => chart}
|
|
-%><% end %>
|
|
|
|
<%
|
|
Rails.logger.info actions.running_time_data
|
|
%>
|
|
|
|
<%= bar_chart actions.running_time_data, library: { :series => { 0 => {type: "line"} } }, title: "Current running time of all incomplete actions" %>
|
|
|
|
<br style="clear:both">
|
|
|
|
<%= bar_chart actions.open_per_week_data, options.merge({scales: {yAxes: [{ scaleLabel: { display: true, labelString: 'Weeks ago'}}]}, 'title': {'display': true, 'text': 'Active (visible and hidden) next actions per week'}}) %>
|
|
|
|
<%= bar_chart actions.day_of_week_all_data, options.merge({'title': {'display': true, 'text': 'Day of week (all actions)'}}) %>
|
|
|
|
<%= bar_chart actions.day_of_week_30days_data, options.merge({'title': {'display': true, 'text': 'Day of week (past 30 days)'}}) %>
|
|
|
|
<%= bar_chart actions.time_of_day_all_data, options.merge({'title': {'display': true, 'text': 'Time of day (all actions)'}}) %>
|
|
|
|
<%= bar_chart actions.time_of_day_30days_data, options.merge({'title': {'display': true, 'text': 'Time of day (last 30 days)'}}) %>
|
|
|