From e1f907dcac70f4ad6ebeb345ff5e9c850fe7435f Mon Sep 17 00:00:00 2001 From: Breno Teixeira Date: Sun, 27 Jul 2014 13:16:52 -0300 Subject: [PATCH] Adicionando a funcao toggle nas divs dos graficos --- .../templates/diagnosticos/graficos.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sigi/apps/diagnosticos/templates/diagnosticos/graficos.html b/sigi/apps/diagnosticos/templates/diagnosticos/graficos.html index 44d3160..661e4b0 100644 --- a/sigi/apps/diagnosticos/templates/diagnosticos/graficos.html +++ b/sigi/apps/diagnosticos/templates/diagnosticos/graficos.html @@ -20,10 +20,11 @@ jQuery(document).ready(function () { var output_id = 'output_'+id jQuery.ajax({ url: jQuery(this).attr('href'), - data: output_id, success: function(data) { - var ctx = document.getElementById("myChart").getContext("2d"); + var ctx = document.getElementById(output_id).getContext("2d"); var myNewChart = new Chart(ctx).Pie(data); + + $('#canvas_' + id).toggle(); }, error: function(errorSender, errorMsg) { @@ -50,12 +51,11 @@ jQuery(document).ready(function () {