Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 7048 Rev 7049
Línea 90... Línea 90...
90
 
90
 
91
        $bplot = new Plot\BarPlot($values);
91
        $bplot = new Plot\BarPlot($values);
92
        $bplot->SetFillColor('orange');
92
        $bplot->SetFillColor('orange');
93
        $bplot->SetWidth(0.5);
93
        $bplot->SetWidth(0.5);
94
        $bplot->SetShadow();
94
        $bplot->SetShadow();
95
        $bplot->SetLegend($label);
95
        $bplot->SetLegend($values);
Línea 96... Línea 96...
96
        $bplot->SetCenter(0.3);
96
        $bplot->SetCenter(0.3);
97
 
97
 
Línea 98... Línea 98...
98
        $bplot->value->Show();
98
        $bplot->value->Show();
99
        $graph->Add($bplot);
99
        $graph->Add($bplot);
Línea 100... Línea -...
100
 
-
 
101
        $graph->Stroke($filename);
-
 
102
    }
-
 
103
 
-
 
104
    function SetLegends($values, $format)
-
 
105
    {
-
 
106
        $this->legends=array();
-
 
107
        $this->wLegend=0;
-
 
108
        $this->sum=array_sum($values);
-
 
109
        $this->NbVal=count($values);
-
 
110
        foreach($values as $l=>$val)
-
 
111
        {
-
 
112
            $p=sprintf('%.2f',$val/$this->sum*100).'%';
-
 
113
            $legend=str_replace(array('%l','%v','%p'),array($l,$val,$p),$format);
-
 
114
            $this->legends[]=$legend;
-
 
115
            $this->wLegend=max($this->GetStringWidth($legend),$this->wLegend);
100
 
116
        }
101
        $graph->Stroke($filename);
117
    }
102
    }
118
 
103
 
119
     /**
104
     /**