Ignore:
Timestamp:
Sep 28, 2010, 7:34:40 PM (11 years ago)
Author:
goya
Message:

graphe d'accueil

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/project/apps/frontend/modules/plot/actions/components.class.php

    r1463 r1472  
    157157    $this->data = array();
    158158    $this->data['groupes'] = array('UMP' => array(),'NC' => array(),'SRC' => array(),'GDR' => array(), 'NI' => array());
    159     $this->data['titres'] = array("Députés", "Interventions", "Amendements", "Propositions", "Quest. Orales", "Quest. Écrites");
     159    $this->data['titres'] = array(" Députés", "Interventions", "Amendements", "Propositions", "Quest. Orales", "Quest. Écrites");
    160160    $n = count($this->data['titres']);
    161161    $stats = unserialize(Doctrine::getTable('VariableGlobale')->findOneByChamp('stats_groupes')->value);
     
    193193        $this->data['totaux'][$i] += $this->data['groupes'][$groupe][$i];
    194194    foreach ($this->data['groupes'] as $groupe => $arr)
    195       for ($i=0;$i<$n;$i++)
    196         $this->data['groupes'][$groupe][$i] = $this->data['groupes'][$groupe][$i] / $this->data['totaux'][$i] * 100;
     195      for ($i=0;$i<$n;$i++) {
     196        $tmp = round($this->data['groupes'][$groupe][$i]  / $this->data['totaux'][$i] * 1000)/10;
     197        $this->data['groupes'][$groupe][$i] = round($this->data['groupes'][$groupe][$i] / $this->data['totaux'][$i] * 1000)/10;
     198      }
     199    for ($i=0;$i<$n;$i++)
     200      $this->data['totaux'][$i] = preg_replace('/(\d)(\d{3})$/', '\\1 \\2', $this->data['totaux'][$i]);
    197201  }
    198202
Note: See TracChangeset for help on using the changeset viewer.