apps / maps / views / requetes.js /
Newer Older
17 lines | 0.828kb
initial commit
admin cloud-section (root) authored on 2016-12-10
1
requetes["Scores candidat-e (ou liste de) soutenu-e (en %)"] = function (req, callback) {
2
    var from_where = ' from scrutins where soutien is 1 and ' + sql_election[req.election] + ' and ' + sql_section[req.section];
3
    resultat_par_bureau(from_where, 'voix', 'exprimes', 'lightness', 'résultat', '%', function (gradient) {
4
        callback(req.section, gradient);
5
    });
6
};
7

            
8
requetes["Abstention seule (%)"] = "";
9

            
10
requetes["Score soutien (%) + abstention (%)"] = "";
11

            
12
requetes["Evolution avec autre scrutin"] = function (req, callback) {
13
    var from_where = ' from scrutins where soutien is 1 and ' + sql_election[req.election] + ' and ' + sql_section[req.section];
14
    resultat_par_bureau(from_where, 'voix', 1, 'lightness', 'résultat', 'abs', function (gradient) {
15
        callback(req.section, gradient);
16
    });
17
};