Forum


Replies: 7   Views: 1794
Importchartstyle from example doesn't work?
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by admin  · 23-01-2020 - 21:18

Hello,

About 'When I launch the sample file if I let or remove the customStyle property the output is exactly the same.' ; this is because it needs to be used with the theme option available in the addChart method, otherwise a default color scheme is used. The colors XML file defines schemes and variations, but not the colors of columns, lines, titles and other chart contents that are applied in the chart XML file.

We recommend you to use the customStyle option to add the imported colors and style XML files and then use the theme option to apply the chosen colors to the chart contents. If you don't know the colors to be applied to the new chart with the theme option, they can be extracted from the external DOCX using DOCXPath and a custom XPath query so you can get them dynamically to be used with the theme option (as long as they use RGB values that are the supported ones).

Regards.