Skip to content

Commit

Permalink
Dev: put back palette for stat PDF generation
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Jan 4, 2016
1 parent 309eef3 commit 6220bef
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 4 deletions.
8 changes: 4 additions & 4 deletions application/helpers/admin/statistics_helper.php
Expand Up @@ -76,7 +76,7 @@ function createChart($iQuestionID, $iSurveyID, $type=null, $lbl, $gdata, $grawda
else
{
$graph = new pChart(690,200);
$graph->loadColorPalette($homedir.DIRECTORY_SEPARATOR.'styles'.DIRECTORY_SEPARATOR.$admintheme.DIRECTORY_SEPARATOR.'limesurvey.pal');
$graph->loadColorPalette($homedir.DIRECTORY_SEPARATOR.'styles'.DIRECTORY_SEPARATOR.$admintheme.DIRECTORY_SEPARATOR.'images/limesurvey.pal');
$graph->setFontProperties($rootdir.DIRECTORY_SEPARATOR.'fonts'.DIRECTORY_SEPARATOR.$chartfontfile,$chartfontsize);
$graph->setFontProperties($rootdir.DIRECTORY_SEPARATOR.'fonts'.DIRECTORY_SEPARATOR.$chartfontfile,$chartfontsize);
$graph->drawTitle(0,0,gT('Sorry, but this question has too many answer options to be shown properly in a graph.','unescaped'),30,30,30,690,200);
Expand All @@ -95,7 +95,7 @@ function createChart($iQuestionID, $iSurveyID, $type=null, $lbl, $gdata, $grawda
else
{
$graph = new pChart(690,200);
$graph->loadColorPalette($homedir.DIRECTORY_SEPARATOR.'styles'.DIRECTORY_SEPARATOR.$admintheme.DIRECTORY_SEPARATOR.'limesurvey.pal');
$graph->loadColorPalette($homedir.DIRECTORY_SEPARATOR.'styles'.DIRECTORY_SEPARATOR.$admintheme.DIRECTORY_SEPARATOR.'images/limesurvey.pal');
$graph->setFontProperties($rootdir.DIRECTORY_SEPARATOR.'fonts'.DIRECTORY_SEPARATOR.$chartfontfile,$chartfontsize);
$graph->setFontProperties($rootdir.DIRECTORY_SEPARATOR.'fonts'.DIRECTORY_SEPARATOR.$chartfontfile,$chartfontsize);
$graph->drawTitle(0,0,gT('Sorry, but this question has no responses yet so a graph cannot be shown.','unescaped'),30,30,30,690,200);
Expand Down Expand Up @@ -200,7 +200,7 @@ function createChart($iQuestionID, $iSurveyID, $type=null, $lbl, $gdata, $grawda
if ($legendsize[1]<320) $gheight=420; else $gheight=$legendsize[1]+100;
$graph = new pChart(690+$legendsize[0],$gheight);
$graph->drawFilledRectangle(0,0,690+$legendsize[0],$gheight,254,254,254,false);
$graph->loadColorPalette($homedir.DIRECTORY_SEPARATOR.'styles'.DIRECTORY_SEPARATOR.$admintheme.DIRECTORY_SEPARATOR.'limesurvey.pal');
$graph->loadColorPalette($homedir.DIRECTORY_SEPARATOR.'styles'.DIRECTORY_SEPARATOR.$admintheme.DIRECTORY_SEPARATOR.'images/limesurvey.pal');
$graph->setFontProperties($rootdir.DIRECTORY_SEPARATOR.'fonts'.DIRECTORY_SEPARATOR.$chartfontfile,$chartfontsize);
$graph->setGraphArea(50,30,500,$gheight-60);
$graph->drawFilledRoundedRectangle(7,7,523+$legendsize[0],$gheight-7,5,254,255,254);
Expand Down Expand Up @@ -293,7 +293,7 @@ function createChart($iQuestionID, $iSurveyID, $type=null, $lbl, $gdata, $grawda
$gheight=ceil($gheight);
$graph = new pChart(690,$gheight);
$graph->drawFilledRectangle(0,0,690,$gheight,254,254,254,false);
$graph->loadColorPalette($homedir.'/styles/'.$admintheme.'/limesurvey.pal');
$graph->loadColorPalette($homedir.'/styles/'.$admintheme.'/images/limesurvey.pal');
$graph->drawFilledRoundedRectangle(7,7,687,$gheight-3,5,254,255,254);
$graph->drawRoundedRectangle(5,5,689,$gheight-1,5,230,230,230);

Expand Down
72 changes: 72 additions & 0 deletions styles/Sea_Green/images/limesurvey.pal
@@ -0,0 +1,72 @@
20,130,200
232,95,51
34,205,33
210,211,28
134,179,129
201,171,131
251,231,221
23,169,161
167,187,213
211,151,213
147,145,246
147,39,90
250,250,201
201,250,250
94,0,94
250,125,127
0,96,201
201,202,250
0,0,127
250,0,250
250,250,0
0,250,250
127,0,127
127,0,0
0,125,127
0,0,250
0,202,250
201,250,250
201,250,201
250,250,151
151,202,250
251,149,201
201,149,250
250,202,151
45,96,250
45,202,201
151,202,0
250,202,0
250,149,0
250,96,0
184,230,115
102,128,64
220,230,207
134,191,48
184,92,161
128,64,112
230,207,224
191,48,155
230,138,115
128,77,64
230,211,207
191,77,48
80,161,126
64,128,100
207,230,220
48,191,130
25,25,179
18,18,125
200,200,255
145,145,255
255,178,0
179,125,0
255,236,191
255,217,128
255,255,0
179,179,0
255,255,191
255,255,128
102,0,153
71,0,107
234,191,255
213,128,255

0 comments on commit 6220bef

Please sign in to comment.