summaryrefslogtreecommitdiffstats
path: root/admin/survey/classes/surveyAnalysis/class.SurveyTableChart.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/survey/classes/surveyAnalysis/class.SurveyTableChart.php')
-rw-r--r--admin/survey/classes/surveyAnalysis/class.SurveyTableChart.php229
1 files changed, 83 insertions, 146 deletions
diff --git a/admin/survey/classes/surveyAnalysis/class.SurveyTableChart.php b/admin/survey/classes/surveyAnalysis/class.SurveyTableChart.php
index 8b51105..70cb499 100644
--- a/admin/survey/classes/surveyAnalysis/class.SurveyTableChart.php
+++ b/admin/survey/classes/surveyAnalysis/class.SurveyTableChart.php
@@ -4,7 +4,7 @@
* @date April 2012
*/
-define("SAA_FOLDER", "AnalysisArchive");
+if(!defined("SAA_FOLDER"))define("SAA_FOLDER", "AnalysisArchive");
class SurveyTableChart {
@@ -166,7 +166,7 @@ class SurveyTableChart {
}
}
}
- if (count($this->classInstance->variabla1) > 0 && $is_check == false ) { # če še ni bil checkbox
+ if (count($this->classInstance->variabla1) > 0) { # če še ni bil checkbox
foreach ($this->classInstance->variabla1 AS $key => $var) {
$spr_tip = $this->classInstance->_HEADERS[$var['spr']]['tip'];
if ( $spr_tip == 2 || $spr_tip == 16 ) {
@@ -321,10 +321,10 @@ class SurveyTableChart {
// Cache
$Cache = new pCache(dirname(__FILE__).'/../../pChart/Cache/');
- $ID = $this->generateChartId($chartID, $this->settings, $DataSet->GetNumerus());
+ $ID = $this->generateChartId($chartID, $this->settings, ($DataSet!==null?$DataSet->GetNumerus():0));
// Ce se nimamo zgeneriranega grafa
- if( !$Cache->isInCache($ID, $DataSet->GetData()) ){
+ if( !$Cache->isInCache($ID, ($DataSet!==null?$DataSet->GetData():array())) ){
switch($this->settings['type']){
@@ -335,11 +335,11 @@ class SurveyTableChart {
}
// Shranimo v cache
- $Cache->WriteToCache($ID,$DataSet->GetData(),$Test);
+ $Cache->WriteToCache($ID,($DataSet!==null?$DataSet->GetData():array()),$Test);
}
// dobimo ime slike c cache-u
- $imgName = $Cache->GetHash($ID,$DataSet->GetData());
+ $imgName = $Cache->GetHash($ID,($DataSet!==null?$DataSet->GetData():array()));
if ($this->isArchive == false) {
$imgPath = 'pChart/Cache/'.$imgName;
@@ -356,7 +356,7 @@ class SurveyTableChart {
echo '<div class="chart_title">';
$title = $lang['srv_chart_ttest_title'].':<br />';
$title .= '<table><tr>';
- $title .= '<td style="width:380px; text-align: right;">'.$this->crosstabVars[0] . '</td><td style="width:40px;"> / </td><td style="width:380px; text-align: left;">' . $this->crosstabVars[1].'</td>';
+ $title .= '<td style="width:380px; text-align: right;">'.(isset($this->crosstabVars[0])?$this->crosstabVars[0]:'') . '</td><td style="width:40px;"> / </td><td style="width:380px; text-align: left;">' . (isset($this->crosstabVars[1])?$this->crosstabVars[1]:'') .'</td>';
$title .= '</tr></table>';
echo $title;
echo '</div>';
@@ -408,6 +408,7 @@ class SurveyTableChart {
// Napolnimo podatke za graf
$DataSet = $this->getTTestDataSet($chartID, $this->settings);
+ $DataSet = $DataSet!==null?$DataSet:new pData();
// Cache
$Cache = new pCache(dirname(__FILE__).'/../../pChart/Cache/');
@@ -520,8 +521,8 @@ class SurveyTableChart {
global $site_path;
global $lang;
- $tip = $this->break_spremenljivka['tip'];
- $skala = $this->break_spremenljivka['skala'];
+ $tip = isset($this->break_spremenljivka['tip'])?$this->break_spremenljivka['tip']:null;
+ $skala = isset($this->break_spremenljivka['tip'])?$this->break_spremenljivka['skala']:null;
// Izrisemo poseben break graf (multigrid, multicheckbox, multitext, multinumber)
if( in_array($tip, array(7,17,18,20,)) || ($tip == 6 && $skala == 0) ){
@@ -694,8 +695,8 @@ class SurveyTableChart {
$spr1 = $this->classInstance->_HEADERS[$v_first['spr']];
$spr2 = $this->classInstance->_HEADERS[$v_second['spr']];
- $grid1 = $spr1['grids'][$v_first['grd']];
- $grid2 = $spr2['grids'][$v_second['grd']];
+ $grid1 = isset($spr1['grids'][$v_first['grd']])?$spr1['grids'][$v_first['grd']]:array();
+ $grid2 = isset($spr2['grids'][$v_second['grd']])?$spr2['grids'][$v_second['grd']]:array();
#število vratic in število kolon
$cols = count($crosstabs['options1']);
@@ -804,8 +805,9 @@ class SurveyTableChart {
foreach ($crosstabs['options1'] as $ckey1 => $crossVariabla1) {
$cnt++;
- $dataArray[$cnt][] = ((int)$crosstabs_value[$ckey1][$ckey2] > 0) ? $crosstabs_value[$ckey1][$ckey2] : 0;
- $dataPercentArray[$cnt][] = $this->classInstance->getCrossTabPercentage($crosstabs['sumaVrstica'][$ckey2], $crosstabs_value[$ckey1][$ckey2]);
+ $dataArray[$cnt][] = (isset($crosstabs_value[$ckey1][$ckey2])&&(int)$crosstabs_value[$ckey1][$ckey2] > 0) ? $crosstabs_value[$ckey1][$ckey2] : 0;
+ $dataPercentArray[$cnt][] = $this->classInstance->getCrossTabPercentage((isset($crosstabs['sumaVrstica'][$ckey2])?$crosstabs['sumaVrstica'][$ckey2]:0)
+ , (isset($crosstabs_value[$ckey1][$ckey2])?$crosstabs_value[$ckey1][$ckey2]:0));
/*
# celica z vebino
@@ -886,11 +888,11 @@ class SurveyTableChart {
global $lang;
$DataSet = null;
-
+ $ttest = null;
$variables1 = $this->classInstance->getSelectedVariables();
foreach ($variables1 AS $v_first) {
- if($this->counter == $counter){
+ if($this->counter == null){
$ttest = null;
$ttest = $this->classInstance->createTTest($v_first, $this->sessionData['ttest']['sub_conditions']);
@@ -966,6 +968,7 @@ class SurveyTableChart {
if (is_array($variables2) && count($variables2) > 0) {
foreach ($variables2 AS $v_second) {
if (is_array($variables1) && count($variables1) > 0) {
+ $c1=0;
foreach ($variables1 AS $v_first) {
$_means = $this->classInstance->createMeans($v_first, $v_second);
if ($_means != null) {
@@ -994,20 +997,20 @@ class SurveyTableChart {
#število vratic in število kolon
- $cols = count($_means);
+ //$cols = count($_means);
# preberemo kr iz prvega loopa
- $rows = count($_means[0]['options']);
+ //$rows = count($_means[0]['options']);
// loop po vrsticah
- if (count($_means[0]['options']) > 0) {
+ if (isset($_means[0]['options'])&&count($_means[0]['options']) > 0) {
foreach ($_means[0]['options'] as $ckey2 =>$crossVariabla2) {
// IME VARIABLE
$variableArray[] = $crossVariabla2['naslov'];
// VREDNOST VARIABLE
- $dataArray[] = $this->classInstance->formatNumber($_means[0]['result'][$ckey2], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'));
+ $dataArray[] = $this->classInstance->formatNumber((isset($_means[0]['result'][$ckey2])?$_means[0]['result'][$ckey2]:null), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'));
}
}
@@ -1090,7 +1093,7 @@ class SurveyTableChart {
#povprečja
$avg = $this->classInstance->formatNumber($means[$fkey][$oKey][$sequence],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
# enote
- $enote = (int)$this->break_frequencys[$fkey][$oKey][$sequence]['validCnt'];
+ $enote = isset($this->break_frequencys[$fkey][$oKey][$sequence]['validCnt'])? (int)$this->break_frequencys[$fkey][$oKey][$sequence]['validCnt']:0;
$tempArray = array();
@@ -1101,8 +1104,8 @@ class SurveyTableChart {
$dataArray[] = $tempArray;
- $totalMeans[$sequence] += ($means[$fkey][$oKey][$sequence]*(int)$this->break_frequencys[$fkey][$oKey][$sequence]['validCnt']);
- $totalFreq[$sequence]+= (int)$this->break_frequencys[$fkey][$oKey][$sequence]['validCnt'];
+ $totalMeans[$sequence] = (isset($totalMeans[$sequence])? $totalMeans[$sequence] += ($means[$fkey][$oKey][$sequence]*$enote): $means[$fkey][$oKey][$sequence]*$enote);
+ $totalFreq[$sequence] = (isset($totalFreq[$sequence])?$totalFreq[$sequence]+= $enote:$enote);
}
}
@@ -1493,7 +1496,7 @@ class SurveyTableChart {
else
$legend = '';
- $ID = $this->anketa.'_chart_'.$chartID.'_counter_'.$counter.'_mv_'.SurveyAnalysis::$missingProfileData['display_mv_type'];
+ $ID = $this->anketa.'_chart_'.$chartID.'_counter_'./* $counter .*/'_mv_'.SurveyAnalysis::$missingProfileData['display_mv_type'];
foreach ($settings AS $key => $val) {
if($key == 'colors'){
@@ -1506,7 +1509,7 @@ class SurveyTableChart {
}
elseif($key != 'name')
- $ID .= '_'.$key.'_'.$val;
+ $ID .= '_'.$key.'_'.json_encode($val);
}
$ID .= '_skin_'.$this->skin;
@@ -1705,8 +1708,7 @@ class SurveyTableChart {
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',$this->settings['hq']*$this->fontSize);
$Test->setGraphArea($this->settings['hq']*100,$this->settings['hq']*40,$this->settings['hq']*650,$this->settings['hq']*220);
$Test->drawFilledRoundedRectangle($this->settings['hq']*7,$this->settings['hq']*7,$this->settings['hq']*793,$this->settings['hq']*(243+$addHeight),5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*(245+$addHeight),200,200,200);
+ //$Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*(245+$addHeight),200,200,200);
$Test->drawGraphArea(255,255,255,TRUE);
$Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_START0,0,0,0,TRUE,$angle,0,TRUE,1,FALSE,$roundText);
$Test->drawGrid(4,TRUE,230,230,230,50);
@@ -1744,7 +1746,7 @@ class SurveyTableChart {
global $lang;
// Nastavimo visino grafa (ce imamo vec kot 7 variabel/gridov)
- $Data = $DataSet->GetData();
+ $Data = ($DataSet!==null?$DataSet->GetData():array());
$countGrids = count($Data);
$addHeight = $countGrids > 5 ? ($countGrids-5)*30 : 0;
@@ -1764,15 +1766,14 @@ class SurveyTableChart {
$Test->setGraphArea($this->settings['hq']*$startX,$this->settings['hq']*70,$this->settings['hq']*650,$this->settings['hq']*(220+$addHeight));
$Test->drawFilledRoundedRectangle($this->settings['hq']*7,$this->settings['hq']*7,$this->settings['hq']*793,$this->settings['hq']*(243+$addHeight),5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*(245+$addHeight),200,200,200);
+ //$Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*(245+$addHeight),200,200,200);
$Test->drawGraphArea(255,255,255,TRUE);
// Če gre za hierarhijo, potem je fiksna skala
if(SurveyInfo::checkSurveyModule('hierarhija', $this->anketa))
$Test->setFixedScale(1,5,4);
- $Test->drawHorScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_START0,0,0,0,TRUE,0,0,TRUE,1,FALSE,$roundText);
+ $Test->drawHorScale($Data,($DataSet!==null?$DataSet->GetDataDescription():array()),SCALE_START0,0,0,0,TRUE,0,0,TRUE,1,FALSE,$roundText);
$Test->drawHorGrid(4,TRUE,230,230,230,50);
// Draw the 0 line
@@ -1782,11 +1783,11 @@ class SurveyTableChart {
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',$this->settings['hq']*$this->fontSize);
// Draw the bar graph
- $Test->drawHorBarGraph($DataSet->GetData(),$DataSet->GetDataDescription(), $this->settings['barLabel']);
+ $Test->drawHorBarGraph($Data,($DataSet!==null?$DataSet->GetDataDescription():array()), $this->settings['barLabel']);
// Finish the graph
if($show_legend == 1)
- $Test->drawLegend($this->settings['hq']*680,$this->settings['hq']*60,$DataSet->GetDataDescription(),255,255,255);
+ $Test->drawLegend($this->settings['hq']*680,$this->settings['hq']*60,($DataSet!==null?$DataSet->GetDataDescription():array()),255,255,255);
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',$this->settings['hq']*$this->fontSize);
@@ -1810,7 +1811,7 @@ class SurveyTableChart {
// Prikaz t vrednosti pri ttest grafu
if($this->podstran == 'ttest' && $this->settings['show_numerus'] == '1'){
- $t = 't = '.$DataSet->GetNumerus();
+ $t = 't = '.($DataSet!==null?$DataSet->GetNumerus():0);
$Test->drawTextBox($this->settings['hq']*680,$this->settings['hq']*210,$this->settings['hq']*795,$this->settings['hq']*220,$t,$Angle=0,$R=0,$G=0,$B=0,$Align=ALIGN_LEFT,$Shadow=FALSE,$BgR=-1,$BgG=-1,$BgB=-1,$Alpha=0);
}
@@ -1849,8 +1850,7 @@ class SurveyTableChart {
$Test->setGraphArea($this->settings['hq']*100,$this->settings['hq']*40,$this->settings['hq']*650,$this->settings['hq']*220);
$Test->drawFilledRoundedRectangle($this->settings['hq']*7,$this->settings['hq']*7,$this->settings['hq']*793,$this->settings['hq']*(243+$addHeight),5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*(245+$addHeight),200,200,200);
+ //$Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*(245+$addHeight),200,200,200);
$Test->drawGraphArea(255,255,255,TRUE);
$Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_ADDALLSTART0,0,0,0,TRUE,$angle,0,TRUE,1,FALSE,$roundText);
$Test->drawGrid(4,TRUE,230,230,230,50);
@@ -1905,24 +1905,12 @@ class SurveyTableChart {
$roundText = ($this->settings['labelWidth'] == 20) ? 35 : 65;
// Pri navadnem radio in checkbox vprasanju imamo samo en stolpec - zato so dimenzije drugacne
- /*if($spremenljivka['tip'] == 1 || $spremenljivka['tip'] == 2 || $spremenljivka['tip'] == 3){
- $Test->setGraphArea($this->settings['hq']*200,$this->settings['hq']*50,$this->settings['hq']*630,$this->settings['hq']*220);
- $Test->drawFilledRoundedRectangle($this->settings['hq']*7,$this->settings['hq']*7,$this->settings['hq']*793,$this->settings['hq']*243,5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*295,200,200,200);
- $Test->drawGraphArea(255,255,255,TRUE);
- $Test->drawHorScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_ADDALLSTART0,0,0,0,TRUE,0,0,TRUE);
- $Test->drawHorGrid(4,TRUE,230,230,230,50);
- }
- else{*/
- $Test->setGraphArea($this->settings['hq']*$startX,$this->settings['hq']*70,$this->settings['hq']*650,$this->settings['hq']*(220+$addHeight));
- $Test->drawFilledRoundedRectangle(7,7,793,243+$addHeight,5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*(295+$addHeight),200,200,200);
- $Test->drawGraphArea(255,255,255,TRUE);
- $Test->drawHorScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_ADDALLSTART0,0,0,0,TRUE,0,0,TRUE,1,FALSE,$roundText);
- $Test->drawHorGrid(4,TRUE,230,230,230,50);
- //}
+ $Test->setGraphArea($this->settings['hq']*$startX,$this->settings['hq']*70,$this->settings['hq']*650,$this->settings['hq']*(220+$addHeight));
+ $Test->drawFilledRoundedRectangle(7,7,793,243+$addHeight,5,255,255,255);
+ //$Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*(295+$addHeight),200,200,200);
+ $Test->drawGraphArea(255,255,255,TRUE);
+ $Test->drawHorScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_ADDALLSTART0,0,0,0,TRUE,0,0,TRUE,1,FALSE,$roundText);
+ $Test->drawHorGrid(4,TRUE,230,230,230,50);
// Draw the 0 line
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',$this->settings['hq']*6);
@@ -1951,7 +1939,7 @@ class SurveyTableChart {
$strings = explode('<br />',$this->crosstabVars[1]);
$substr1 = (strlen($strings[0]) > 50) ? substr($strings[0], 0, 47).'...' : $strings[0];
- $substr2 = (strlen($strings[1]) > 50) ? substr($strings[1], 0, 47).'...' : $strings[1];
+ $substr2 = isset($strings[1]) ? ((strlen($strings[1]) > 50) ? substr($strings[1], 0, 47).'...' : $strings[1]):'';
$Test->drawTextBox($this->settings['hq']*50,$this->settings['hq']*20,$this->settings['hq']*280,$this->settings['hq']*30,$substr1,$Angle=0,$R=0,$G=0,$B=0,$Align=ALIGN_CENTER,$Shadow=FALSE,$BgR=-1,$BgG=-1,$BgB=-1,$Alpha=0);
$Test->drawTextBox($this->settings['hq']*50,$this->settings['hq']*38,$this->settings['hq']*280,$this->settings['hq']*43,$substr2,$Angle=0,$R=0,$G=0,$B=0,$Align=ALIGN_CENTER,$Shadow=FALSE,$BgR=-1,$BgG=-1,$BgB=-1,$Alpha=0);
@@ -1975,12 +1963,8 @@ class SurveyTableChart {
$Test->setLineStyle($this->settings['hq'],$DotSize=0);
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',$this->settings['hq']*$this->fontSize);
- //$Test->setGraphArea(50,40,685,220);
$Test->drawFilledRoundedRectangle($this->settings['hq']*7,$this->settings['hq']*7,$this->settings['hq']*793,$this->settings['hq']*273,5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*275,200,200,200);
- //$Test->createColorGradientPalette(195,204,56,223,110,41,3);
- //$Test->createColorGradientPalette(168,188,56,248,255,136,5);
+ //$Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*275,200,200,200);
// Draw the pie graph
$labels = ($this->settings['sort'] == 1) ? 'custom_percent_sort' : 'custom_percent';
@@ -2018,12 +2002,8 @@ class SurveyTableChart {
$Test->setLineStyle($this->settings['hq'],$DotSize=0);
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',$this->settings['hq']*$this->fontSize);
- //$Test->setGraphArea(50,40,685,220);
$Test->drawFilledRoundedRectangle($this->settings['hq']*7,$this->settings['hq']*7,$this->settings['hq']*793,$this->settings['hq']*273,5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*275,200,200,200);
- //$Test->createColorGradientPalette(195,204,56,223,110,41,3);
- //$Test->createColorGradientPalette(168,188,56,248,255,136,5);
+ //$Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*275,200,200,200);
// Draw the pie graph
$labels = ($this->settings['sort'] == 1) ? 'custom_percent_sort' : 'custom_percent';
@@ -2067,8 +2047,7 @@ class SurveyTableChart {
$Test->setGraphArea($this->settings['hq']*270,$this->settings['hq']*50,$this->settings['hq']*530,$this->settings['hq']*(220+$addHeight));
$Test->drawFilledRoundedRectangle($this->settings['hq']*7,$this->settings['hq']*7,$this->settings['hq']*793,$this->settings['hq']*(243+$addHeight),5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*(245+$addHeight),200,200,200);
+ //$Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*(245+$addHeight),200,200,200);
$Test->drawGraphArea(255,255,255,TRUE);
@@ -2122,11 +2101,7 @@ class SurveyTableChart {
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',$this->settings['hq']*$this->fontSize);
$Test->setGraphArea($this->settings['hq']*100,$this->settings['hq']*40,$this->settings['hq']*650,$this->settings['hq']*320);
$Test->drawFilledRoundedRectangle($this->settings['hq']*7,$this->settings['hq']*7,$this->settings['hq']*793,$this->settings['hq']*343,5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*345,200,200,200);
- //$Test->drawGraphArea(255,255,255,TRUE);
- //$Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_START0,20,20,20,TRUE,$angle,0,TRUE,1,FALSE,$roundText);
- //$Test->drawGrid(4,TRUE,230,230,230,50);
+ //$Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*345,200,200,200);
// Draw the 0 line
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',$this->settings['hq']*$this->fontSize);
@@ -2179,8 +2154,7 @@ class SurveyTableChart {
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',$this->settings['hq']*$this->fontSize);
$Test->setGraphArea($this->settings['hq']*100,$this->settings['hq']*40,$this->settings['hq']*650,$this->settings['hq']*220);
$Test->drawFilledRoundedRectangle($this->settings['hq']*7,$this->settings['hq']*7,$this->settings['hq']*793,$this->settings['hq']*273,5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*275,200,200,200);
+ //$Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*275,200,200,200);
$Test->drawGraphArea(255,255,255,TRUE);
$Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_START0,0,0,0,TRUE,$angle,0,TRUE);
if($count <= 20)
@@ -2213,13 +2187,16 @@ class SurveyTableChart {
global $lang;
// Ikone izvoza na vrhu posameznih nastavitev
- //$this->displayExportIcons($chartID);
-
-
- echo '<div id="switch_left_'.$chartID.'_loop_0" class="switch_left '.($this->settings_mode == 1 ? ' non-active' : '').'" onClick="chartSwitchSettings(\''.$chartID.'\', \'0\', \'0\')">'.$lang['srv_chart_settings_basic'].'</div>';
- //echo '<span id="switch_middle_'.$chartID.'_loop_0" class="'.($this->settings_mode == 1 ? 'rightHighlight' : 'leftHighlight').'"></span>';
- echo '<div id="switch_right_'.$chartID.'_loop_0" class="switch_right '.($this->settings_mode == 0 ? ' non-active' : '').'" onClick="chartSwitchSettings(\''.$chartID.'\', \'1\', \'0\')">'.$lang['srv_chart_settings_advanced'].'</div>';
+ $this->displayExportIcons($chartID);
+
+ echo '<div class="chart_settings_content">';
+
+
+ echo '<div class="tab_holder">';
+ echo ' <div id="switch_left_'.$chartID.'_loop_0" class="tab switch_left '.($this->settings_mode == 1 ? ' non-active' : '').'" onClick="chartSwitchSettings(\''.$chartID.'\', \'0\', \'0\')">'.$lang['srv_chart_settings_basic'].'</div>';
+ echo ' <div id="switch_right_'.$chartID.'_loop_0" class="tab switch_right '.($this->settings_mode == 0 ? ' non-active' : '').'" onClick="chartSwitchSettings(\''.$chartID.'\', \'1\', \'0\')">'.$lang['srv_chart_settings_advanced'].'</div>';
+ echo '</div>';
// OSNOVNE NASTAVITVE
echo '<div class="chart_settings_inner" id="chart_settings_basic_'.$chartID.'_loop_0" '.($this->settings_mode == 1 ? ' style="display:none;"' : '').'>';
@@ -2261,8 +2238,8 @@ class SurveyTableChart {
// visoka locljivost grafa
echo '<div class="chart_setting">';
- echo $lang['srv_chart_hq'].': ';
echo '<input type="checkbox" id="tablechart_hq_'.$chartID.'" name="tablechart_hq" '.($settings['hq']=='3'?' checked="checked"':'').' onchange="changeTableChart(\''.$chartID.'\', \''.$this->podstran.'\', \'hq\');">';
+ echo '<label for="tablechart_hq_'.$chartID.'">'.$lang['srv_chart_hq'].'</label>';
echo '</div>';
break;
@@ -2273,33 +2250,18 @@ class SurveyTableChart {
$checked = ($settings['show_numerus']=='1') ? ' checked="checked"': '';
- echo $lang['srv_chart_showNumerus'].': ';
echo '<input type="checkbox" id="tablechart_show_numerus_'.$chartID.'" name="tablechart_show_numerus" '.$checked.' onchange="changeTableChart(\''.$chartID.'\', \'ttest\', \'show_numerus\');">';
+ echo '<label for="tablechart_show_numerus_'.$chartID.'">'.$lang['srv_chart_showNumerus'].'</label>';
echo '</div>';
default:
break;
- }
-
-
- // Link na urejanje label
- //echo '<span class="edit" style="margin-top:15px;" onclick="chartAdvancedSettings(\''.$this->counter.'\');">'.$lang['srv_chart_advancedLink_labels'].'</span>';
- // Vprasajcek za pomoc
- //echo Help :: display('displaychart_settings_labels');
-
- // Link na urejanje barv
- echo '<span class="edit" onclick="tableChartAdvancedSettings(\''.$chartID.'\', \''.$this->podstran.'\')">'.$lang['srv_chart_advancedLink_colors'].'</span>';
- // Vprasajcek za pomoc
- echo Help :: display('displaychart_settings_colors');
-
- // Link na rekodiranje
- //echo '<span class="edit" onclick="chartAdvancedSettings(\''.$this->counter.'\', \'3\');">'.$lang['srv_chart_advancedLink_recoding'].'</span>';
- // Vprasajcek za pomoc
- //echo Help :: display('displaychart_settings_recoding');
-
+ }
echo '</div>';
+
+ echo '</div>';
}
// ikone na vrhu posameznih nastavitev (izvozi)
@@ -2310,16 +2272,9 @@ class SurveyTableChart {
// linki
echo '<div class="chart_setting_exportLinks">';
- // Ikona za print
- echo '<a href="#" onclick="showAnalizaSingleChartPopup(\''.$chartID.'\',\''.M_ANALYSIS_CHARTS.'\'); return false;">';
- echo '<span class="faicon print_small icon-grey_dark_link" title="' . $lang['PRN_Izpis'] . '"></span>';
- echo '</a>';
+ // Gumb za nastavitve
+ echo '<button class="small white-blue" onClick="tableChartAdvancedSettings(\''.$chartID.'\', \''.$this->podstran.'\');"><span class="faicon wheel_32"></span>'.$lang['settings'].'</button>';
- // Izvoz posameznega grafa v PDF/RTF/PPT
- echo '&nbsp;<a href="'.makeEncodedIzvozUrlString('izvoz.php?m=charts&anketa='.$this->anketa.'&sprID='.$chartID).'" target="_blank" title="'.$lang['PDF_Izpis'].'"><span class="faicon pdf"></span>&nbsp;</a>';
- echo '&nbsp;<a href="'.makeEncodedIzvozUrlString('izvoz.php?m=charts_rtf&anketa='.$this->anketa.'&sprID='.$chartID).'" target="_blank" title="'.$lang['RTF_Izpis'].'"><span class="faicon rtf"></span>&nbsp;</a>';
- echo '&nbsp;<a href="'.makeEncodedIzvozUrlString('izvoz.php?m=charts_ppt&anketa='.$this->anketa.'&sprID='.$chartID).'" target="_blank" title="'.$lang['PPT_Izpis'].'"><span class="faicon ppt"></span>&nbsp;</a>';
-
echo '</div>';
}
@@ -2331,7 +2286,7 @@ class SurveyTableChart {
// Tip grafa
echo '<div class="chart_setting">';
- echo $lang['srv_chart_type'].':<br /> <select style="width:140px;" id="tablechart_type_'.$chartID.'" name="tablechart_type" onchange="changeTableChart(\''.$chartID.'\', \'crosstab\', \'type\');">';
+ echo $lang['srv_chart_type'].': <select class="dropdown small" id="tablechart_type_'.$chartID.'" name="tablechart_type" onchange="changeTableChart(\''.$chartID.'\', \'crosstab\', \'type\');">';
if($this->crossCheck){
// navedbe
@@ -2364,7 +2319,7 @@ class SurveyTableChart {
// tip izpisa vrednosti
echo '<div class="chart_setting">';
- echo $lang['srv_chart_valtype'].': <select id="tablechart_value_type_'.$chartID.'" name="tablechart_value_type" onchange="changeTableChart(\''.$chartID.'\', \'crosstab\', \'value_type\');">';
+ echo $lang['srv_chart_valtype'].': <select id="tablechart_value_type_'.$chartID.'" name="tablechart_value_type" class="dropdown small" onchange="changeTableChart(\''.$chartID.'\', \'crosstab\', \'value_type\');">';
echo ' <option value="0" '.($settings['value_type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_percent'].'</option>';
echo ' <option value="1" '.($settings['value_type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_freq'].'</option>';
@@ -2374,29 +2329,12 @@ class SurveyTableChart {
// prikaz label v stolpcih
- //if($settings['type'] == 0 || $settings['type'] == 1){
- echo '<div class="chart_setting">';
-
- echo $lang['srv_chart_barLabel'].': ';
- echo '<input type="checkbox" id="tablechart_barLabel_'.$chartID.'" name="tablechart_barLabel" '.($settings['barLabel']=='1'?' checked="checked"':'').' onchange="changeTableChart(\''.$chartID.'\', \'crosstab\', \'barLabel\');">';
+ echo '<div class="chart_setting">';
+
+ echo '<input type="checkbox" id="tablechart_barLabel_'.$chartID.'" name="tablechart_barLabel" '.($settings['barLabel']=='1'?' checked="checked"':'').' onchange="changeTableChart(\''.$chartID.'\', \'crosstab\', \'barLabel\');">';
+ echo '<label for="tablechart_barLabel_'.$chartID.'">'.$lang['srv_chart_barLabel'].'</label>';
- echo '</div>';
- //}
-
-
- // sirina label
- /*if($settings['type'] == 0 || $settings['type'] == 3){
- echo '<div class="chart_setting">';
-
- echo $lang['srv_wide_chart'].': <select id="tablechart_labelWidth_'.$chartID.'" name="tablechart_labelWidth" onchange="changeTableChart(\''.$chartID.'\', \'crosstab\', \'labelWidth\');">';
-
- echo ' <option value="50" '.($settings['labelWidth']=='50'?' selected="selected"':'').'>50%</option>';
- echo ' <option value="20" '.($settings['labelWidth']=='20'?' selected="selected"':'').'>20%</option>';
-
- echo '</select>';
-
- echo '</div>';
- }*/
+ echo '</div>';
}
// Nastavitve za ttest graf
@@ -2407,7 +2345,7 @@ class SurveyTableChart {
// sirina label
echo '<div class="chart_setting">';
- echo $lang['srv_wide_chart'].': <select id="tablechart_labelWidth_'.$chartID.'" name="tablechart_labelWidth" onchange="changeTableChart(\''.$chartID.'\', \'ttest\', \'labelWidth\');">';
+ echo $lang['srv_wide_chart'].': <select class="dropdown small" id="tablechart_labelWidth_'.$chartID.'" name="tablechart_labelWidth" onchange="changeTableChart(\''.$chartID.'\', \'ttest\', \'labelWidth\');">';
echo ' <option value="50" '.($settings['labelWidth']=='50'?' selected="selected"':'').'>50%</option>';
echo ' <option value="20" '.($settings['labelWidth']=='20'?' selected="selected"':'').'>20%</option>';
@@ -2420,8 +2358,8 @@ class SurveyTableChart {
// visoka locljivost grafa
echo '<div class="chart_setting">';
- echo $lang['srv_chart_hq'].': ';
echo '<input type="checkbox" id="tablechart_hq_'.$chartID.'" name="tablechart_hq" '.($settings['hq']=='3'?' checked="checked"':'').' onchange="changeTableChart(\''.$chartID.'\', \'ttest\', \'hq\');">';
+ echo '<label for="tablechart_hq_'.$chartID.'">'.$lang['srv_chart_hq'].'</label>';
echo '</div>';
}
@@ -2433,7 +2371,7 @@ class SurveyTableChart {
// Tip grafa
echo '<div class="chart_setting">';
- echo $lang['srv_chart_type'].':<br /> <select style="width:140px;" id="tablechart_type_'.$chartID.'" name="tablechart_type" onchange="changeTableChart(\''.$chartID.'\', \'mean\', \'type\');">';
+ echo $lang['srv_chart_type'].': <select class="dropdown small" id="tablechart_type_'.$chartID.'" name="tablechart_type" onchange="changeTableChart(\''.$chartID.'\', \'mean\', \'type\');">';
echo ' <option value="0" '.($settings['type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_avg_hor'].'</option>';
echo ' <option value="1" '.($settings['type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_avg_radar'].'</option>';
@@ -2446,8 +2384,8 @@ class SurveyTableChart {
// sortiranje
echo '<div class="chart_setting">';
- echo $lang['srv_chart_sort'].': ';
echo '<input type="checkbox" id="tablechart_sort_'.$chartID.'" name="tablechart_sort" '.($settings['sort']=='1'?' checked="checked"':'').' onchange="changeTableChart(\''.$chartID.'\', \'mean\', \'sort\');">';
+ echo '<label for="tablechart_sort_'.$chartID.'">'.$lang['srv_chart_sort'].'</label>';
echo '</div>';
@@ -2456,7 +2394,7 @@ class SurveyTableChart {
if($settings['type'] == 0){
echo '<div class="chart_setting">';
- echo $lang['srv_wide_chart'].': <select id="tablechart_labelWidth_'.$chartID.'" name="tablechart_labelWidth" onchange="changeTableChart(\''.$chartID.'\', \'mean\', \'labelWidth\');">';
+ echo $lang['srv_wide_chart'].': <select class="dropdown small" id="tablechart_labelWidth_'.$chartID.'" name="tablechart_labelWidth" onchange="changeTableChart(\''.$chartID.'\', \'mean\', \'labelWidth\');">';
echo ' <option value="50" '.($settings['labelWidth']=='50'?' selected="selected"':'').'>50%</option>';
echo ' <option value="20" '.($settings['labelWidth']=='20'?' selected="selected"':'').'>20%</option>';
@@ -2470,7 +2408,7 @@ class SurveyTableChart {
// Tip radarja
if($settings['type'] == 1){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_radar_type'].': <select id="tablechart_radar_type_'.$chartID.'" name="tablechart_radar_type" onchange="changeTableChart(\''.$chartID.'\', \'mean\', \'radar_type\');">';
+ echo $lang['srv_chart_radar_type'].': <select class="dropdown small" id="tablechart_radar_type_'.$chartID.'" name="tablechart_radar_type" onchange="changeTableChart(\''.$chartID.'\', \'mean\', \'radar_type\');">';
echo ' <option value="0" '.($settings['radar_type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar_type0'].'</option>';
echo ' <option value="1" '.($settings['radar_type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_radar_type1'].'</option>';
@@ -2482,7 +2420,7 @@ class SurveyTableChart {
// Postavitev skale pri radarju
if($settings['type'] == 1){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_radar_scale'].': <select id="tablechart_radar_scale_'.$chartID.'" name="tablechart_radar_scale" onchange="changeTableChart(\''.$chartID.'\', \'mean\', \'radar_scale\');">';
+ echo $lang['srv_chart_radar_scale'].': <select class="dropdown small" id="tablechart_radar_scale_'.$chartID.'" name="tablechart_radar_scale" onchange="changeTableChart(\''.$chartID.'\', \'mean\', \'radar_scale\');">';
echo ' <option value="0" '.($settings['radar_scale']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar_scale0'].'</option>';
echo ' <option value="1" '.($settings['radar_scale']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_radar_scale1'].'</option>';
@@ -2501,7 +2439,7 @@ class SurveyTableChart {
// Tip grafa
echo '<div class="chart_setting">';
- echo $lang['srv_chart_type'].':<br /> <select style="width:140px;" id="tablechart_type_'.$chartID.'" name="tablechart_type" onchange="changeTableChart(\''.$chartID.'\', \'break\', \'type\');">';
+ echo $lang['srv_chart_type'].': <select class="dropdown small" id="tablechart_type_'.$chartID.'" name="tablechart_type" onchange="changeTableChart(\''.$chartID.'\', \'break\', \'type\');">';
if($tip != 7)
echo ' <option value="0" '.($settings['type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar'].'</option>';
@@ -2515,7 +2453,7 @@ class SurveyTableChart {
// sortiranje
echo '<div class="chart_setting">';
- echo $lang['srv_chart_sort'].': <select id="tablechart_sort_'.$chartID.'" name="tablechart_sort" onchange="changeTableChart(\''.$chartID.'\', \'break\', \'sort\');">';
+ echo $lang['srv_chart_sort'].': <select class="dropdown small" id="tablechart_sort_'.$chartID.'" name="tablechart_sort" onchange="changeTableChart(\''.$chartID.'\', \'break\', \'sort\');">';
echo ' <option value="0" '.($settings['sort']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_sort_no'].'</option>';
if($tip != 7)
@@ -2531,13 +2469,13 @@ class SurveyTableChart {
if($settings['rotate']=='1'){
echo $lang['srv_chart_rotate_grids'].' ';
- echo '<span onclick="changeTableChart(\''.$chartID.'\', \'break\', \'rotate\');" style="cursor: pointer;"><img src="img_0/random_off.png" title="Obrni grafe/variable" /></span>';
+ echo '<span class="faicon refresh" onclick="changeTableChart(\''.$chartID.'\', \'break\', \'rotate\');" style="cursor: pointer;" title="Obrni grafe/variable"></span>';
echo '<input type="hidden" id="tablechart_rotate_'.$chartID.'" name="tablechart_rotate" value="0">';
echo ' '.$lang['srv_chart_rotate_vars'].' ';
}
else{
echo $lang['srv_chart_rotate_vars'].' ';
- echo '<span onclick="changeTableChart(\''.$chartID.'\', \'break\', \'rotate\');" style="cursor: pointer;"><img src="img_0/random_off.png" title="Obrni grafe/variable" /></span>';
+ echo '<span class="faicon refresh" onclick="changeTableChart(\''.$chartID.'\', \'break\', \'rotate\');" style="cursor: pointer;" title="Obrni grafe/variable"></span>';
echo '<input type="hidden" id="tablechart_rotate_'.$chartID.'" name="tablechart_rotate" value="1">';
echo ' '.$lang['srv_chart_rotate_grids'];
}
@@ -2546,7 +2484,7 @@ class SurveyTableChart {
// Tip radarja
if($settings['type'] == '0'){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_radar_type'].': <select id="tablechart_radar_type_'.$chartID.'" name="tablechart_radar_type" onchange="changeTableChart(\''.$chartID.'\', \'break\', \'radar_type\');">';
+ echo $lang['srv_chart_radar_type'].': <select class="dropdown small" id="tablechart_radar_type_'.$chartID.'" name="tablechart_radar_type" onchange="changeTableChart(\''.$chartID.'\', \'break\', \'radar_type\');">';
echo ' <option value="0" '.($settings['radar_type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar_type0'].'</option>';
echo ' <option value="1" '.($settings['radar_type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_radar_type1'].'</option>';
@@ -2558,7 +2496,7 @@ class SurveyTableChart {
// Postavitev skale pri radarju
if($settings['type'] == '0'){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_radar_scale'].': <select id="tablechart_radar_scale_'.$chartID.'" name="tablechart_radar_scale" onchange="changeTableChart(\''.$chartID.'\', \'break\', \'radar_scale\');">';
+ echo $lang['srv_chart_radar_scale'].': <select class="dropdown small" id="tablechart_radar_scale_'.$chartID.'" name="tablechart_radar_scale" onchange="changeTableChart(\''.$chartID.'\', \'break\', \'radar_scale\');">';
echo ' <option value="0" '.($settings['radar_scale']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar_scale0'].'</option>';
echo ' <option value="1" '.($settings['radar_scale']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_radar_scale1'].'</option>';
@@ -2590,7 +2528,6 @@ class SurveyTableChart {
// urejanje label
echo '<div id="chartSettingsArea2" class="chartSettingsArea" style="visibility: hidden;">';
- //$this->displayAdvancedSettingsLabels($chartID);
echo '</div>';
echo '</form>';