Hello,
Please note there's no barDirection option in the addChart method, you need to set the type option. Please check the available documentation on addChart.
If you need to create a column chart you need to set type as colChart. For example, using the same styles from your code:
$data = array(
'legend' => array('Legend 1', 'Legend 2', 'Legend 3'),
'data' => array(
array(
'name' => 'data 1',
'values' => array(10, 20, 5),
),
array(
'name' => 'data 2',
'values' => array(20, 60, 3),
),
array(
'name' => 'data 3',
'values' => array(50, 33, 7),
),
),
);
$paramsChart = array(
'data' => $data,
'type' => 'colChart',
'color' => '3',
'perspective' => '10',
'rotX' => '10',
'rotY' => '10',
'chartAlign' => 'center',
'sizeX' => '10',
'sizeY' => '10',
'legendPos' => 'b',
'legendOverlay' => '0',
'border' => '1',
'hgrid' => '3',
'vgrid' => '0',
'groupBar' => 'stacked',
);
$docx->addChart($paramsChart);
Regards.