Search code examples
javachartspowerpointpie-chartdocx4j

PPT - chart data label alignment using PPTX4J


I'm using docx4j - pptx4j to update chart values in a PPT.

The values are getting updated , but the problem is the data label alignment is a mess post update.

What could be done to align label to the best possible position??

enter image description here

Thanks in advance :)


Solution

  • After exploring for long time, I found the solution for my problem.

    When i unzipped the ppt file and check that particular chart's XML, there was tag like below

            <c:layout>
                <c:manualLayout>
                    <c:xMode val="edge" />
                    <c:yMode val="edge" />
                    <c:x val="0.37500645045178749" />
                    <c:y val="0.19924874413552776" />
                </c:manualLayout>
            </c:layout>
    

    and removing the manual layout solved the issue :)