Hello,
The option groupBar allows to group the data in bar and columns chart. Please check this option in the API documentation:
https://www.phpdocx.com/api-documentation/word-content/add-chart-Word-document-with-PHP
and the included example addChart/sample_3.php
About customize major and minor units, it's supported in bar bar and line charts through majorUnit and minorUnit parameters (and also scalingMax and scalingMin).
To customize charts using parameters or styles not supported in the API method
https://www.phpdocx.com/api-documentation/word-content/add-chart-Word-document-with-PHP
we recommend to use the replaceChartData method available in Advanced and Premium licenses:
https://www.phpdocx.com/api-documentation/docxutilities/replace-chart-data-Word-document
with the MultiMerge class:
https://www.phpdocx.com/api-documentation/docxutilities/replace-chart-data-Word-document
Regards.