Replies: 3   Views: 1261
How to set font size on chart
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 andrzej.morun  · 06-03-2017 - 20:38

How to set fontSize of chart (axis, value)?

'fontSize' parameter is correct?

For example I have param chart defiinition as above

    $paramsChart = array (
            'data' => $data,
            'type' => 'colChart',
            'title' => $title,
            'color' => 26,
            'sizeX' => $x,
            'sizeY' => $y,
            'jc' => 'center',
            'groupBar' => 'clustered',
            'font' => 'Calibri',
            'legendpos' => 'none',
            'fontSize' => 9,
            'border' => 'none'

'fontSize' desn't give efect.

Posted by admin  · 07-03-2017 - 07:26


The current version of phpdocx doesn't include an option to change the default font sizes in charts. We send your request to the dev team to be added in a future version of the library.


Posted by andrzej.morun  · 08-03-2017 - 21:24

Is it possible to change the default font size of generated chart in source code of phpdocx library?.

Posted by admin  · 09-03-2017 - 07:10

Edited by admin · 10-10-2019 - 10:55


phpdocx 9.5 Premium licenses include options to customize series and values colors, font sizes and other styles using addChart.

You can set the default font size for the whole document, not only the chart font size. Please use a custom template to set a default font size.