Class Image_Graph_Grid

Description

Class for storing grid-element settings

The "grid" is used to make values (positions) inside the graph easier to read by using horizontal/vertical lines and/or filled areas as the graph background. It's possible to draw the grid at the major or minor ticks. Using two or more alternating colors/fills for the grid is an "impressive" and useful feature for the generated graphs. All fill-elements (derived from Image_Graph_Fill_Common) can be used. In most cases you will want to choose a solid fills with a certain color. However it might be useful to e.g. use some pattern fills (stripes, dots, ...) which will make reading possible even if you print it out in black/white. Since the normal fill-elements are used, you can also use alpha-values for the colors. This way it's still possible to see the graph background through the fill. Note that you shouldn't use too many different colors/fills since this can have a negative and disturbing effect on the readability of the graph.

Located in /Graph/Elements.php (line 1020)

Image_Graph_Base
   |
   --Image_Graph_Grid
Method Summary
 Image_Graph_Grid &Image_Graph_Grid (mixed &$axis)
 array &setFill (array $fillelements,...)
 void setFillType (mixed $type)
 void setLineType (mixed $type)
Methods
Constructor Image_Graph_Grid (line 1065)

Constructor

The default line color is set to darkgray. The default fills will be two alternating solid fills in lightgrey with an alpha-value of 80% and lightblue with an alpha-value of 40%. Note that these color-defaults might be subject to change in one of the next versions!

  • access: public
Image_Graph_Grid &Image_Graph_Grid (mixed &$axis)
setFill (line 1126)

Set fill elements to be used

This function will create instances of fill-objects with the options you provide. You can set an arbitrary number of fillelements which will be used in an alternating order. For a list of possible options in the options array please refer to the fill element class you wish to use (e.g. Image_Graph_Fill_Solid). A reference to the fill objects will also be returned by this function. Using that reference you can access methods provided by that fill object, e.g. to customize it.

  • return: array of fill-objects
  • access: public
array &setFill (array $fillelements,...)
  • array $fillelements,...: array with fill element type (e.g. "solid") and an option array
setFillType (line 1105)

Set type of grid-fill

Choose whether want to have horizontal/vertical fills drawn at the major ticks, minor ticks or if you would like no lines at all.

  • access: public
void setFillType (mixed $type)
  • mixed $type: use constants IMAGE_GRAPH_GRID_NONE, IMAGE_GRAPH_GRID_MAJOR, IMAGE_GRAPH_GRID_MINOR
setLineType (line 1091)

Set type of grid-lines

Choose whether want to have lines drawn at the major ticks, minor ticks or if you would like no lines at all.

  • access: public
void setLineType (mixed $type)
  • mixed $type: use constants IMAGE_GRAPH_GRID_NONE, IMAGE_GRAPH_GRID_MAJOR, IMAGE_GRAPH_GRID_MINOR

Inherited Methods

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:04 +0100 by phpDocumentor 1.3.0RC2