From b2f4e9d2c0748615d13937a29cf1f4e85b545b06 Mon Sep 17 00:00:00 2001 From: Guilherme Gondim Date: Fri, 18 Dec 2009 11:27:00 +0000 Subject: [PATCH] =?UTF-8?q?Adicionado=20mais=20um=20gr=C3=A1fico=20no=20da?= =?UTF-8?q?shboard.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sigi/context_processors.py | 6 +++++- .../snippets/modules/charts-convenios.html | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/sigi/context_processors.py b/sigi/context_processors.py index be1c40b..9e06722 100644 --- a/sigi/context_processors.py +++ b/sigi/context_processors.py @@ -25,8 +25,12 @@ def charts_data(request): convenios_firmados.filter(casa_legislativa__municipio__uf__regiao='SL').count() ] + equip_n_recebidos = convenios.filter(data_termo_aceite=None).count() + equip_recebidos = convenios.exclude(data_termo_aceite=None).count() + return { 'regioes_chart_data': [num_convenios_firmados_regiao, num_casas_regiao], 'convenios_chart_data': [num_convenios_firmados, num_convenios_nao_firmados, - num_casas_nao_aderidas] + num_casas_nao_aderidas], + 'equipamentos_chart_data': [equip_recebidos, equip_n_recebidos] } diff --git a/sigi/templates/snippets/modules/charts-convenios.html b/sigi/templates/snippets/modules/charts-convenios.html index 7fc5cb5..78042b2 100644 --- a/sigi/templates/snippets/modules/charts-convenios.html +++ b/sigi/templates/snippets/modules/charts-convenios.html @@ -17,6 +17,13 @@ {% chart-colors "ff9900,ffc266" %} {% endchart %} +{% chart as equipamentos %} + {% chart-size 340 160 %} + {% chart-type "pie" %} + {% chart-labels "Recebidos" "Não recebidos" %} + {% chart-data equipamentos_chart_data %} +{% endchart %} +

Convênios

Convênios com as Casas Legislativas

@@ -32,3 +39,11 @@

+ +
+

Convênios

+

Casas Legislativas com equipamentos

+

+ +

+