Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- // console.log(registres);
- var registres_index = [];
- var bg = [];
- var bg = [ 'rgba(255, 99, 132,0.2)', 'rgba(179, 181, 198,0.2)', 'rgba(255, 221, 50,0.2)' ];
- var bg1 = 'rgba(255, 99, 132,0.2)';
- var bg2 = 'rgba(179, 181, 198,0.2)';
- var bg3 = 'rgba(255, 221, 50,0.2)';
- //var chartCfg = [];
- $.each(registres, function(index, value) {
- //registres_index.push(value);
- //chartCfg.push(value["fill"]);
- /* value["backgroundColor"] = [];
- value["backgroundColor"].push(bg);*/
- // registres["backgroundColor"].push(bg);
- /*value["backgroundColor"] = [bg1, bg2, bg3];*/
- /*value["backgroundColor"].push(bg);*/
- /* console.log('totot', value["backgroundColor"]);*/
- var _rid = value['registre_id'];
- value['label'] = value['registre_description'];
- // console.log(index);
- //console.log(_rid);
- /*console.log(Math.round((value['count_traitements_ok'] * 100) / (value['count_traitements_ok'] + value['count_traitements_nok'])));*/
- value['fill'] = true;
- /*value['backgroundColor'] = ['rgb(19, 40, 219)', 'rgb(105, 79, 32)', 'rgb(30, 119, 50)'];*/
- /* value['fillStyle'] = ['rgb(19, 40, 219)', 'rgb(105, 79, 32)', 'rgb(30, 119, 50)'];*/
- /*value['fillColor'] = ["rgba(220,220,220,0.5)", "navy", "red", "orange"];*/
- /*value['borderColor'] = ['rgb(19, 40, 219)', 'rgb(105, 79, 32)', 'rgb(30, 119, 50)'];
- value['pointBorderColor'] = ['rgb(19, 40, 219)', 'rgb(105, 79, 32)', 'rgb(30, 119, 50)'];
- value['pointBackgroundColor'] = ['rgb(19, 40, 219)', 'rgb(105, 79, 32)', 'rgb(30, 119, 50)'];*/
- /*value['backgroundColor'] = [ 'rgba(255, 99, 132,0.2)', 'rgba(179, 181, 198,0.2)', 'rgba(255, 221, 50,0.2)' ];*/
- /*value['backgroundColor'] = bg;*/
- value["backgroundColor"] = ['rgba(255, 99, 132,0.2)', 'rgba(179, 181, 198,0.2)', 'rgba(255, 221, 50,0.2)'];
- value['data'] = [Math.round((value['count_traitements_ok'] * 100) / (value['count_traitements_ok'] + value['count_traitements_nok'])), Math.round((value['count_demandes_ok'] * 100) / (value['count_demandes_ok'] + value['count_demandes_nok'])), Math.round((value['count_taches_ok'] * 100) / (value['count_taches_ok'] + value['count_taches_nok']))];
- //value['data'] = [ , "42", "78"];
- registres_index.push(value);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement