demarches-normaliennes/app/views/shared/procedures/_stats.html.haml

48 lines
2 KiB
Text
Raw Normal View History

.statistiques{ 'data-controller': 'chartkick' }
2021-06-02 12:47:53 +02:00
%h1.new-h1= title
.stat-cards
- if @usual_traitement_time.present?
.stat-card.big-number-card
%span.big-number-card-title= t('.usual_processing_time')
2021-06-02 12:47:53 +02:00
%span.big-number-card-number
= distance_of_time_in_words(@usual_traitement_time)
%span.big-number-card-detail
= t('.processing_time_description', percentile: ProcedureStatsConcern::USUAL_TRAITEMENT_TIME_PERCENTILE, span: ProcedureStatsConcern::NB_DAYS_RECENT_DOSSIERS, days: distance_of_time_in_words(@usual_traitement_time))
2021-06-02 12:47:53 +02:00
2021-06-04 16:19:19 +02:00
.stat-cards
.stat-card.stat-card-half.pull-left
%span.stat-card-title= t('.processing_time')
.stat-card-details= t('.since_procedure_creation')
2021-06-04 16:19:19 +02:00
.chart-container
.chart
- colors = %w(#C3D9FF #0069CC #1C7EC9) # from _colors.scss
= column_chart @usual_traitement_time_by_month, ytitle: t('.nb_days'), legend: "bottom", label: t('.processing_time_graph_description')
2021-06-04 16:19:19 +02:00
2021-06-02 12:47:53 +02:00
.stat-card.stat-card-half.pull-left
%span.stat-card-title= t('.status_evolution')
.stat-card-details= t('.status_evolution_details')
2021-06-02 12:47:53 +02:00
.chart-container
.chart
= area_chart @dossiers_funnel, ytitle: t('.dossiers_count'), label: t('.dossiers_count')
2021-06-02 12:47:53 +02:00
2021-06-08 14:47:36 +02:00
.stat-cards
2021-06-02 12:47:53 +02:00
.stat-card.stat-card-half.pull-left
%span.stat-card-title= t('.acceptance_rate')
.stat-card-details= t('.acceptance_rate_details')
2021-06-02 12:47:53 +02:00
.chart-container
.chart
= pie_chart @termines_states,
code: true,
colors: %w(#387EC3 #AE2C2B #FAD859),
label: t('.rate'),
suffix: '%',
library: { plotOptions: { pie: { dataLabels: { enabled: true, format: '{point.name} : {point.percentage: .1f}%' } } } }
2021-06-02 12:47:53 +02:00
2021-06-08 14:47:36 +02:00
.stat-card.stat-card-half.pull-left
%span.stat-card-title= t('.weekly_distribution')
.stat-card-details= t('.weekly_distribution_details')
2021-06-08 14:47:36 +02:00
.chart-container
.chart
= line_chart @termines_by_week, colors: ["#387EC3", "#AE2C2B", "#FAD859"], ytitle: t('.dossiers_count')