Hello,
we are using phpdocx premium version 15, I want to generate doughnut charts using addChart. How can I add text to the hole of doughnut chart.
Hello,
we are using phpdocx premium version 15, I want to generate doughnut charts using addChart. How can I add text to the hole of doughnut chart.
Hello,
The stable release of phpdocx only supports adding the chart title in its default position.
We have added a task to support setting a custom layout position to the chart title. This feature will be added in the next stable release of phpdocx.
Regards.
Okay. Can we add the values next to the points in the legend below the doughnut chart?
$data = array(
'data' => array(
array(
'name' => 'Equity',
'values' => array(67.17),
),
array(
'name' => 'Mutual Fund Units',
'values' => array(11.17),
),
array(
'name' => 'G-Sec, G-Sec STRIPS, SDL',
'values' => array(7.39),
),
array(
'name' => 'Credit Exposure',
'values' => array(6.32),
),
array(
'name' => 'Cash, Cash Equivalents and Net Current Assets',
'values' => array(5.62),
),
array(
'name' => 'Units issued by ReIT',
'values' => array(2.23),
),
array(
'name' => 'Units issued by InvIT',
'values' => array(0.10),
),
),
);
Hello,
MS Word doesn't allow adding data tables to some chart types (pie, doughnut...). Only specific chart types such as bar or line support data tables.
You can use the legendPos option (https://www.phpdocx.com/api-documentation/word-content/add-chart-Word-document-with-PHP) to set the legend position (bottom, top, left, right...). There's no option in phpdocx to move value positions (MS Word supports this by moving manually the values, but it doesn't include a specific option).
If you want to display the data values in the legend of the doughnut chart, we recommend you add them in the legend values (as part of the text string).
Regards.