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: Axis.html (52.9 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) | CLASS Axis
(Defined in: jpgraph.php : 3669)Class usage and Overview The Axis class represents either the X or Y axis in a graph. This class is noramlly accessed through the instance variables graph->xaxis, $graph->yaxis, or $graph->y2axis
Public properties:
See also related classes: LinearScale, LogScale and Text
Class Methods
Description This method is used to hide the axis. Example $graph->yaxis->Hide(); // Hide y-axis
Description Hide the first and last label on the scale. Usefull whe you are using Axis Type of AXSTYLE_BOXIN or AXSTYLE_BOXOUT to avoid the labels to owerwrite a box around the plot. See also Axis::HideFirstTickLabel and Axis::HideLastTickLabel
Example $graph->SetAxisStyle(AXSTYLE_BOXOUT); $graph->SetBox(); $graph->xaxis->HideFirstLastLabel(); $graph->yaxis->HideFirstLastLabel(); //...
Description Calling this method will hide the first label on the axis. This is usefull when the y axis have negative values and a value on the x-axis would be partially obscured by the values on the y-axis.
This gets automatically called in this case.
This is probably of less use for the end user of the library. Example
Description Hide all labels on the axis but keep tick marks and axis line. See also Axis::Hide, Axis::HideLine and Axis::HideTicks
Example
Description The mirror of HideFirstTickLabel() See also Axis::HideFirstTickLabel and Axis::HideFirstLastLabel
Example
Description Hide the line of the axis. This only hides the axis-line but will keep the tick marks and labels. If you want to hide the tick marks you should call HideTicks(). To hide the axis completely, line, ticks and labels use Hide(). See also Axis::HideTicks and Axis::Hide
Example $graph->yaxis->HideLine(); $graph->yaxis->HideTicks();
Description Hide major or minor tick makrs on the axis. Example $graph->yaxis->HideTicks(true,false);
Description Hide the zero label. Usefull if the axis cross at zero and the label would owerwrite the other axis scale.
See also Axis::HideFirstTickLabel
Example
Description Specifies the color of the axis line as well as the labels on the axis. If the label color is not specified it will be the same as the axis color. Example $graph->yaxis->SetColor('blue','black');
Description Specify font for labels on axis. Please note that if you need labels to be rotated an angle other than 0 or 90 you must use TTF fonts and not the builtin fonts (i.e. FF_FONT1, FF_FONT2, FF_FONT3)
See also Axis::SetLabelPos and Axis::SetLabelAngle
Example
Description Specifies the horizontal and vertical alignment for the labels on the axis. The alignment specifies how the labels is adjusted relative to the tickmark.
Note that this is handled automatically but on some occasion there is a genuine need to override the automtic values. For example if the graph is rotated it might be necessary to adjust the alignment to get a visual acceptable label alignment.
Possible horizontal alignment are: 'left', 'center', 'right'
See horizbarex1.php, horizbarex2.php for real life examples.
Example
Description Specify the rotation angle for the labels on the axis.
Note: See also Axis::SetFont
Example $graph->xaxis->SetLabelAngle(45); // 45 degrees angle
Description Specify a printf() format string for the axis labels. if you need more advanced control of the formatting you can install a label format callbacl routine with Axis::SetLabelFormatCallback() See also Axis::SetLabelFormatCallback
Example
Description This can be used when more advance formatting of the axis labels are required. For example this could be used to format numbers with space or commas betwen the '1000.
The callback routine is called with one argument, the current number to be displayed and should return the number to be displayed. For simple formatting use SetlabelFormat() to specify a printf() style formatting string. The callback function specified should be a global function and not a class method.
For a full example see barscalecallbackex1.php
See also Axis::SetLabelFormat
Example // Format '1000 english style return number_format($aLabel) // Format '1000 french style // return number_format($aLabel, 2, ',', ' '); } $graph->yaxis->SetLabelFormatCallback('yLabelFormat');
Description Synonym for SetLabelFormat().
Will be deprecated in a future release. Use SetLabelFormat() instead. See also Axis::SetLabelFormat
Example
Description Specify margin between labels and tick marks. Example
Description Specify which side the labels should go on. For horizontal axis valid arguments are SIDE_UP, SIDE_DOWN and for vertical axis it is SIDE_LEFT, SIDE_RIGHT.
See topaxisex1.php for an example when this is usefull.
Note: Synonym to SetLabelSide() See also Axis::SetTickSide and Axis::SetLabelSide
Example
Description Specify which side the labels should go on. For horizontal axis valid arguments are SIDE_UP, SIDE_DOWN and for vertical axis it is SIDE_LEFT, SIDE_RIGHT.
See topaxisex1.php for an example when this is usefull.
Note: Synonym to SetLabelPos()
See also Axis::SetLabelPos
Example
Description Specifies the position of the axis on the other axis. This can be specified as either a numeric value (which gives the absolute position on the other scale). OIt can also be specified as a string value as either 'min' or 'max' which sould position the axis either at the beginning or the end of the opposite axis scale.
See topaxisex1.php for a real life example. Example
Description No description available.
Description Specify that every $step tick mark should have a label
See also Axis::SetTickLabels
Example $graph->xaxis->SetTextLabelInterval(2);
Description Specify that every $step of the ticks should be displayed starting at $start.
See also Axis::SetTextLabelInterval and Axis::SetTextTicks
Example
Description DEPRECATED FUNCTION: USE SetTextTickInterval() INSTEAD See also Axis::SetTextTickInterval
Example
Description Specify which side of the axis the tick marks should be on. Valid positions for a horizontal axis are SIDE_TOP, SIDE_BOTTOM and for verticla axis SIDE_LEFT and SIDE_RIGHT.
This is a shortform for accessing the tick method directly via the scale in the axis.
See topaxisex1.php for real life example. See also Axis::SetLabelSide and Ticks::SetDirection
Example
Description Specify the margin (in pixels) between the axis and the label Example
Description Specify the labels for a text axis. This is used to manually set labels for the x-axis when a text scale has been specified.
If fewer labels than data points are specified then the missing labels will be set to the data points ordinal numbers.
The color argment is an array that can be used to specify individual colors for each of the labels. If fewer colors than labels are specified then the colors will wrap around.
See also Axis::SetTextLabelInterval and Axis::SetTickLabelMargin
Example // gloablly available $gDateLocale $a = $gDateLocale->GetShortMonth(); $graph->xaxis->SetTickLabels($a); $graph->xaxis->SetFont(FF_FONT2);
Description Specify which side of the axis the tick marks should be on. Valid positions for a horizontal axis are SIDE_TOP, SIDE_BOTTOM and for verticla axis SIDE_LEFT and SIDE_RIGHT.
This is a shortform for accessing the tick method directly via the scale in the axis.
See topaxisex1.php for real life example.
See also Axis::SetTickDirection
Example
Description Set the title for the axis. You can specify the alignment as being either "high", "middle" and "low". To adjust the titles font and color you have to access the label instance variable. For example, $graph->xaxis->title->SetFont(FF_FONT2,FS_BOLD) Example
Description Specify the distance between the axis and the title. See also Axis::SetTitle
Example
Description For horizontal axis the side can be either SIDE_TOP or SIDE_BOTTOM and for vertical axis the position can be either SIDE_LEF or SIDE_RIGHT.
By default x-axis have the title below the axis and y-axis have it on the left and y2 on the right.
See topaxisex1.php for real life example See also Axis::SetLabelSide and Axis::SetTickSide
Example
Description Specify the thickness of the axis in pixels Example
|
:: 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.0151 ]-- |