PieChart Class Reference
List of all members.Public Member Functions | |
| PieChart ($width=600, $height=250) | |
| render ($fileName=null) | |
Protected Member Functions | |
| computeLayout () | |
| sortPie ($v1, $v2) | |
| computePercent () | |
| createImage () | |
| printCaption () | |
| drawDisc ($cy, $colorArray, $mode) | |
| drawPercent () | |
| printPie () | |
Protected Attributes | |
| $pieCenterX | |
| $pieCenterY | |
Detailed Description
Pie chart.
Member Function Documentation
| PieChart::PieChart | ( | $ | width = 600, |
|
| $ | height = 250 | |||
| ) |
Constructor of a pie chart.
- Parameters:
-
integer width of the image integer height of the image
| PieChart::computeLayout | ( | ) | [protected] |
Computes the layout.
| PieChart::sortPie | ( | $ | v1, | |
| $ | v2 | |||
| ) | [protected] |
Compare two sampling point values, order from biggest to lowest value.
- Parameters:
-
double first value double second value
- Returns:
- integer result of the comparison
| PieChart::computePercent | ( | ) | [protected] |
Compute pie values in percentage and sort them.
| PieChart::createImage | ( | ) | [protected] |
Creates the pie chart image.
| PieChart::printCaption | ( | ) | [protected] |
Renders the caption.
| PieChart::drawDisc | ( | $ | cy, | |
| $ | colorArray, | |||
| $ | mode | |||
| ) | [protected] |
Draw a 2D disc.
- Parameters:
-
integer center coordinate (y) array colors for each portion bitfield drawing mode
| PieChart::drawPercent | ( | ) | [protected] |
Print the percentage text.
| PieChart::printPie | ( | ) | [protected] |
Print the pie chart.
| PieChart::render | ( | $ | fileName = null |
) |
Render the chart image.
- Parameters:
-
string name of the file to render the image to (optional)
The documentation for this class was generated from the following file:
- PieChart.php