function draw_graph($type, $settings = array(), $values = array(), $colors = array(), $links = array(), $h = 300, $w = 200)
 {
     $g = new SVGGraph($w, $h, $settings);
     $g->Values($values);
     $g->Colours($colors);
     $g->Links($links);
     $img = $g->Fetch($type);
     return $img;
 }
Exemplo n.º 2
0
 protected function renderGraph($graphType, $width, $height, $settings, $values, $destFile = null)
 {
     $graph = new \SVGGraph($width, $height, $settings);
     $graph->Values($values);
     if ($destFile) {
         ob_start();
     }
     $graph->Render($graphType, false, false);
     if ($destFile) {
         file_put_contents($destFile, ob_get_clean());
     }
 }
Exemplo n.º 3
0
<?php

require_once __DIR__ . '/vendor/autoload.php';
$settings = array('back_colour' => 'white', 'graph_title' => 'Start of Fibonacci series');
$graph = new SVGGraph(600, 450, $settings);
$graph->Values(0, 1, 1, 2, 3, 5, 8, 13, 21);
$graph->Render('BarGraph');
Exemplo n.º 4
0
/**
 * Box-report generator complement, encapsulate SVGGraph handlings.
 */
function set_graph_3slices($vals, $vLabel, $is_float, $is_explode, $no_label = true, $gbox_w = 320, $gbox_h = 0)
{
    $graph_3slices = new SVGGraph($gbox_w, $gbox_h, ['label_font' => 'Georgia', 'label_font_size' => '18', 'label_colour' => '#000', 'back_colour' => 'white', 'stroke_colour' => 'rgb(180,140,140)', 'explode_amount' => 16, 'explode' => 'all', 'sort' => false]);
    $vals_out = [];
    $colours = [];
    foreach ($vals as $k => $v) {
        $label = $no_label ? '' : "{$vLabel[$k][0]} ";
        $vals_out[sprintf($is_float ? "{$label}%.1f%%" : "{$label}%s%%", $v)] = $v;
        $colours[] = $vLabel[$k][1];
    }
    $graph_3slices->Values($vals_out);
    $graph_3slices->colours = $colours;
    // sort=false to preserve colour-value matching.
    if ($is_explode) {
        $GG = $graph_3slices->Fetch('ExplodedPieGraph', false);
    } else {
        $GG = $graph_3slices->Fetch('PieGraph', false);
    }
    $GG = preg_replace('#<rect .+?/>#', '', $GG);
    return $GG;
}
 public function processText()
 {
     $process_settings = array('stroke_width' => 0, 'stroke_colour' => '#FF0000', 'show_grid' => true, 'show_grid_h' => true, 'show_grid_v' => false, 'grid_colour' => '#7C7C7C', 'group_space' => 5, 'bar_space' => 30, 'show_bar_labels' => true, 'bar_label_colour_above' => '#FFF', 'bar_label_space' => 20, 'bar_label_font_weight' => 'bold', 'bar_label_font_size' => 12, 'units_label' => '%', 'show_axis_h' => false, 'show_axis_v' => false, 'axis_colour' => '#fff', 'axis_overlap' => 0, 'axis_font' => 'arial', 'axis_font_size' => 12, 'axis_text_position_v' => -10, 'axis_max_v' => 100, 'grid_division_v' => 100, 'pad_right' => 0, 'pad_left' => 0, 'legend_position' => 'top left 5 5', 'legend_back_colour' => '#000', 'legend_entries' => array('Ad Hoc and Opportunistic', 'Repeatable', 'Managed and Optimized'), 'legend_stroke_width' => 0, 'legend_font_size' => 12, 'legend_colour' => '#FFF', 'label_h' => 'Big Data Maturity', 'show_axis_text_h' => false, 'label_font_size' => 14, 'label_font_weight' => 'bold', 'label_colour' => '#FFF');
     $colours = array('#F39D1E', '#43C7F4', '#FFF');
     $this->pdf->AddPage();
     $this->pdf->RoundedRect($this->margins['left'], $this->pdf->GetY(), $this->pdf->getPageWidth() - $this->margins['left'] - $this->margins['right'], 75, 1.75, '1111', 'F', array(), array(239, 171, 30));
     $this->pdf->RoundedRect($this->margins['left'], $this->pdf->GetY() + 1.25, $this->pdf_w - $this->margins['left'] - $this->margins['right'], 75, 1.75, '1111', 'F', array(), array(0));
     $this->pdf->setPageMark();
     $this->pdf->SetXY($this->pdf->GetX(), $this->pdf->GetY() + 5);
     $this->pdf->SetColor('text', 255, 255, 255);
     $this->pdf->SetFont('helvetica', 'I', 7.5);
     $this->pdf->SetCellPaddings(5, 0, 0, 0);
     $process_text = '<h4>PROCESS</h4>
             <em>The process measure includes attributes such as processes for data collection, consolidation, integration, analysis, information dissemination and consumption, and decision making. <br/><br/>
             In organizations where Big Data maturity is ad hoc or opportunistic, only <strong>1%</strong> believe their Big Data, analytics, and decision support related measurement and management processes are in a continuous process of improvement, enabled by quantitative feedback for the process from piloting innovative new ideas.<br/><br/>
             In organizations where Big Data maturity is managed or optimized, <strong>86%</strong> believe their processes are continuously improving.</em>
         ';
     $this->pdf->writeHTMLCell(95, 0, '', '', $process_text, array('R' => $this->style_small_dot_orange), 0);
     $cur_x = $this->pdf->GetX();
     $this->pdf->SetColor('text', 239, 171, 30);
     $this->pdf->SetFont('helvetica', 'B', 8);
     $this->pdf->MultiCell(90, 0, 'Percentage of organizations where continuous process improvement is enabled by quantitative feedback for the process from piloting innovative new ideas', 0, 'L');
     $barGraph = new SVGGraph(437, 300, $process_settings);
     $barGraph->colours = $colours;
     $values = array(1, 16, 86);
     //$values = array(array(10,20),array(30,40));
     $barGraph->Values($values);
     //first graph
     $this->pdf->SetLineStyle($this->style_small_orange);
     $output = $barGraph->fetch('BarGraph');
     $this->pdf->ImageSVG('@' . $output, $cur_x + 10, $this->pdf->GetY() + 2, $w = 80, $h = '', '', $align = '', $palign = '', '', $fitonpage = false);
     $this->pdf->SetXY($cur_x + 5, $this->pdf->GetY() + 54);
     $this->pdf->SetColor('text', 255, 255, 255);
     $this->pdf->SetFont('helvetica', 'B', 7.5);
     $this->pdf->SetCellPadding(2);
     //first graph Label
     //$this->pdf->MultiCell(40,0,'Ad hoc and Opportunistic',0,'C',false,0);
     //second graph Label
     //$this->pdf->MultiCell(40,0,'Managed and Optimized',0,'C');
     $this->pdf->SetXY($this->margins['left'] + 36, $this->pdf->GetY() + 20);
     $this->pdf->SetCellPaddings(5, 0, 0, 0);
     //defaultText
     $this->defaultText($this->pdf);
     $process_text = '<h4>IT IS IMPORTANT TO:</h4>
             <h4>1. Drive process repeatability based on user type.</h4>
             Ramp up efforts to monitor and document decision processes and outcomes to make the processes repeatable and to learn how decisions affected outcomes in previous situations. This could differ by type of user, whether that be an executive, a line-of-business manager, a business analyst, or a traditional user. Understanding how each of these users goes about the decision-making process will help to make those processes more repeatable and scalable across the broader organization.
             <h4>2. Categorize Big Data processes.</h4>
             Think about those data-driven decision processes that are most relevant to performance management, where decisions relate to business outcomes and exploration, where data is investigated to determine insights that could be one-time only or could demonstrate why the data should be integrated into performance management processes. As part of this, there should be an awareness that Big Data processes need to span the full spectrum of data collection, management, and analysis processes. 
             <h4>3. Drive process collaboration between various stakeholders.</h4>
             Work to improve collaboration between business units, analytical groups, and IT around Big Data. Generally, business units understand the nuances of the business requirements, while IT can play a valuable role in building systems on the principles of reusability, reducing the likelihood of creating silos. The analytics teams should aim to sit between IT and the business to help drive collaboration across the various departments. The Big Data competency center should play a coordinator role across these various sets of stakeholders.
         ';
     $this->pdf->writeHTMLCell(0, 0, '', '', $process_text, array('L' => $this->style_small_orange), 1);
 }
