replaceChartData

replaceChartData

ADVANCED / PREMIUM BASIC

Replaces the data associated with a given chart (titles, categories, legends, sections and values).

Description
public replaceChartData (string $source, string $target, array $data)

This method allows to replace the chart data in an existing Word document. You may fully customize the chart via the Word interface before inserting the real data with the help of phpdocx.

Parameters

source

Path to the DOCX.

target

Path to the resulting DOCX.

data

The keys are the numbers of the charts to replace and the values are arrays of data as described in the addChart method.

Return values

Void.

Code samples

Example #1