2013-03-02 12:09:25 -05:00
<%= render :partial => 'time_to_complete', :locals => {:ttc => actions.ttc} -%>
2019-05-17 19:34:49 +03:00
<%
options = {
2019-05-19 16:51:26 +03:00
width: "400px",
height: "400px",
plugins: {
colorschemes: {
scheme: 'brewer.Paired12',
},
},
2019-05-17 19:34:49 +03:00
}
%>
2013-03-02 10:48:08 -05:00
<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>
2007-09-13 03:21:37 +00:00
2019-05-19 16:40:00 +03:00
<%= bar_chart actions.done_last30days_data, options.merge({
scales: {
xAxes: [{ scaleLabel: { display: true, labelString: t('stats.legend.number_of_days')}}],
yAxes: [{ scaleLabel: { display: true, labelString: t('stats.legend.number_of_actions')}}],
},
'title': {'display': true, 'text': t('stats.actions_30days_title')},
}) %>
2007-09-13 03:21:37 +00:00
2019-05-19 16:40:00 +03:00
<%= bar_chart actions.done_last12months_data, options.merge({
scales: {
xAxes: [{ scaleLabel: { display: true, labelString: t('stats.legend.months_ago')}}],
yAxes: [{ scaleLabel: { display: true, labelString: t('stats.legend.number_of_actions')}}],
},
'title': {'display': true, 'text': t('stats.actions_lastyear_title')},
'onClick': 'function() { window.location.href = "' + url_for(:controller => 'stats', :action => 'actions_done_last_years') + '"; }',
}) %>
2007-09-13 03:21:37 +00:00
2019-05-19 16:40:00 +03:00
<%
# 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, ie. the left y-axis should be "Percentage".
%>
<%= bar_chart actions.completion_time_data, options.merge({
scales: {
xAxes: [{ scaleLabel: { display: true, labelString: t('stats.legend.running_time')}}],
yAxes: [{ scaleLabel: { display: true, labelString: t('stats.legend.actions')}}],
},
'title': {'display': true, 'text': t('stats.action_completion_time_title')}}) %>
2019-05-19 13:04:33 +03:00
<br style="clear:both">
2013-03-01 20:38:24 -05:00
2019-05-17 19:34:49 +03:00
<%
2019-05-19 16:40:00 +03:00
# 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, ie. the left y-axis should be "Percentage".
2019-05-17 19:34:49 +03:00
%>
2019-05-19 16:40:00 +03:00
<%= bar_chart actions.visible_running_time_data, options.merge({
scales: {
xAxes: [{ scaleLabel: { display: true, labelString: t('stats.running_time_legend.weeks')}}],
yAxes: [{ scaleLabel: { display: true, labelString: t('stats.running_time_legend.actions')}}],
},
'title': {'display': true, 'text': t('stats.current_running_time_of_incomplete_visible_actions')},
2019-05-19 17:39:38 +03:00
'onClick': 'function(event, array) { window.location.href = "' + url_for(:controller => 'stats', :action => 'show_selected_actions_from_chart', :id => "avrt") + '?index=" + array[0]._index; }',
2019-05-19 16:40:00 +03:00
}) %>
2019-05-12 14:10:59 +03:00
2019-05-19 16:40:00 +03:00
<%
# 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, ie. the left y-axis should be "Percentage".
%>
<%= bar_chart actions.running_time_data, options.merge({
scales: {
xAxes: [{ scaleLabel: { display: true, labelString: t('stats.running_time_all_legend.running_time')}}],
2019-05-19 17:39:38 +03:00
yAxes: [{ scaleLabel: { display: true, labelString: t('stats.running_time_all_legend.actions')}}],
2019-05-19 16:40:00 +03:00
},
'title': {'display': true, 'text': t('stats.running_time_all')},
2019-05-19 17:39:38 +03:00
'onClick': 'function(event, array) { window.location.href = "' + url_for(:controller => 'stats', :action => 'show_selected_actions_from_chart', :id => "art") + '?index=" + array[0]._index; }',
2019-05-19 16:40:00 +03:00
}) %>
2019-05-12 14:10:59 +03:00
2019-05-17 19:34:49 +03:00
<br style="clear:both">
2019-05-19 16:40:00 +03:00
<%= bar_chart actions.open_per_week_data, options.merge({
scales: {
xAxes: [{ scaleLabel: { display: true, labelString: t('stats.open_per_week_legend.weeks')}}],
yAxes: [{ scaleLabel: { display: true, labelString: t('stats.open_per_week_legend.actions')}}],
},
'title': {'display': true, 'text': t('stats.open_per_week')}}) %>
<%= bar_chart actions.day_of_week_all_data, options.merge({
scales: {
xAxes: [{ scaleLabel: { display: true, labelString: t('stats.actions_day_of_week_legend.day_of_week')}}],
yAxes: [{ scaleLabel: { display: true, labelString: t('stats.actions_day_of_week_legend.number_of_actions')}}],
},
'title': {'display': true, 'text': t('stats.actions_day_of_week_title')}}) %>
2019-05-12 14:10:59 +03:00
2019-05-19 16:40:00 +03:00
<%= bar_chart actions.day_of_week_30days_data, options.merge({
scales: {
xAxes: [{ scaleLabel: { display: true, labelString: t('stats.actions_dow_30days_legend.day_of_week')}}],
yAxes: [{ scaleLabel: { display: true, labelString: t('stats.actions_dow_30days_legend.number_of_actions')}}],
},
'title': {'display': true, 'text': t('stats.actions_dow_30days_title')}}) %>
2019-05-12 14:10:59 +03:00
2019-05-19 13:04:33 +03:00
<br style="clear:both">
2019-05-19 16:40:00 +03:00
<%= bar_chart actions.time_of_day_all_data, options.merge({
scales: {
xAxes: [{ scaleLabel: { display: true, labelString: t('stats.time_of_day_legend.time_of_day')}}],
yAxes: [{ scaleLabel: { display: true, labelString: t('stats.time_of_day_legend.number_of_actions')}}],
},
'title': {'display': true, 'text': t('stats.time_of_day')}}) %>
2019-05-12 14:10:59 +03:00
2019-05-19 16:40:00 +03:00
<%= bar_chart actions.time_of_day_30days_data, options.merge({
scales: {
xAxes: [{ scaleLabel: { display: true, labelString: t('stats.tod30_legend.time_of_day')}}],
yAxes: [{ scaleLabel: { display: true, labelString: t('stats.tod30_legend.number_of_actions')}}],
},
'title': {'display': true, 'text': t('stats.tod30')}}) %>
2019-05-12 14:10:59 +03:00