PHPWord
PHPWord copied to clipboard
Fatal error: Uncaught Error: Call to undefined method PhpOffice\PhpWord\TemplateProcessor::setChartValue()
Describe the Bug
The method setChartValue() is undefined
Steps to Reproduce
Using this from documentation : source : [https://phpword.readthedocs.io/en/latest/templates-processing.html]
$templateProcessor- = new \PhpOffice\PhpWord\TemplateProcessor("mytemplate.docx');
$categories = array('A', 'B', 'C', 'D', 'E'); $series1 = array(1, 3, 2, 5, 4); $chart = new Chart('doughnut', $categories, $series1); $templateProcessor->setChartValue('myChart', $chart); $templateProcessor->save();
Expected Behavior
I expect a graph to appear in replacement of ${myChart} into the template
Current Behavior
Fatal error: Uncaught Error: Call to undefined method PhpOffice\PhpWord\TemplateProcessor::setChartValue()
Context
Please fill in your environment information:
- PHP Version:7.2.7
- PHPWord Version:0.18.3