Class for storing axis settings
All axes used in the Graph (1 x-axis and 2 y-axes) have common functionality. This class is used for storage of various settings like the axis-type ("linear" or "text"), the axis-title, "ticks" (minor and major lines) and their layout on the axis, the axis-bounds (min/max-values), a representation for numerical values (string in sprintf-format) and colors. The functionality for actually drawing an axis is (currently) implemented in the main class Image_Graph. All specialized features like mapping of values to relative/absolute pixel-values are done in the derived classes for Axis_X and Axis_Y.
Located in /Graph/Elements.php (line 268)
Image_Graph_Base | --Image_Graph_Axis
Class | Description |
---|---|
Image_Graph_Axis_X | Class for storing x-axis settings |
Image_Graph_Axis_Y | Class for storing x-axis settings |
Title for axis
Values on the axis
Constructor
The colors for title and values on the axis are not set by default. If you don't explicitly set them, the color of the axis will be inherited.
Set bounds
You can set the minimum and maximum value on the axis. If you don't want/can't give a min/max value, set it to null for automatic detection. Autodetection of bounds values is enabled by default.
Set color for numbers on the axis
!! This function is deprecated. Use values->setColor() !!
Set numberformat for axis
!! This function is deprecated. Use values->setNumberformat() !!
Set maximum steps for automatic creation of ticksMajor/ticksMinor
Use this function to set the maximum number of steps for the major/minor ticks that are used if automatic generation of ticks is turned on. If you set your own values for the ticks on the axis this settings will not have an effect. Note that by default the ticks are generated automatically.
Set size for (major) ticks on axis
The size you set is for the "major ticks". All minor ticks will be half that size.
Set major ticks on axis
The list of values on the axis indicates where you would like "major ticks" to be drawn. Null results in automatic detection of ticks based upon the auto-steps-setting. Note that drawing of numbers on the axis will be done at all major ticks. If you don't want numbers to be drawn, refer to the minor ticks. Another alternative is to set the numberformat to an empty string.
Set minor ticks on axis
The list of values on the axis indicates where you would like "major ticks" to be drawn. Null results in automatic detection of ticks based upon the auto-steps-setting. Note that drawing of numbers on the axis will be done only at at the major ticks.
Set tick-style for ticks on a axis
You can have ticks (lines) that are located on the inside of the graph, on the outside or on both sides. For the x-axis "inside" means above the axis. For the y0-axis "inside" means on the right side of the axis, since in most cases it's located on the left side of the graph. For the y1-axis "inside" means on the left side of the axis, since in most cases it's located on the right side of the graph.
Inherited From Image_Graph_Base
Image_Graph_Base::setColor()
Image_Graph_Base::setFontOptions()
Image_Graph_Base::setSpacer()
Image_Graph_Base::setText()
Documentation generated on Sat, 21 Feb 2004 23:28:02 +0100 by phpDocumentor 1.3.0RC2