Path

ez components / documentation / api reference / latest / graph


eZ Components latest

Graph: ezcGraphRendererOptions

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

Class: ezcGraphRendererOptions

Class containing the basic options for renderers. [source]
Renderer options are used to define the general appearance of charts beside the palettes. The renderer transforms chart primitives (like the legend, or one pie slice) into image primitives, which are then rendered by the drivers. The way this transformation is done, and which effects are also rendered is specified by the values in this option class.
The example below shows some basic bar rendering options, which are available in all renderers. You mya want to check the tutorial sections about the renderer, which show example output for more renderer options.
 1.    $wikidata include 'tutorial_wikipedia_data.php';
 2.  
 3.    $graph new ezcGraphBarChart();
 4.    $graph->title 'Wikipedia articles';
 5.  
 6.    // Add data
 7.    foreach $wikidata as $language => $data )
 8.    {
 9.        $graph->data[$languagenew ezcGraphArrayDataSet$data );
10.    }
11.  
12.    // $graph->renderer = new ezcGraphRenderer2d();
13.  
14.    $graph->renderer->options->barMargin .2;
15.    $graph->renderer->options->barPadding .2;
16.  
17.    $graph->renderer->options->dataBorder 0;
18.  
19.    $graph->render400150'tutorial_bar_chart_options.svg' );
For additional options, which are special to some chart type you may also want to check the option classes for the repective chart type you are using and the elements of the chart. The chart type dependant option classes are:
  • ezcGraphLineChartOptions
  • ezcGraphPieChartOptions
  • ezcGraphRadarChartOptions
There may be additional options dependant on the renderer you are using. You may want to check the extensions of this class:
  • ezcGraphRenderer2dOptions
  • ezcGraphRenderer3dOptions

Parents

ezcBaseOptions
   |
   --ezcGraphChartOptions
      |
      --ezcGraphRendererOptions

Descendents

Child Class Description
ezcGraphRenderer2dOptions Class containing the extended options available in 2d renderer.
ezcGraphRenderer3dOptions Class containing the extended options for the three dimensional renderer.

Properties

bool read/write  $axisEndStyle
Style of axis end markers. Defauls to arrow heads, but you may also use all symbol constants defined ein the ezcGraph class, especially ezcGraph::NO_SYMBOL.
float read/write  $barMargin
Percentual distance between bar blocks.
float read/write  $barPadding
Percentual distance between bars.
float read/write  $dataBorder
Factor to darken border of data elements, like lines, bars and pie segments.
float read/write  $legendSymbolGleam
Opacity of gleam in legend symbols
float read/write  $legendSymbolGleamColor
Color of gleam in legend symbols
float read/write  $legendSymbolGleamSize
Size of gleam in legend symbols
float read/write  $maxLabelHeight
Percent of chart height used as maximum height for pie chart labels.
float read/write  $moveOut
Percent to move pie chart elements out of the middle on highlight.
float read/write  $pieChartGleam
Enhance pie chart with gleam on top.
float read/write  $pieChartGleamBorder
Do not draw gleam on an outer border of this size.
float read/write  $pieChartGleamColor
Color used for gleam on pie charts.
float read/write  $pieChartOffset
Offset for starting with first pie chart segment in degrees.
float read/write  $pieChartSymbolColor
Color of pie chart symbols
float read/write  $pieHorizontalSize
Percent of horizontal space used for maximum pie chart size.
float read/write  $pieVerticalSize
Percent of vertical space used for maximum pie chart size.
bool read/write  $shortAxis
Defines wheather to render the axis extending the chart boundings or stop them at the chart boundings. Deafults to false.
bool read/write  $showSymbol
Indicates wheather to show the line between pie elements and labels.
float read/write  $symbolSize
Size of symbols used to connect a label with a pie.
bool read/write  $syncAxisFonts
Synchronize fonts of axis. With the defaut true value, the only the fonts of the yAxis will be used.
int read/write  $titleAlignement
Alignement of box titles.
int read/write  $titlePosition
Position of title in a box.

Inherited Member Variables

From ezcBaseOptions:
protected  ezcBaseOptions::$properties

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.
Last updated: Mon, 21 Dec 2009