source: consulta_publica/consulta/templates/consulta.base.pie.graphic.html @ 59f3e60

constituyenteestudiantesgeneralplan_patriasala
Last change on this file since 59f3e60 was 8edb1df, checked in by rudmanmrrod <rudman22@…>, 7 años ago

Añadido reporte con filtro por territorio(estado,municipio o parroquia)

  • Propiedad mode establecida a 100644
File size: 1.2 KB
Línea 
1<div id="{{name}}_{{counter}}"></div>
2<script>
3    $(document).ready(function () {
4        var opciones = {{item.opciones|safe}};
5        var valores = {{item.valores}};
6        var datos = []
7        $.each(opciones,function(key){
8            datos.push({'name':opciones[key],'y':valores[key]})
9        });
10   
11        // Build the chart
12        Highcharts.chart('{{name}}_{{counter}}', {
13            chart: {
14                plotBackgroundColor: null,
15                plotBorderWidth: null,
16                plotShadow: false,
17                type: 'pie'
18            },
19            title: {
20                text: '{{item.titulo}}'
21            },
22            tooltip: {
23                pointFormat: '{series.name}: <b>{point.y}</b>'
24            },
25            plotOptions: {
26                pie: {
27                    allowPointSelect: true,
28                    cursor: 'pointer',
29                    dataLabels: {
30                        enabled: false
31                    },
32                    showInLegend: true
33                }
34            },
35            series: [{
36                name: 'Usuarios',
37                colorByPoint: true,
38                data: datos
39            }]
40        });
41});
42</script>
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.