Exemplo n.º 6
0
                    $p3 += 1;
                    break;
                case 4:
                    $p4 += 1;
                    break;
                case 5:
                    $p5 += 1;
                    break;
                default:
                    break;
            }
        }
        array_push($values, array("1." => $p1, "2." => $p2, "3." => $p3, "4." => $p4, "5." => $p5));
        echo "<h3 style='text-align: center;'>" . $questions[$i - 1] . "</h3>";
        $colours = array(array('#E80000', '#E80000'), array('orange', 'orange'), array('yellow', 'yellow'), array('lightgreen', 'lightgreen'), array('#39E81A', '#39E81A'));
        $graph = new SVGGraph(512, 320, $settings);
        $graph->colours = $colours;
        $graph->Values($values);
        echo $graph->Fetch('BarGraph', false) . "<hr>";
    }
} else {
    ?>
 <p> Välj vilken klass samt lärare ovan fär att se dess resultat.</p> <?php 
}
?>
			</div>
		</div>
		
	</body>
	
</html>
Exemplo n.º 7
0
 /**
  * Pass in the type of graph to display
  */
 public function Render($class, $header = TRUE, $content_type = TRUE, $defer_js = FALSE)
 {
     SVGGraph::$last_instance = $this->Setup($class);
     return SVGGraph::$last_instance->Render($header, $content_type, $defer_js);
 }
