[ Index ]

PHP Cross Reference of MantisBT

title

Body

[close]

/library/ezc/Graph/src/options/ -> font.php (summary)

File containing the ezcGraphFontOption class

Copyright: Copyright (C) 2005-2009 eZ Systems AS. All rights reserved.
License: http://ez.no/licenses/new_bsd New BSD License
Version: 1.5
File Size: 312 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

ezcGraphFontOptions:: (3 methods):
  __construct()
  __set()
  __get()


Class: ezcGraphFontOptions  - X-Ref

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.

<code>
$graph = new ezcGraphPieChart();
$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';

$graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
'Mozilla' => 19113,
'Explorer' => 10917,
'Opera' => 1464,
'Safari' => 652,
'Konqueror' => 474,
) );
</code>

__construct( array $options = array()   X-Ref
Constructor

param: array $options Default option array
return: void

__set( $propertyName, $propertyValue )   X-Ref
Set an option value

param: string $propertyName
param: mixed $propertyValue
return: void

__get( $propertyName )   X-Ref
__get

param: mixed $propertyName
return: mixed



Generated: Thu Jul 28 15:48:31 2011 Cross-referenced by PHPXref 0.7