Software: Apache/2.2.3 (CentOS). PHP/5.1.6 uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44 uid=48(apache) gid=48(apache) groups=48(apache) Safe-mode: OFF (not secure) /var/www/html/manage/jpgraph/docs/ref/ drwxr-xr-x |
Viewing file: PiePlot.html (39.85 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) | CLASS PiePlot
(Defined in: jpgraph_pie.php : 25)Class usage and Overview Creates a new Pie plot from the supplied data. By default the value (if enabled through the $pie->label->show() ) close to each slice will have a label corresponding to the percentage of that slice. Each plot may have an arbitrary title which can be accessed through the “title” property in the PiePlot class. The title will be automatically centred on top of the PiePlot clear of any possible labels. To set the title use the Set() method , i.e. $plot->title->Set(“MyTitle”). To format the slice labels use the SetFormat() method of the value class.
See also related classes: PieGraph and PiePlot3D
Class Methods
Description To emphasise a specific slice it can be exploded, i.e moved out fro the center of the pie plot. This method will allow you to specify what slices and to waht radius you want them exploded.
If you only want to explode a single slice you could also use the ExplodeSlice() method.
See also PiePlot::ExplodeSlice
Example $pieplot->Explode(array(100,0,100));
Description Explode all slices a specified amount. If no radius is specified it will default to 20 pixels. See also PiePlot::ExplodeSlice and PiePlot::Explode
Example
Description Explode a single slice to a specific radius. See also PiePlot::Explode and PiePlot::ExplodeAll
Example // explode radius. $pieplot->ExplodeSlice(2);
Description Construct a new pie plot which later can be added to Piegraph See also PieGraph::Add
Example $piegraph->Add($pieplot);
Description Set the center point for the PiePlot See also PiePlot::SetSize
Example
Description Set the color of the border around each slice. See also PiePlot::SetSliceColors
Example
Description Specify list of targets for the image map for each slice. The target should be a fully qualified URL.
Each slice will aslo have it's own 'alt' tag. Depending on the browser this tag is usually showed when the mouse is hold over a poarticular area on the image map. When formatting the alt strings can be specified as a printf() format string. The value supplied to the string will be the value for each slice. See also PiePlot::GetCSIMareas
Example $alts = array('Year %d', 'Year %d', 'Year %d'); $pieplot->SetCSIMTargets($targets,$alts);
Description Deprecated. Use $pieplot->value->SetFont() instead. Example
Description Deprecated. Use $pieplot->value->SetFontColor() instead. Example
Description Enable guideline and set drawing policy for guide lines and labels Example
Description Adjuste the distance between labels and labels and pie Example
Description Specify the position of the labels for each slice as a fraction of the radius.
Note: The adjustment affect both manually speicfied labels with SetLabels() as well as automtic labels.
See also PiePlot::SetLabels
Example $p1->SetLabelPos(0.6); $graph->Add($p1);
Description Normally pie slice gets assigned a label which displays either the percentage or the absolute value of a slice. These automtically asigned labels are positioned in a ring around the pie.
However, you can also manually assign a label to each slice individually with this method. Each label can contain format specification so for example the label "May %.1f%%" would display the in the pie "May 28.3%" assuming you had choosen to use percentage values (SetLabelType()) The second parameter specifies where to position these labels. The position is specified as a fraction of the radius of the pie plot or as the special strine 'auto'. If you specify this string value JpGraph will automtically determine the best position for the labels inside the pie. This is the default if you don't explicitely specify the position. If you specify a value > 1.0 then the labels will just be move further out. For example if you specify the position as 1.5 then the labels will move out a further 50% of the current pie radius.
Note: The actual alignment of the labels are dependent on the position. If the labels are just outside the pie they will be individually positioned according to the angle. If the labels are positioned inside the pie then the point of gravity within the text will be aligned with the specified position in the pie.
See also PiePlot::SetLabelType
Example $lbl = array("adam\n%.1f%%","bertil\n%.1f%%","kalle\n%.1f%%","peter\n%.1f%%","daniel\n%.1f%%","erik\n%.1f%%"); $p1->SetLabels($lbl);
Description Specify if the value displayed by each slice (if the $pieplot->value->Show()) have been called shold be absolute or in percent.
The following values are allowed arguments:
Example $pieplot->SetLabelType(PIE_VALUE_ABS); // Display each label with postfix 'kr', e.g. each label will // look like (for example) 23.5 kr $pieplot->value->SetFormat('%d kr'); $pieplot->value->Show();
Description Specify an array of text strings that should be used as legends for the slices.
Each text string can be formatted as a printf() format string since when printed they will be passed the value for that slice.
Tip: If you have many evry small slices then the labels close to the pie may be overwriting each other. In this case it is probably better to hide the labels by the slices and instead just show the values ion the legends. Example $pieplot->SetLegends($legends);
Description Add a drop shadow to the pie slices.
This is often more affective if one or more slices are exploded. Example $p1->ExplodeAll(10); // Add drop shadow $p1->SetShadow();
Description If the value specified is between 0 and 1 then it is interpreted as a a fraction of either height or width, whatever is smallest, of the graph.
If the value is >1 then it is interpretated as an absolute size in pixels.
See also PiePlot::SetCenter
Example
Description Normally the colors of the slices are set according to what color-theme you are using. You can however, override this by supplying an array of colors to be used for the slices.
If you supply fewer colors than pie-slices than the colors will be re-used from the beginning of the array.
See also PiePlot::SetTheme
Example
Description Normally the first slice is drawn at 0 degrees, i.e. 3'a clock. With this method you can adjust that to an arbitrary angle. Positive angle will rotate the slice clockwise and a negative angle will move the slice counter-clockwise.
The angle should be specified in degrees.
Example
Description Specify what color theme should be used for this pie. As of version 1.6.4 the following themes are available:
Example
Description See SetLabelType() See also PiePlot::SetLabelType
Example
Description Show the lines between each slice and the border around the pie. Example $pieplot->ShowBorder();
|
:: Command execute :: | |
:: Shadow's tricks :D :: | |
Useful Commands
|
:: Preddy's tricks :D :: | |
Php Safe-Mode Bypass (Read Files)
|
--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0157 ]-- |