Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcGraphPieChartOptions

Graph::ezcGraphPieChartOptions

Class ezcGraphPieChartOptions

Class containing the basic options for pie charts.

For additional options configuring the apperance of the chart you may also want to check the option classes to configure the respective renderer you are using:

  • ezcGraphRendererOptions
  • ezcGraphRenderer2dOptions
  • ezcGraphRenderer3dOptions
  1.    $graph = new ezcGraphPieChart();
  2.    $graph->palette = new ezcGraphPaletteEzRed();
  3.    $graph->title = 'Access statistics';
  4.    $graph->legend = false;
  5.  
  6.    $graph->options->label = '%1$s (%3$.1f)';
  7.    $graph->options->percentThreshold = .05;
  8.  
  9.    $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
  10.        'Mozilla' => 19113,
  11.        'Explorer' => 10917,
  12.        'Opera' => 1464,
  13.        'Safari' => 652,
  14.        'Konqueror' => 474,
  15.    ) );
  16.    $graph->data['Access statistics']->highlight['Explorer'] = true;
  17.  
  18.    $graph->render( 400, 150, 'tutorial_pie_chart_options.svg' );

Source for this file: /Graph/src/options/pie_chart.php

ezcBaseOptions
   |
   --ezcGraphChartOptions
      |
      --ezcGraphPieChartOptions
Version:   //autogentag//

Properties

float read/write $absoluteThreshold
Values with a lower absolute value are aggregated.
string read/write $label
String used to label pies %1$s Name of pie %2$d Value of pie %3$.1f Percentage
callback read/write $labelCallback
Callback function to format pie chart labels. Function will receive 3 parameters: string function( label, value, percent )
float read/write $percentThreshold
Values with a lower percentage value are aggregated.
float read/write $sum
Fixed sum of values. This should be used for incomplete pie charts.
string read/write $summarizeCaption
Caption for values summarized because they are lower then the configured tresh hold.

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.
Documentation generated by phpDocumentor 1.4.3