source: consulta_publica/consulta/templates/consulta.base.column.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.8 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 total = 0;
7        var datos = []
8        $.each(opciones,function(key){
9            datos.push([opciones[key],valores[key]])
10        });
11        // Build the chart
12        Highcharts.chart('{{name}}_{{counter}}', {
13            chart: {
14                plotBackgroundColor: null,
15                plotBorderWidth: null,
16                plotShadow: false,
17                type: 'column'
18            },
19            title: {
20                text: '{{item.titulo}}'
21            },
22            tooltip: {
23                pointFormat: '{series.name}: <b>{point.y}</b>'
24            },
25            xAxis: {
26                type: 'category',
27                labels: {
28                    rotation: -45,
29                    style: {
30                        fontSize: '13px',
31                        fontFamily: 'Verdana, sans-serif'
32                    }
33                }
34            },
35            yAxis: {
36                min: 0,
37                title: {
38                    text: 'Cantidad'
39                }
40            },
41            legend: {
42                enabled: false
43            },
44            series: [{
45                name: 'Porcentaje',
46                colorByPoint: true,
47                data: datos,
48                dataLabels: {
49                    enabled: true,
50                    rotation: -90,
51                    color: '#FFFFFF',
52                    align: 'right',
53                    format: '{point.y}', // one decimal
54                    y: 10, // 10 pixels down from the top
55                    style: {
56                        fontSize: '13px',
57                        fontFamily: 'Verdana, sans-serif'
58                    }
59                }
60            }],
61
62        });
63});
64</script>
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.