Hello,
The smooth option is only available for scatter charts, you can read about this option on:
http://www.phpdocx.com/api-documentation/word-content/add-chart-Word-document-with-PHP
Anyway, you can add support for line charts easily:
1. Edit the file CreateLineChart.inc and around line 169 add these lines:
if (!empty($this->_smooth) && $this->_smooth && $this->_symbol != 'dot') {
$this->generateSMOOTH();
}
Instead of this code:
foreach ($this->values as $legend => $value) {
if ($legend == 'legend') {
continue;
}
$this->generatePT($num);
$this->generateV($value[$i]);
$num++;
}
$this->cleanTemplate3();
The class must use this code:
foreach ($this->values as $legend => $value) {
if ($legend == 'legend') {
continue;
}
$this->generatePT($num);
$this->generateV($value[$i]);
$num++;
}
if (!empty($this->_smooth) && $this->_smooth && $this->_symbol != 'dot') {
$this->generateSMOOTH();
}
$this->cleanTemplate3();
2. Use the new option (smooth option) when adding the chart:
$paramsChart = array(
'data' => $data,
'type' => 'lineChart',
'color' => '5',
'chartAlign' => 'center',
'showTable' => 0,
'sizeX' => '12',
'sizeY' => '10',
'legendPos' => 'b',
'legendOverlay' => '0',
'haxLabel' => 'X Axis',
'vaxLabel' => 'Y Axis',
'haxLabelDisplay' => 'horizontal',
'vaxLabelDisplay' => 'vertical',
'hgrid' => '3',
'vgrid' => '1',
'smooth' => true,
);
$docx->addChart($paramsChart);
Regards.