diff --git a/app/controllers/stats_controller.rb b/app/controllers/stats_controller.rb index c6bdcbe28..a834dcc48 100644 --- a/app/controllers/stats_controller.rb +++ b/app/controllers/stats_controller.rb @@ -4,6 +4,8 @@ class StatsController < ApplicationController MEAN_NUMBER_OF_CHAMPS_IN_A_FORM = 24.0 def index + @dossiers_states = dossiers_states + procedures = Procedure.publiees_ou_closes dossiers = Dossier.state_not_brouillon @@ -14,7 +16,7 @@ class StatsController < ApplicationController @contact_percentage = contact_percentage - @dossiers_states = dossiers_states + @dossiers_states_for_pie = @dossiers_states.slice("Brouillon", "En construction", "En instruction", "Terminé") @procedures_cumulative = cumulative_hash(procedures, :published_at) @procedures_in_the_last_4_months = last_four_months_hash(procedures, :published_at) diff --git a/app/views/stats/index.html.haml b/app/views/stats/index.html.haml index 6f60f2628..07553baef 100644 --- a/app/views/stats/index.html.haml +++ b/app/views/stats/index.html.haml @@ -55,7 +55,7 @@ .chart-container .chart - = pie_chart @dossiers_states, + = pie_chart @dossiers_states_for_pie, colors: ["rgba(222, 238, 265, 1)", "rgba(191, 220, 249, 1)", "rgba(113, 176, 239, 1)", "rgba(61, 149, 236, 1)"] .stat-card.stat-card-half.pull-left