Exemplo n.º 8
0
 /**
  * Creates the pie circle as an SVG image using SVGGraph, then imports it
  * into the pdf using TCPDF.
  * <p>
  * The x/y define the origin of where to begin drawing the svg graphic;
  * this is the upper left corner of image.
  * <p>
  * To draw the svg graphic this method calls SVGGraph->Fetch
  * <p>
  * To import the svg graphic into the pdf this method calls TCPDF->ImageSVG
  * <p>
  * ImageSVG params:
  * $file, $x='', $y='', $w=0, $h=0, $link='', $align='', $palign='',
  * 	$border=0, $fitonpage=false
  *
  * @param float $curX	the x position
  * @param float $curY	the y position
  */
 public function drawPie($curX, $curY)
 {
     // process the values and colors, to deal with a bug in SVGGraph where a value of 0
     // doesn't use a color from the list, which would cause the slices to not be the correct color
     $values = $this->pieWedgeValues;
     $colors = $this->getGraphColorsText();
     self::fixGraphValuesAndColors($values, $colors);
     /*
      Create the pie as a circle in an SVG image; width in pixels, height in pixels, settings.
      If aspect_raitio is 1.0, the smallest value controls the size; HOWEVER, the svg image itself
      is rectilinear (give it a border and this becomes visible) and will be what height and width
      you set it to, such as 100 x 200.
     */
     $graph = new SVGGraph($this->svgGraphicWidth, $this->svgGraphicHeight, $this->svgGraphSettings);
     $graph->Values($values);
     $graph->Colours($colors);
     $svg = $graph->Fetch('PieGraph');
     // This imports the svg into the PDF.
     $this->pdf->ImageSVG('@' . $svg, $curX, $curY, 0, 0, '', '', '', $this->imageSvgBorder);
 }
