Hello,
The size of a chart is set by the internal MS WORD wp:extent tag. It doesn't allow to set an 'auto' value, only integer values set as EMUs (English Metric Unit).
phpdocx doesn't include an option to calculate the height depending on the number of bars nor other values.
Regards.