|
|
@ -3,11 +3,12 @@ |
|
|
|
{% block content_title %}<h1>Graficos dos Diagnósticos</h1>{% endblock %} |
|
|
|
|
|
|
|
{% block extrahead %} |
|
|
|
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script> |
|
|
|
<script type="text/javascript" src="{{ STATIC_URL }}js/Chart.min.js"></script> |
|
|
|
<script src="http://code.highcharts.com/highcharts.js"></script> |
|
|
|
<script language=javascript> |
|
|
|
jQuery(document).ready(function () { |
|
|
|
<link rel="stylesheet" href="{{ STATIC_URL }}css/style.css"> |
|
|
|
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script> |
|
|
|
<script type="text/javascript" src="{{ STATIC_URL }}js/Chart.min.js"></script> |
|
|
|
<script src="http://code.highcharts.com/highcharts.js"></script> |
|
|
|
<script language=javascript> |
|
|
|
jQuery(document).ready(function () { |
|
|
|
|
|
|
|
jQuery("form#categoria select").change(function () { |
|
|
|
jQuery("form#categoria").submit() |
|
|
@ -24,6 +25,13 @@ jQuery(document).ready(function () { |
|
|
|
var ctx = document.getElementById(output_id).getContext("2d"); |
|
|
|
var myNewChart = new Chart(ctx).Pie(data); |
|
|
|
|
|
|
|
var canvas = $("#canvas_" + id); |
|
|
|
if (canvas.has('.pie-legend').length == 0) { |
|
|
|
var legendHolder = document.createElement('div'); |
|
|
|
legendHolder.innerHTML = myNewChart.generateLegend(); |
|
|
|
canvas.append(legendHolder.firstChild); |
|
|
|
} |
|
|
|
|
|
|
|
$('#canvas_' + id).toggle(); |
|
|
|
}, |
|
|
|
|
|
|
@ -34,12 +42,12 @@ jQuery(document).ready(function () { |
|
|
|
|
|
|
|
return false |
|
|
|
}); |
|
|
|
}); |
|
|
|
</script> |
|
|
|
}); |
|
|
|
</script> |
|
|
|
{% endblock %} |
|
|
|
|
|
|
|
{% block content %} |
|
|
|
<div id="content-main"> |
|
|
|
<div id="content-main"> |
|
|
|
<form id="categoria" action="." method="POST"> |
|
|
|
{% csrf_token %} |
|
|
|
<select name="categoria"> |
|
|
@ -64,5 +72,5 @@ jQuery(document).ready(function () { |
|
|
|
{% endfor %} |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{% endblock %} |