Exemplo n.º 9
0
 public function intro($result, $baseline, $quiz)
 {
     File::requireOnce(app_path() . '/library/SVGGraph/SVGGraph.php');
     $bus = Lang::get('report.itbusiness');
     $ser = Lang::get('report.itservicedelivery');
     $inf = Lang::get('report.itinfrastructure');
     $this->tempLabels = array('itbusiness' => $bus, 'itservicedelivery' => $ser, 'itinfrastructure' => $inf);
     $this->SetY(25);
     $this->SetLineStyle(array('width' => 0.85 / $this->k, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(147)));
     $this->SetX($this->original_lMargin);
     $this->SetFont('helvetica', 'B', 10);
     $this->SetColor('text', 10, 38, 56);
     $this->Cell($this->w - $this->original_lMargin - $this->original_rMargin, 0, strtoupper(Lang::get('report.results')), 'B', 2, 'L');
     $this->SetFont('helvetica', '', 8);
     $this->SetColor('text', 85, 85, 85);
     $txt = Lang::get('report.thankyou');
     $this->MultiCell($this->w / 2 - $this->original_lMargin, 0, $txt, 0, 'L');
     $this->SetY($this->GetY() + 2);
     $txt = Lang::get('report.bullets');
     // output the HTML content
     $this->writeHTMLCell($this->w / 2 - $this->original_lMargin, 0, $this->GetX(), $this->GetY(), $txt, 0, true, false, true, '');
     $this->SetY($this->GetY() + 2);
     $txt = Lang::get('report.aims');
     $this->MultiCell($this->w - $this->original_lMargin - $this->original_rMargin, 0, $txt, 0, 'L');
     $this->SetFont('helvetica', 'B', 8);
     $this->SetColor('text', 10, 38, 56);
     $this->Cell($this->w - $this->original_lMargin - $this->original_rMargin, 0, Lang::get('report.looked'), 0, 2, 'L');
     $this->SetFont('helvetica', '', 8);
     $this->SetColor('text', 85, 85, 85);
     $this->SetXY($this->GetX() + 5, $this->GetY() + 3);
     $this->ImageEps(K_PATH_IMAGES . 'itbusiness.ai', '', '', 4);
     $this->SetX($this->GetX() + 6);
     $this->Cell(75, 0, Lang::get('report.itbusiness'), 0, 2, 'L');
     $this->SetXY($this->GetX() - 6, $this->GetY() + 2);
     $this->ImageEps(K_PATH_IMAGES . 'itservicedelivery.ai', '', '', 4);
     $this->SetXY($this->GetX() + 6, $this->GetY());
     $this->Cell(75, 0, Lang::get('report.itservicedelivery'), 0, 2, 'L');
     $this->SetXY($this->GetX() - 6, $this->GetY() + 2);
     $this->ImageEps(K_PATH_IMAGES . 'itinfrastructure.ai', '', '', 4);
     $this->SetXY($this->GetX() + 6, $this->GetY());
     $this->Cell(75, 0, Lang::get('report.itinfrastructure'), 0, 2, 'L');
     $this->SetY($this->GetY() + 4);
     $this->SetFont('helvetica', '', 8);
     $txt = Lang::get('report.based');
     $this->MultiCell($this->w - $this->original_lMargin - $this->original_rMargin, 0, $txt, 0, 'L');
     $this->SetFont('helvetica', 'B', 8);
     $this->SetColor('text', 0, 82, 148);
     $this->SetY($this->GetY() + 2);
     $this->Cell($this->w - $this->original_lMargin - $this->original_rMargin, 0, strtoupper(Lang::get('general.' . strtolower($result['overall']['rating']))), 0, 1, 'L');
     $this->resetText();
     switch ($result['overall']['rating']) {
         case "Current-Focused":
             $txt = Lang::get('report.currentintro');
             break;
         case "Future-Aware":
             $txt = Lang::get('report.future-awareintro');
             break;
         case "Future-Focused":
             $txt = Lang::get('report.future-focusedintro');
             break;
         case "Future-Creator":
             $txt = Lang::get('report.future-creatorintro');
             break;
     }
     $this->SetY($this->GetY() + 1);
     $this->MultiCell($this->w - $this->original_lMargin - $this->original_rMargin, 0, $txt, 0, 'L');
     $this->resetText();
     $this->SetY($this->GetY() + 2);
     if ($result['overall']['rating'] == 'Current' || $result['overall']['rating'] == 'Future-Aware') {
         $this->MultiCell($this->w - $this->original_lMargin - $this->original_rMargin, 0, str_replace('#STATUS#', $result['overall']['rating'], Lang::get('report.currentaware')), 0, 'L');
     } else {
         $this->MultiCell($this->w - $this->original_lMargin - $this->original_rMargin, 0, str_replace('#STATUS#', $result['overall']['rating'], Lang::get('report.focusedcreator')), 0, 'L');
     }
     $this->SetY($this->GetY() + 1);
     foreach ($result as $key => $res) {
         if ($key != 'overall' && ($res['rating'] == 'Reactive' || $res['rating'] == 'Mainstream')) {
             if ($this->GetX() + $this->GetStringWidth($this->tempLabels[strtolower($key)]) + 2 > $this->w - $this->original_lMargin - $this->original_rMargin) {
                 $this->SetXY($this->original_lMargin, $this->GetY() + 1);
                 $this->ln();
             }
             $this->SetFont('helvetica', 'B', 8);
             $this->SetColor('text', 0, 82, 148);
             $this->Cell($this->GetStringWidth($this->tempLabels[strtolower($key)]) + 2, 0, " • " . $this->tempLabels[strtolower($key)], 0, 0, 'L');
             $this->SetX($this->GetX() + 2);
         }
     }
     $this->copyY = $this->GetY();
     //graphs
     $this->SetY($this->GetY() + 2);
     //$this->RoundedRect(($this->w/2 - $this->original_lMargin)+15, 34, ($this->w/2 - $this->original_lMargin - 5), 30, 5, '0000', 'F',array(), array(230,231,232));
     $rightX = $this->w / 2 - $this->original_lMargin + 17;
     $this->SetXY($rightX, 38);
     $this->ImageEps(K_PATH_IMAGES . 'graph.ai', $rightX - 2, $this->GetY() - 4, 90);
     $this->SetFont('helvetica', '', 9);
     $this->SetColor('text', 0, 82, 148);
     $this->SetXY($rightX, $this->getY() - 2);
     $this->Cell($this->w / 2 - $this->original_lMargin - 5, 0, strtoupper(Lang::get('report.overall')), 0, 1, 'L');
     //marker
     switch ($result['overall']['rating']) {
         case "Current-Focused":
             $mx = $rightX + 5;
             $my = 68;
             break;
         case "Future-Aware":
             $mx = $rightX + 28;
             $my = 58;
             break;
         case "Future-Focused":
             $mx = $rightX + 51;
             $my = 48;
             break;
         case "Future-Creator":
             $mx = $rightX + 74;
             $my = 38;
             break;
     }
     $this->ImageEps(K_PATH_IMAGES . 'marker.ai', $mx, $my, 8);
     $this->SetColor('text', 0, 82, 148);
     $this->SetFont('helvetica_condensed', 'B', 10);
     $this->MultiCell(8, 5, round($result['overall']['score']), 0, 'C', 0, 0, $mx, $my - 5, true);
     $overbase = $baseline['overall']['baseline'];
     foreach ($baseline['overall']['types'] as $key => $value) {
         if ($key == 'Current-Focused' && ($overbase >= $value['low'] && $overbase >= $value['high'])) {
             $mx = $rightX + 6;
             $my = 70;
         } elseif ($key == 'Future-Aware' && ($overbase >= $value['low'] && $overbase >= $value['high'])) {
             $mx = $rightX + 30;
             $my = 60;
         } elseif ($key == 'Future-Focused' && ($overbase >= $value['low'] && $overbase >= $value['high'])) {
             $mx = $rightX + 51;
             $my = 51;
         } elseif ($key == 'Future-Creator' && ($overbase >= $value['low'] && $overbase >= $value['high'])) {
             $mx = $rightX + 73;
             $my = 42;
         }
     }
     $this->ImageEps(K_PATH_IMAGES . 'marker_base.ai', $mx, $my, 6);
     $this->SetFont('helvetica_condensed', 'B', 8);
     $this->MultiCell(6, 5, $overbase, 0, 'C', 0, 0, $mx, $my - 4, true);
     //legend
     $this->SetXY($rightX - 2, $this->getY() + 34);
     $this->MultiCell(23, 5, Lang::get('general.current-focused'), 0, 'C', 0, 0, '', '', true);
     $this->MultiCell(23, 5, Lang::get('general.future-aware'), 0, 'C', 0, 0, $rightX + 21, $this->getY() - 9, true);
     $this->MultiCell(23, 5, Lang::get('general.future-focused'), 0, 'C', 0, 0, $rightX + 43, $this->getY() - 9.5, true);
     $this->MultiCell(23, 5, Lang::get('general.future-creator'), 0, 'C', 0, 0, $rightX + 65, $this->getY() - 10, true);
     $this->SetXY($rightX + 28, $this->getY() + 28);
     $this->MultiCell(26, 5, strtoupper(Lang::get('report.yourscore')), 0, 'C', 0, 0, '', '', true);
     $this->MultiCell(26, 5, strtoupper(Lang::get('report.baselinescore')), 0, 'C', 0, 0, $this->getX() + 5, $this->getY(), true);
     /*//first graph
     		$settings = array(
     			'back_colour' => '#eee',
     			'stroke_colour' => '#000',
     			'back_stroke_width' => 0,
     			'show_bar_labels' => 1,
     			'bar_label_position' => 'above',
     			'bar_label_font_size' => 14,
     			'bar_label_space' => 5,
     			'bar_label_colour' => '#005294',
     			'show_grid' => false,
     			'show_axis_h' => false,
     			'show_axis_v' => false,
     			'stroke_width' => 0,
     			'back_stroke_colour' => '#eee',
     			'axis_colour' => '#333',
     			'axis_overlap' => 2,
     			'axis_font' => 'Georgia',
     			'axis_font_size' => 10,
     			'grid_colour' => '#666',
     			'label_colour' => '#000',
     			'pad_right' => 10,
     			'pad_left' => 10,
     			'grid_division_h' => 20
             );
     		$colours = array('#0A2638','#2A96DE');
     		$graph = new SVGGraph(300, 120, $settings);
     		$graph->colours = $colours;
     		$values = array(
     			 array(strtoupper(Lang::get('report.baselinescore')) => $baseline['overall']['baseline'], strtoupper(Lang::get('report.yourscore')) => $result['overall']['score'])
     		);
     		$graph->Values($values);
     		
     		$output = $graph->fetch('HorizontalBarGraph');
     		$this->ImageSVG('@'.$output, $rightX, $this->GetY(), $w=60, $h='', '', $align='', $palign='', '', $fitonpage=false);*/
     //Overal/
     $this->RoundedRect($this->w / 2 - $this->original_lMargin + 15, 102, $this->w / 2 - $this->original_lMargin - 5, 45, 5, '0000', 'F', array(), array(230, 231, 232));
     //overall
     $this->SetXY($rightX, 39);
     $this->SetColor('text', 42, 150, 222);
     $this->SetFont('impact', '', 34);
     $this->Cell(10, 0, round($result['overall']['score']), 0, 0, 'L');
     $this->SetXY($rightX + 13, 44);
     $this->SetFont('helvetica_condensed', '', 10);
     $this->SetColor('text', 172);
     $this->Cell(30, 0, strtoupper(Lang::get('general.' . strtolower($result['overall']['rating']))), 0, 1, 'L');
     //second graph
     $this->SetXY($rightX, 105);
     $this->SetFont('helvetica', '', 9);
     $this->SetColor('text', 0, 82, 148);
     $this->Cell($this->w / 2 - $this->original_lMargin - 5, 0, strtoupper(Lang::get('report.section')), 0, 1, 'L');
     $settings = array('back_colour' => '#eee', 'stroke_colour' => '#000', 'back_stroke_width' => 0, 'show_grid' => false, 'show_axis_h' => false, 'show_axis_v' => false, 'stroke_width' => 0, 'back_stroke_colour' => '#eee', 'axis_colour' => '#333', 'axis_overlap' => 2, 'axis_font' => 'Georgia', 'axis_font_size' => 10, 'grid_colour' => '#666', 'label_colour' => '#000', 'pad_right' => 10, 'pad_left' => 10, 'bar_space' => 15, 'grid_division_v' => 10, 'show_axis_text_h' => false);
     $colours = array('#2A96DE', '#0A2638');
     $graph = new SVGGraph(300, 100, $settings);
     $graph->colours = $colours;
     $values = array(array(Lang::get('report.itbusiness') => $result['itbusiness']['score'], Lang::get('report.itservicedelivery') => $result['itservicedelivery']['score'], Lang::get('report.itinfrastructure') => $result['itinfrastructure']['score']), array(Lang::get('report.itbusiness') => $baseline['itbusiness']['baseline'], Lang::get('report.itservicedelivery') => $baseline['itservicedelivery']['baseline'], Lang::get('report.itinfrastructure') => $baseline['itinfrastructure']['baseline']));
     $graph->Values($values);
     //first graph
     $output = $graph->fetch('GroupedBarGraph');
     $this->ImageSVG('@' . $output, $rightX, $this->GetY(), $w = 84, $h = '', '', $align = '', $palign = '', '', $fitonpage = false);
     //legend
     $this->SetFont('helvetica_condensed', '', 8);
     $this->SetColor('text', 10, 38, 56);
     $this->Rect($rightX + 40, $this->getY(), 4, 4, 'F', array(), array(42, 150, 222));
     $this->SetXY($rightX + 45, $this->getY());
     $this->MultiCell(15, 5, Lang::get('report.yourscore'), 0, 'L', 0, 0, '', '', true);
     $this->Rect($rightX + 60, $this->getY() - 0.5, 4, 4, 'F', array(), array(10, 38, 56));
     $this->SetXY($rightX + 65, $this->getY());
     $this->MultiCell(20, 5, Lang::get('report.baselinescore'), 0, 'L', 0, 0, '', '', true);
     //x-axiz lables
     $this->SetColor('text', 0, 82, 148);
     $this->SetXY($rightX + 7, $this->getY() + 28);
     $this->SetFont('helvetica_condensed', '', 8);
     $this->MultiCell(25, 5, Lang::get('report.itbusiness'), 0, 'C', 0, 0, '', '', true);
     $this->MultiCell(25, 5, Lang::get('report.itservicedelivery'), 0, 'C', 0, 0, '', '', true);
     $this->MultiCell(25, 5, Lang::get('report.itinfrastructure'), 0, 'C', 0, 0, '', '', true);
     //$this->SetY($this->getY()+23);
     $this->resetText();
     //copy
     $this->SetY($this->copyY + 5);
     $this->drawBorder();
     //get_answers
     $answers = array();
     foreach ($quiz as $section => $props) {
         if ($section != 'demographics') {
             foreach ($props['pages'] as $page => $details) {
                 foreach ($details['questions'] as $q => $att) {
                     if (!is_array($att['selected'])) {
                         $val = explode("|", $att['selected']);
                         $answers[$q] = (int) $val[1];
                     } else {
                         $answers[$q] = 0;
                         foreach ($att['selected'] as $select) {
                             $val = explode("|", $select[0]);
                             $answers[$q] += (int) $val[1];
                         }
                     }
                 }
             }
         }
     }
     $style3 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(174));
     $indent = 24;
     $bullet = 4;
     $margins = $this->GetMargins();
     $para_cell = $this->w - $margins['left'] - $margins['right'] - $indent;
     $bullet_cell = $this->w - $margins['left'] - $margins['right'] - ($indent + $bullet);
     //itbusiness
     $this->SetX($this->GetX() + 2);
     $this->ImageEps(K_PATH_IMAGES . 'itbusiness.ai', '', '', 10);
     $this->SetXY($indent, $this->GetY() + 1);
     $this->SetFont('helvetica', 'B', 10);
     $this->SetColor('text', 0, 82, 148);
     $this->Cell(0, 0, Lang::get('report.itbusiness'), 0, 2, 'L');
     $this->resetText();
     $txt = Lang::get('report.itbusinesssummary') . " <b>" . Lang::get('general.' . strtolower($result['itbusiness']['rating'])) . "</b>";
     $this->writeHTMLCell($para_cell, 0, $this->GetX(), $this->GetY() + 1, $txt, 0, 1);
     $this->ln();
     $this->SetFont('helvetica', 'B', 10);
     $this->SetColor('text', 0, 82, 148);
     $this->SetX($indent);
     $this->Cell(0, 0, Lang::get('report.getahead'), 0, 2, 'L');
     $this->resetText();
     $txt = Lang::get('report.itbusiness1');
     $this->Circle($indent + 1.25, $this->GetY() + 4, 0.75, 0, 360, 'D', $style3);
     $this->writeHTMLCell($bullet_cell, 0, $indent + $bullet, $this->GetY() + 2, $txt, 0, 1);
     if ($answers['a1'] < 5) {
         $txt = Lang::get('report.itbusiness2');
         $this->Circle($indent + 1.25, $this->GetY() + 4, 0.75, 0, 360, 'D', $style3);
         $this->writeHTMLCell($bullet_cell, 0, $indent + $bullet, $this->GetY() + 2, $txt, 0, 1);
     }
     if ($answers['a2'] < 4) {
         $txt = Lang::get('report.itbusiness3');
         $this->Circle($indent + 1.25, $this->GetY() + 4, 0.75, 0, 360, 'D', $style3);
         $this->writeHTMLCell($bullet_cell, 0, $indent + $bullet, $this->GetY() + 2, $txt, 0, 1);
     }
     if ($answers['a3'] < 4) {
         $txt = Lang::get('report.itbusiness4');
         $this->Circle($indent + 1.25, $this->GetY() + 4, 0.75, 0, 360, 'D', $style3);
         $this->writeHTMLCell($bullet_cell, 0, $indent + $bullet, $this->GetY() + 2, $txt, 0, 1);
     }
     if ($answers['a4'] < 4) {
         $txt = Lang::get('report.itbusiness5');
         $this->Circle($indent + 1.25, $this->GetY() + 4, 0.75, 0, 360, 'D', $style3);
         $this->writeHTMLCell($bullet_cell, 0, $indent + $bullet, $this->GetY() + 2, $txt, 0, 1);
     }
     if ($answers['a5'] < 3) {
         $txt = Lang::get('report.itbusiness6');
         $this->Circle($indent + 1.25, $this->GetY() + 4, 0.75, 0, 360, 'D', $style3);
         $this->writeHTMLCell($bullet_cell, 0, $indent + $bullet, $this->GetY() + 2, $txt, 0, 1);
     }
     //itservicedelivery
     $this->SetXY($this->GetX() + 3, $this->GetY() + 5);
     $this->ImageEps(K_PATH_IMAGES . 'itservicedelivery.ai', '', '', 7);
     $this->SetXY($indent, $this->GetY() + 1);
     $this->SetFont('helvetica', 'B', 10);
     $this->SetColor('text', 0, 82, 148);
     $this->Cell(0, 0, Lang::get('report.itservicedelivery'), 0, 2, 'L');
     $this->resetText();
     $txt = Lang::get('report.itservicedeliverysummary') . " <b>" . Lang::get('general.' . strtolower($result['itservicedelivery']['rating'])) . "</b>";
     $this->writeHTMLCell($para_cell, 0, $this->GetX(), $this->GetY() + 1, $txt, 0, 1);
     $this->ln();
     $this->SetFont('helvetica', 'B', 10);
     $this->SetColor('text', 0, 82, 148);
     $this->SetX($indent);
     $this->Cell(0, 0, Lang::get('report.getahead'), 0, 2, 'L');
     $this->resetText();
     $txt = Lang::get('report.itservicedelivery1');
     $this->Circle($indent + 1.25, $this->GetY() + 4, 0.75, 0, 360, 'D', $style3);
     $this->writeHTMLCell($bullet_cell, 0, $indent + $bullet, $this->GetY() + 2, $txt, 0, 1);
     if ($answers['b1'] < 4) {
         $txt = Lang::get('report.itservicedelivery2');
         $this->Circle($indent + 1.25, $this->GetY() + 4, 0.75, 0, 360, 'D', $style3);
         $this->writeHTMLCell($bullet_cell, 0, $indent + $bullet, $this->GetY() + 2, $txt, 0, 1);
     }
     if ($answers['b2'] < 4) {
         $txt = Lang::get('report.itservicedelivery3');
         $this->Circle($indent + 1.25, $this->GetY() + 4, 0.75, 0, 360, 'D', $style3);
         $this->writeHTMLCell($bullet_cell, 0, $indent + $bullet, $this->GetY() + 2, $txt, 0, 1);
     }
     if ($answers['b3'] < 4) {
         $txt = Lang::get('report.itservicedelivery4');
         $this->Circle($indent + 1.25, $this->GetY() + 4, 0.75, 0, 360, 'D', $style3);
         $this->writeHTMLCell($bullet_cell, 0, $indent + $bullet, $this->GetY() + 2, $txt, 0, 1);
     }
     if ($answers['b4'] < 4) {
         $txt = Lang::get('report.itservicedelivery5');
         $this->Circle($indent + 1.25, $this->GetY() + 4, 0.75, 0, 360, 'D', $style3);
         $this->writeHTMLCell($bullet_cell, 0, $indent + $bullet, $this->GetY() + 2, $txt, 0, 1);
     }
     if ($answers['b5'] < 4) {
         $txt = Lang::get('report.itservicedelivery6');
         $this->Circle($indent + 1.25, $this->GetY() + 4, 0.75, 0, 360, 'D', $style3);
         $this->writeHTMLCell($bullet_cell, 0, $indent + $bullet, $this->GetY() + 2, $txt, 0, 1);
     }
     if ($answers['b6'] < 5) {
         $txt = Lang::get('report.itservicedelivery7');
         $this->Circle($indent + 1.25, $this->GetY() + 4, 0.75, 0, 360, 'D', $style3);
         $this->writeHTMLCell($bullet_cell, 0, $indent + $bullet, $this->GetY() + 2, $txt, 0, 1);
     }
     //itinfrastructure
     $this->SetXY($this->GetX() + 3, $this->GetY() + 6);
     $this->ImageEps(K_PATH_IMAGES . 'itinfrastructure.ai', '', '', 8);
     $this->SetXY($indent, $this->GetY());
     $this->SetFont('helvetica', 'B', 10);
     $this->SetColor('text', 0, 82, 148);
     $this->Cell(0, 0, Lang::get('report.itinfrastructure'), 0, 2, 'L');
     $this->resetText();
     $txt = Lang::get('report.itinfrastructuresummary') . " <b>" . Lang::get('general.' . strtolower($result['itinfrastructure']['rating'])) . "</b>";
     $this->writeHTMLCell($para_cell, 0, $this->GetX(), $this->GetY() + 1, $txt, 0, 1);
     $this->ln();
     $this->SetFont('helvetica', 'B', 10);
     $this->SetColor('text', 0, 82, 148);
     $this->SetX($indent);
     $this->Cell(0, 0, Lang::get('report.getahead'), 0, 2, 'L');
     $this->resetText();
     $txt = Lang::get('report.itinfrastructure1');
     $this->Circle($indent + 1.25, $this->GetY() + 4, 0.75, 0, 360, 'D', $style3);
     $this->writeHTMLCell($bullet_cell, 0, $indent + $bullet, $this->GetY() + 2, $txt, 0, 1);
     if ($answers['c1'] < 3) {
         $txt = Lang::get('report.itinfrastructure2');
         $this->Circle($indent + 1.25, $this->GetY() + 4, 0.75, 0, 360, 'D', $style3);
         $this->writeHTMLCell($bullet_cell, 0, $indent + $bullet, $this->GetY() + 2, $txt, 0, 1);
     }
     if ($answers['c2'] < 3) {
         $txt = Lang::get('report.itinfrastructure3');
         $this->Circle($indent + 1.25, $this->GetY() + 4, 0.75, 0, 360, 'D', $style3);
         $this->writeHTMLCell($bullet_cell, 0, $indent + $bullet, $this->GetY() + 2, $txt, 0, 1);
     }
     if ($answers['c3'] < 3) {
         $txt = Lang::get('report.itinfrastructure4');
         $this->Circle($indent + 1.25, $this->GetY() + 4, 0.75, 0, 360, 'D', $style3);
         $this->writeHTMLCell($bullet_cell, 0, $indent + $bullet, $this->GetY() + 2, $txt, 0, 1);
     }
     if ($answers['c4'] < 4) {
         $txt = Lang::get('report.itinfrastructure5');
         $this->Circle($indent + 1.25, $this->GetY() + 4, 0.75, 0, 360, 'D', $style3);
         $this->writeHTMLCell($bullet_cell, 0, $indent + $bullet, $this->GetY() + 2, $txt, 0, 1);
     }
     if ($answers['c5'] < 3) {
         $txt = Lang::get('report.itinfrastructure6');
         $this->Circle($indent + 1.25, $this->GetY() + 4, 0.75, 0, 360, 'D', $style3);
         $this->writeHTMLCell($bullet_cell, 0, $indent + $bullet, $this->GetY() + 2, $txt, 0, 1);
     }
     //Conclusion
     $this->SetXY($this->GetX() + 3, $this->GetY() + 5);
     $this->SetXY($indent, $this->GetY() + 1);
     $this->SetFont('helvetica', 'B', 10);
     $this->SetColor('text', 0, 82, 148);
     $this->Cell(0, 0, Lang::get('report.conclusion'), 0, 2, 'L');
     $this->resetText();
     $txt = Lang::get('report.conclusionsummary');
     $this->writeHTMLCell($para_cell, 0, $this->GetX(), $this->GetY() + 1, $txt, 0, 1);
     $this->ln();
 }