Proyectos de Subversion LeadersLinked - Backend

Rev

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

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