mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-23 15:44:09 +01:00
47 lines
2.4 KiB
Text
47 lines
2.4 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>
|
|
|
|
<%= bar_chart actions.done_last30days_data, options.merge({'title': {'display': true, 'text': 'Actions in the last 30 days'}}) %>
|
|
|
|
<%= bar_chart actions.done_last12months_data, options.merge({'title': {'display': true, 'text': 'Actions in the last 12 months'}}) %>
|
|
|
|
<%= bar_chart actions.completion_time_data, options.merge({'title': {'display': true, 'text': 'Completion time (all completed actions)'}}) %>
|
|
|
|
<br style="clear:both">
|
|
|
|
<%
|
|
# TODO: There should be separate scales for percentage and amount of tasks so that the max of both is in the top of the chart.
|
|
%>
|
|
<%= bar_chart actions.visible_running_time_data, options.merge({'title': {'display': true, 'text': 'Current running time of incomplete visible actions'}}) %>
|
|
|
|
<%= bar_chart actions.running_time_data, options.merge({'title': {'display': true, 'text': '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)'}}) %>
|
|
|
|
<br style="clear:both">
|
|
|
|
<%= 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)'}}) %>
|
|
|