Apache Zeta Components Manual :: Docs For Class ezcGraphFontOptions
Graph::ezcGraphFontOptions
Class ezcGraphFontOptions
Class containing the options for font configuration.
We try to fulfill two goals regarding font configuration. First, there should be a single point to configure the fonts used for the text areas in the chart. On the other hand, it should be possible to configure the fonts independently for each chart element.
The solution is that you can modify the global font configuration by accessing $graph->options->font. This takes effect on all chart elements unless you intentionally access the font configuration of an individual chart element. The following example shows, how this works.
- $graph->title = 'Access statistics';
- // Set the maximum font size to 8 for all chart elements
- $graph->options->font->maxFontSize = 8;
- // Set the font size for the title independently to 14
- $graph->title->font->maxFontSize = 14;
- // The following only affects all elements except the // title element,
- // which now has its own font configuration.
- //
- // Keep in mind that the specified font is driver specific. A pure name
- // works for the SVG driver, used here. The GD driver for example
- // requires a path to a TTF file.
- $graph->options->font->name = 'serif';
- 'Mozilla' => 19113,
- 'Explorer' => 10917,
- 'Opera' => 1464,
- 'Safari' => 652,
- 'Konqueror' => 474,
- ) );
Source for this file: /Graph/src/options/font.php
ezcBaseOptions | --ezcGraphFontOptions
Version: | //autogentag// |
Properties
ezcGraphColor | read/write |
$background
Background color. The actual area filled with the background color is influenced by the settings $padding and $minimizeBorder. |
ezcGraphColor | read/write |
$border
Border color for the text. The distance between the text and border is defined by the properties $padding and $minimizeBorder. |
int | read/write |
$borderWidth
With of the border. To enable the border you need to set the $border property to some color. |
ezcGraphColor | read/write |
$color
Font color. |
float | read/write |
$maxFontSize
Maximum font size for displayed texts. |
float | read/write |
$minFontSize
Minimum font size for displayed texts. |
float | read/write |
$minimalUsedFont
The minimal used font size for the current element group. This property is set by the driver to maintain this information and should not be used to configure the apperance of the chart. See $minFontSize instead. |
bool | read/write |
$minimizeBorder
Fit the border exactly around the text, or use the complete possible space. This setting is only relevant, when a border color has been set for the font. |
string | read/write |
$name
Name of font. |
int | read/write |
$padding
Padding between text and border. |
string | read/write |
$path
Path to font file. |
bool | read/write |
$textShadow
Draw shadow for texts. The color of the shadow is defined in the property $textShadowColor. |
ezcGraphColor | read/write |
$textShadowColor
Color of text shadow. If left at the default value "false"" the inverse color of the text color will be used. |
int | read/write |
$textShadowOffset
Offset for text shadow. This defines the distance the shadow is moved to the bottom left relative from the text position. |
int | read/write |
$type
Type of used font. May be one of the following:
|
Member Variables
protected bool |
$pathChecked
= false
Indicates if path already has been checked for correct font |
Inherited Member Variables
From ezcBaseOptions | |
---|---|
protected |
ezcBaseOptions::$properties
|
Method Summary
public void |
__set(
$propertyName
, $propertyValue
)
Set an option value |
Inherited Methods
From ezcBaseOptions | |
---|---|
public ezcBaseOptions |
ezcBaseOptions::__construct()
Construct a new options object. |
public void |
ezcBaseOptions::merge()
Merge an array into the actual options object. |
public bool |
ezcBaseOptions::offsetExists()
Returns if an option exists. |
public mixed |
ezcBaseOptions::offsetGet()
Returns an option value. |
public void |
ezcBaseOptions::offsetSet()
Set an option. |
public void |
ezcBaseOptions::offsetUnset()
Unset an option. |
Methods
__set
void
__set(
string
$propertyName
, mixed
$propertyValue
)
Set an option value
Parameters:
Name | Type | Description |
---|---|---|
$propertyName |
string | |
$propertyValue |
mixed |
Exceptions:
Type | Description |
---|---|
ezcBasePropertyNotFoundException |
If a property is not defined in this class |
Documentation generated by phpDocumentor 1.4.3