Register Lost your password?

public function fAddGraphic(array arrParamsGraphic)

Parameters

$arrParamsGraphic

  • ‘data’ (array)
  • ‘type’ (chart type): pieChart, pie3DChart, barChart, colChart, bar3DChart, col3DChart
  • ‘title’ (chart title) : ‘titulo’,
  • ‘cornerX’ (charts 3d, angle with respect to the axis X) : 20, 30, …
  • ‘cornerY’ (charts 3d, angle with respect to the axis Y) : 20, 30, …
  • ‘cornerP’ (charts 3d, angle with respect to the perspective) : 20, 30, …
  • ‘color’ (chart color) : 1,2,3,…
  • ‘textWrap’ (text wrap): 0 (inline), 1 (square), 2 (front), 3 (back), 4 (up and bottom), 5 (clear)
  • ‘groupBar’ (grouping of results): clustered, stacked
  • ’sizeX’ (size width chart, in centimeters)=> 10
  • ’sizeY’ (size height chart, in centimeters)=> 10
  • ‘jc’ (alignment) : right, center
  • ’showPercent’ (show chart percentage): 0, 1
  • ‘font’ (A specific size and style of font type within a type family. Example ‘Times New Roman’, ‘Arial’,…)

Examples

Example 1 Version Pro


require_once('../classes/cCreateDocx.inc');
$objDocx = new cCreateDocx();
  $arrDatos = array(
  	'legend1' => array(10,11,12),
  	'legend2' => array(0,1,2),
  	'legend3' => array(40,41,42)
  );
  $arrArgs = array('data' => $arrDatos,
    'type' => 'pie3DChart',
    'title' => 'titulo',
  	'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 30,
  	'color' => 2,
  	'textWrap' => 0,
  	'sizeX' => 10,'sizeY' => 10, // in cm.
  	'jc' => 'right',
  	'showPercent' => 1
  );
  $objDocx->fAddGraphic($arrArgs);

  $objDocx->fCreateDocx('ejemplo_graphic');


Example 2 Version Pro


require_once('../classes/cCreateDocx.inc');
$objDocx = new cCreateDocx();
  $arrDatos = array(
  	'legend1' => array(10,11,12),
  	'legend2' => array(0,1,2),
  	'legend3' => array(40,41,42)
  );
  $arrArgs = array('data' => $arrDatos,
    'type' => 'bar3DChart',
    'title' => 'titulo',
	'groupBar' => 'stacked',
  	'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 30,
  	'sizeX' => 10,'sizeY' => 10, // in cm.
  	'jc' => 'right'
  );
  $objDocx->fAddGraphic($arrArgs);

  $objDocx->fCreateDocx('ejemplo_graphic');

Your comments