Page 1 of 1

Update Pie chart legend colors

PostPosted: Fri May 24, 2019 1:55 am
by prakhar211
Hi,

I have a word template that includes pie chart. I am able to modify the contents (data series) for the Pie chart using docx4j api but I need some help updating colors for legend (data labels).

Can someone please provide sample code? How to do it?

Re: Update Pie chart legend colors

PostPosted: Wed May 29, 2019 1:31 am
by prakhar211
can anyone throw some pointers?

Re: Update Pie chart legend colors

PostPosted: Mon Jun 03, 2019 5:25 pm
by jason
You'll need to look at the representation inside the docx to determine what XML controls that.

Or you might find the answer in [MS-ODRAWXML]: https://docs.microsoft.com/en-us/opensp ... 5135e5f0de

Once you understand the XML representation, actually changing it via docx4j ought to be straightforward.