private function draw_graph($PFCALCULATOR, $title = "Graph", $GraphSource = "DBI") { $FirstRow = new TActiveTableRow(); $this->resulttable->Rows[] = $FirstRow; $cell = new TActiveTableCell(); $cell->EnableViewState = true; $cell->Text = $title; $cell->setCssClass('listalternating'); $FirstRow->Cells[] = $cell; $celltt = new TActiveTableCell(); $celltt->EnableViewState = true; $celltt->setCssClass('PSPFAZ'); $celltt->setColumnSpan($PFCALCULATOR->NumberOfColumns + 1); //here comes the image component $GraphImage = new TActiveImage(); $GraphImage->ID = $title; $GraphImage->setImageAlign("center"); $GraphImage->setImageUrl($this->generateGraph($this->zwischenergebnisse[$GraphSource], $title)); $celltt->Controls->add($GraphImage); $FirstRow->Cells[] = $celltt; }
private function DrawPSP($data) { foreach ($data as $row) { $act_row = new TActiveTableRow(); $this->resulttable->Rows[] = $act_row; $range1 = $row->ttact_faz; $range2 = $row->ttact_sez - $row->ttact_faz; $ttemp = $row->ttact_sez == 0 ? 1 : $row->ttact_sez; $range3 = $this->MaxElement - $ttemp; if ($range1 == 0) { $cell = new TActiveTableCell(); if (!$range2 == 0) { $cell->setColumnSpan($range2); } $cell->setCssClass('PSPContainer'); $cell->Text = $this->DrawPSPElement($row); $act_row->Cells[] = $cell; $dcell = new TActiveTableCell(); if ($range3 > 0) { $dcell->setColumnSpan($range3); } $dcell->Text = ''; $dcell->setCssClass('PSPContainer'); $act_row->Cells[] = $dcell; } else { $cell = new TActiveTableCell(); if ($range1 < $this->MaxElement) { $cell->setColumnSpan($range1); } else { $cell->setColumnSpan($range1 - 1); } $cell->Text = ''; $cell->setCssClass('PSPContainer'); $act_row->Cells[] = $cell; $zcell = new TActiveTableCell(); if (!$range2 == 0) { $zcell->setColumnSpan($range2); } $zcell->Text = $this->DrawPSPElement($row); $zcell->setCssClass('PSPContainer'); $act_row->Cells[] = $zcell; if ($range3 > 0) { $dcell = new TActiveTableCell(); $dcell->setColumnSpan($range3); $dcell->Text = ''; $dcell->setCssClass('PSPContainer'); $act_row->Cells[] = $dcell; } } } }