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 () {
{{ pergunta.title }}
-{{ pergunta.title }}