Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 6847 | Rev 6911 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 6847 Rev 6908
Línea 93... Línea 93...
93
        $bplot->value->Show();
93
        $bplot->value->Show();
94
        $graph->Add($bplot);
94
        $graph->Add($bplot);
Línea 95... Línea 95...
95
 
95
 
96
        $graph->Stroke($filename);
96
        $graph->Stroke($filename);
-
 
97
    }
-
 
98
 
-
 
99
    function SetLegends($data, $format)
-
 
100
    {
-
 
101
        $this->legends=array();
-
 
102
        $this->wLegend=0;
-
 
103
        $this->sum=array_sum($data);
-
 
104
        $this->NbVal=count($data);
-
 
105
        foreach($data as $l=>$val)
-
 
106
        {
-
 
107
            $p=sprintf('%.2f',$val/$this->sum*100).'%';
-
 
108
            $legend=str_replace(array('%l','%v','%p'),array($l,$val,$p),$format);
-
 
109
            $this->legends[]=$legend;
-
 
110
            $this->wLegend=max($this->GetStringWidth($legend),$this->wLegend);
-
 
111
        }
97
    }
112
    }