Hello,
You need to use the same data structure than the addChart method for each chart type. For example, for the piechart generated by the included sample Core/addChart/sample_1.php, you can replace the data using this code:
$data = array();
$data[0] = array(
'title' => 'New title',
'values' => array(
array(30),
array(30),
array(40),
),
);
$data[1] = array(
'title' => 'Other title',
'values' => array(
array(50),
array(40),
array(30),
),
);
$docx->replaceChartData($source, $target, $data);
Regards.