apps / maps / views / requetes.js /
admin cloud-section (root) initial commit
12f3d87 8 years ago
1 contributor
17 lines | 0.828kb
requetes["Scores candidat-e (ou liste de) soutenu-e (en %)"] = function (req, callback) {
    var from_where = ' from scrutins where soutien is 1 and ' + sql_election[req.election] + ' and ' + sql_section[req.section];
    resultat_par_bureau(from_where, 'voix', 'exprimes', 'lightness', 'résultat', '%', function (gradient) {
        callback(req.section, gradient);
    });
};

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

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

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