Path

ez components / documentation / api reference / 2008.1 / graph


Graph: ezcGraphFontOptions

[ Tutorial ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcGraphFontOptions

Class containing the options for font configuration. [source]
Global font settings will only affect the font settings of chart elements until they were modified once. Form then on the font configuration of one chart element has been copied and can only be configured independently.
 1.    $graph new ezcGraphPieChart();
 2.    $graph->palette new ezcGraphPaletteEzBlue();
 3.    $graph->title 'Access statistics';
 4.  
 5.    $graph->options->font->name 'serif';
 6.    $graph->options->font->maxFontSize 12;
 7.  
 8.    $graph->title->background '#EEEEEC';
 9.    $graph->title->font->name 'sans-serif';
10.  
11.    $graph->options->font->maxFontSize 8;
12.  
13.    $graph->data['Access statistics'new ezcGraphArrayDataSetarray(
14.        'Mozilla' => 19113,
15.        'Explorer' => 10917,
16.        'Opera' => 1464,
17.        'Safari' => 652,
18.        'Konqueror' => 474,
19.    ) );
20.  
21.    $graph->render400150'tutorial_chart_title.svg' );

Parents

ezcBaseOptions
   |
   --ezcGraphFontOptions

Properties

ezcGraphColor read/write  $background
Background color
ezcGraphColor read/write  $border
Border color
int read/write  $borderWidth
Border width
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 this element.
bool read/write  $minimizeBorder
Fit the border exactly around the text, or use the complete possible space.
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
ezcGraphColor read/write  $textShadowColor
Color of text shadow. If false the inverse color of the text color will be used.
int read/write  $textShadowOffset
Offset for text shadow
int read/write  $type
Type of used font. May be one of the following:
  • TTF_FONT Native TTF fonts
  • PS_FONT PostScript Type1 fonts
  • FT2_FONT FreeType 2 fonts

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  

Throws

ClassDescription
ezcBasePropertyNotFoundException If a property is not defined in this class

Last updated: Wed, 18 Jun 2008