Changeset 2117
- Timestamp:
- Sep 7, 2011, 2:43:16 AM (10 years ago)
- Location:
- cpc/trunk/project
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
cpc/trunk/project/apps/frontend/modules/plot/actions/components.class.php
r2097 r2117 158 158 $this->type = "home"; 159 159 $this->data['groupes'] = array(); 160 foreach (array_reverse(myTools::convertYamlToArray(sfConfig::get('app_groupes_actuels', ''))) as $gpe) 160 $this->data['couleurs'] = array(); 161 $colormap = myTools::getGroupesColorMap(); 162 foreach (array_reverse(myTools::convertYamlToArray(sfConfig::get('app_groupes_actuels', ''))) as $gpe) { 161 163 $this->data['groupes'][$gpe] = array(); 164 $this->data['couleurs'][] = $colormap[$gpe]; 165 } 162 166 if ($this->type === "home") 163 167 $this->data['titres'] = array("Députés", "Interventions", "Amendements", "Propositions", "Quest. Écrites"); … … 224 228 if (!isset($this->plot)) $this->plot = 'total'; 225 229 $this->labels = myTools::convertYamlToArray(sfConfig::get('app_groupes_actuels', '')); 230 $this->couleurs = array(); 231 $colormap = myTools::getGroupesColorMap(); 232 foreach ($this->labels as $gpe) 233 $this->couleurs[] = $colormap[$gpe]; 226 234 $this->interventions = array(); 227 235 if ($this->plot == 'total') { -
cpc/trunk/project/apps/frontend/modules/plot/templates/_groupes.php
r1788 r2117 62 62 $Test->drawFilledRoundedRectangle(7,7,$xsize-7,$ysize-7,5,240,240,240); 63 63 $Test->drawRoundedRectangle(5,5,$xsize-5,$ysize-5,5,230,230,230); 64 $Test->setColorPalette(0,255,30,30); 65 $Test->setColorPalette(1,255,50,190); 66 $Test->setColorPalette(2,30,190,255); 67 $Test->setColorPalette(3,30,30,200); 68 $Test->setColorPalette(4,200,200,200); 69 $Test->setColorPalette(5,240,240,240); 64 $ct = 0; 65 foreach ($couleurs as $col) if (preg_match('/^(\d+),(\d+),(\d+)$/', $col, $cols)) { 66 $Test->setColorPalette($ct,$cols[1],$cols[2],$cols[3]); 67 $ct++; 68 } 70 69 $Test->xsSetFontProperties("tahoma.ttf",7); 71 70 if (isset($Data)) { … … 93 92 $Test->xsSetFontProperties("tahoma.ttf",9); 94 93 $Test->setColorPalette(0,255,255,255); 95 $Test->setColorPalette(1,255,30,30); 96 $Test->setColorPalette(2,255,50,190); 97 $Test->setColorPalette(3,30,190,255); 98 $Test->setColorPalette(4,30,30,200); 99 $Test->setColorPalette(5,200,200,200); 100 $Test->setColorPalette(6,255,255,255); 94 $ct = 1; 95 foreach ($couleurs as $col) if (preg_match('/^(\d+),(\d+),(\d+)$/', $col, $cols)) { 96 $Test->setColorPalette($ct,$cols[1],$cols[2],$cols[3]); 97 $ct++; 98 } 101 99 $Test->drawFilledRoundedRectangle(15,$ylegend-14,72,$ylegend+5,5,255,255,255); 102 100 $Test->drawLegend(15,$ylegend,$DataDescrLegend,255,255,255); -
cpc/trunk/project/apps/frontend/modules/plot/templates/generatePlotGroupesSuccess.php
r2107 r2117 63 63 } 64 64 $Test->drawGrid(4,TRUE,0,0,0,30); 65 $ Test->setColorPalette(0,30,30,200);66 $Test->setColorPalette(1,30,190,255); 67 $Test->setColorPalette(2,255,50,190);68 $Test->setColorPalette(3,255,30,30);69 $Test->setColorPalette(4,130,130,130); 65 $ct = 0; 66 foreach ($data['couleurs'] as $col) if (preg_match('/^(\d+),(\d+),(\d+)$/', $col, $cols)) { 67 $Test->setColorPalette($ct,$cols[1],$cols[2],$cols[3]); 68 $ct++; 69 } 70 70 $Test->setImageMap(TRUE,$mapId); 71 71 $Test->drawStackedBarGraph($Data,$DataDescr,75,90); -
cpc/trunk/project/bin/init
r1287 r2117 3 3 mkdir log cache 4 4 chmod 777 log cache 5 cp config/app.yml{.example,} 5 6 cp config/ProjectConfiguration.class{.example,}.php 6 7 cp config/databases.yml{.example,} 7 echo "Don't forget to adapt the configuration files : config/ProjectConfiguration.class.php config/databases.yml" 8 cp bin/db.inc{.example,} 9 echo "Don't forget to adapt the configuration files : bin/db.inc config/ProjectConfiguration.class.php config/databases.yml config/app.yml" -
cpc/trunk/project/lib/model/doctrine/myTools.class.php
r2103 r2117 31 31 $gpes[] = $map[$gpe]; 32 32 return $gpes; 33 } 34 35 public static function getGroupesColorMap() { 36 $colormap = array(); 37 foreach (myTools::getGroupesInfos() as $gpe) 38 $colormap[$gpe[1]] = $gpe[2]; 39 return $colormap; 33 40 } 34 41
Note: See TracChangeset
for help on using the changeset viewer.