First create a microflow in your project which returns a list of DocumentGenerationForMendix.Chart (or a specialization of DocumentGenerationForMendix.Chart).
In your create Chart object you can specify certain parameters.
The ChartType attribute is used to generate the type of chart.
The value of Alias attribute of the Chart object will be used later on in your TemplateConfiguration.
In your existing or new TemplateConfiguration add the DS_PieChart under tables:
Under Fields of table PieChart add the Alias of your chart. If your Alias is 'MyPieChart', the Field is 'MyPieChart'. No Xpath value is required:
Save the TemplateConfiguration.
Open Microsoft Word and use the DocumentGeneration add-in to edit your DocumentTemplate. Add the PieChart table element and in between place the «MyPieChart» mergefield:
Save your DocumentTemplate to your application and check the confirmation.
Now comes to part to generate your document using a microflow and AdvancedMerge:
The configuration of the AdvancedMerge java action. Be sure to pass in the ChartList:
The outcome is a document with the chart:
Extend your functionality
Of course other attributes of the DocumentGenerationForMendix.Chart (or a specialization of DocumentGenerationForMendix.Chart) are available through the TemplateConfiguration:
And through the add-in in Word:
By setting width and height attributes in your Chart object you can infuence the dimensions of the image: