svn: /web/doc-editor/trunk/php/ ExtJsController.php
[email protected] (Yannick Torres)
| Newsgroups | php.doc.web |
|---|---|
| Message-ID | <[email protected]> |
yannick Mon, 21 Dec 2009 00:28:49 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=292389
Log:
CleanUP old Jpgraph function & add a comment on new method
Changed paths:
U web/doc-editor/trunk/php/ExtJsController.php
Modified: web/doc-editor/trunk/php/ExtJsController.php
===================================================================
--- web/doc-editor/trunk/php/ExtJsController.php 2009-12-21 00:27:24 UTC (rev 292388)
+++ web/doc-editor/trunk/php/ExtJsController.php 2009-12-21 00:28:49 UTC (rev 292389)
@@ -1237,7 +1237,9 @@
exit;
}
-
+ /**
+ * Get information to build the language specific graph
+ */
public function getGraphLang()
{
@@ -1267,6 +1269,9 @@
}
+ /**
+ * Get information to build the graph for all languages
+ */
public function getGraphLangs()
{
@@ -1297,86 +1302,6 @@
}
/**
- * Return the translation graph, generated by JpGraph
- */
-/*
- public function translationGraph()
- {
- error_reporting(0);
-
- require_once dirname(__FILE__) . '/jpgraph/src/jpgraph.php';
- require_once dirname(__FILE__) . '/jpgraph/src/jpgraph_pie.php';
- require_once dirname(__FILE__) . '/jpgraph/src/jpgraph_pie3d.php';
-
- AccountManager::getInstance()->isLogged();
- $lang = AccountManager::getInstance()->vcsLang;
-
- $summary = RepositoryFetcher::getInstance()->getStaticValue('translation_summary', $lang);
-
- $data = array($summary[0]->nbFiles, $summary[1]->nbFiles, $summary[2]->nbFiles);
- $pourcent = array();
- $total = 0;
- $total = array_sum($data);
-
- foreach ( $data as $valeur ) {
- $pourcent[] = round($valeur * 100 / $total);
- }
-
- $noExplode = ($total == $summary[0]->nbFiles) ? 1 : 0;
-
- $legend = array(
- $pourcent[0] . "%% up to date (" . $summary[0]->nbFiles . ")",
- $pourcent[1] . "%% stales (" . $summary[1]->nbFiles . ")",
- $pourcent[2] . "%% missing (" . $summary[2]->nbFiles . ")"
- );
-
- $title = 'PHP : Details for '.ucfirst($lang).' Documentation';
-
- $graph = new PieGraph(530,300);
- $graph->SetShadow();
-
- $graph->title->Set($title);
- $graph->title->Align('left');
- $graph->title->SetFont(FF_FONT1,FS_BOLD);
-
- $graph->legend->Pos(0.02,0.18,"right","center");
-
- $graph->subtitle->Set('(Total: '.$total.' files)');
- $graph->subtitle->Align('left');
- $graph->subtitle->SetColor('darkred');
-
- $t1 = new Text(date('m/d/Y'));
- $t1->SetPos(522,294);
- $t1->SetFont(FF_FONT1,FS_NORMAL);
- $t1->Align("right", 'bottom');
- $t1->SetColor("black");
- $graph->AddText($t1);
-
- $p1 = new PiePlot3D($data);
- $p1->SetSliceColors(
- array(
- '#68d888',
- '#ff6347',
- '#eee8aa',
- '#dcdcdc',
- '#f4a460'
- )
- );
- if ($noExplode != 1) {
- $p1->ExplodeAll();
- }
- $p1->SetCenter(0.35,0.55);
- $p1->value->Show(false);
-
- $p1->SetLegends($legend);
-
- $graph->Add($p1);
- $graph->Stroke();
-
- return '';
- }
-*/
- /**
* Get the date/time of the last data update
*/
public function getLastUpdate()