Class: PieGraph (0.1)

Class to create pie graphs.
Credits to: Jeph

Variables

array PieGraph::pie_bgcolor
array PieGraph::pie_color
int PieGraph::pie_deepness
array PieGraph::pie_deepnesscolor
int PieGraph::pie_startoffset
int PieGraph::pie_total

Methods

PieGraph::AddPieBackgroundColor ( $red , $green , $blue )
PieGraph::AddPieColor ( $red , $green , $blue )
PieGraph::AddPieDeepnessColor ( $red , $green , $blue )
PieGraph::DrawGraph ( $file )
PieGraph::SetPieBackgroundColor ( $red , $green , $blue )
PieGraph::SetPieColor ( $red , $green , $blue )
PieGraph::SetPieData ( $data )
PieGraph::SetPieDeepnessColor ( $red , $green , $blue )
PieGraph::SetPieStartOffset ( $offset )
PieGraph::SetPieTotalValue ( $total )

PieGraph::pie_bgcolor ^ Top | ^ Variables | ^ Methods
Pie background color

  Type:
        Array(int, int, int)

  Default:
        Array(69, 129, 194)


PieGraph::pie_color ^ Top | ^ Variables | ^ Methods
Pie color (pie_color, pie_bgcolor and pie_deepnesscolor can be arrays of arrays of red, green and blue colors, when drawing more than one pie chart)

  Type:
        Array(int, int, int)

  Default:
        Array(39, 78, 120)


PieGraph::pie_deepness ^ Top | ^ Variables | ^ Methods
Pie deepness (z axis size)

  Type:
        int

  Default:
        10


PieGraph::pie_deepnesscolor ^ Top | ^ Variables | ^ Methods
Pie deepness color

  Type:
        Array(int, int, int)

  Default:
        Array(9, 48, 90)


PieGraph::pie_startoffset ^ Top | ^ Variables | ^ Methods
Offset is in degrees and the start is at coordenates (x=xmax,y=0) from the center of the pie

  Type:
        int

  Default:
        0


PieGraph::pie_total ^ Top | ^ Variables | ^ Methods
If this value is superior to the total values of all data, pie won't be complete
Try:
SetPieData(array("x" => 20));
SetPieTotalValue(100);

Check the result ;)

  Type:
        int

  Default:
        0


PieGraph::AddPieBackgroundColor() ^ Top | ^ Variables | ^ Methods
Add one more pie background color (RGB)

  Arguments:
        ( int ) $red
        ( int ) $green
        ( int ) $blue


PieGraph::AddPieColor() ^ Top | ^ Variables | ^ Methods
Add one more pie color (RGB)

  Arguments:
        ( int ) $red
        ( int ) $green
        ( int ) $blue


PieGraph::AddPieDeepnessColor() ^ Top | ^ Variables | ^ Methods
Add one more pie deepness color (RGB)

  Arguments:
        ( int ) $red
        ( int ) $green
        ( int ) $blue


PieGraph::DrawGraph() ^ Top | ^ Variables | ^ Methods
Draw graph
If no file given, output will be stdout

  Arguments:
        ( int ) $file

  Default:
       $file = ""


PieGraph::SetPieBackgroundColor() ^ Top | ^ Variables | ^ Methods
Set pie background color (RGB)

  Arguments:
        ( int ) $red
        ( int ) $green
        ( int ) $blue


PieGraph::SetPieColor() ^ Top | ^ Variables | ^ Methods
Set pie color (RGB)

  Arguments:
        ( int ) $red
        ( int ) $green
        ( int ) $blue


PieGraph::SetPieData() ^ Top | ^ Variables | ^ Methods
It's only a link to SetData() and sets pie charts name and value

  Arguments:
        ( array ) $data


PieGraph::SetPieDeepnessColor() ^ Top | ^ Variables | ^ Methods
Set pie deepness color (RGB)

  Arguments:
        ( int ) $red
        ( int ) $green
        ( int ) $blue


PieGraph::SetPieStartOffset() ^ Top | ^ Variables | ^ Methods
Set pie start offset (see pie_startoffset)

  Arguments:
        ( int ) $offset


PieGraph::SetPieTotalValue() ^ Top | ^ Variables | ^ Methods
Set pie total value (see pie_total)

  Arguments:
        ( int ) $total