Hello,
I have the exact same problem.
When I create a doc file from scratch, my graph looks alright. But when I create a doc from a template, my graph looks different (it has curves, the colors are different, the axis too) . See the code below:
//...
$paramsChart = array(
'data' => $data,
'type' => 'lineChart',
'color' => '2',
'chartAlign' => 'center',
'showTable' => 1,
'sizeX' => '15',
'sizeY' => '10',
'legendPos' => 'b',
'legendOverlay' => '0',
'haxLabel' => 'Time',
'vaxLabel' => 'Number',
'haxLabelDisplay' => 'horizontal',
'vaxLabelDisplay' => 'vertical',
'hgrid' => '1',
'vgrid' => '0',
'symbol' => 'circle',
'smooth' => false,
);
// first document
$docx1 = new CreateDocx();
$docx1->addChart($paramsChart);
// second document
$docx2 = new CreateDocxFromTemplate('path_to_file.docx');
$docx2->addChart($paramsChart);
I don't know what I'm doing wrong, please help.
I use PHPdocX 7.5