Page 1 of 1

How to use Content Control & programmatic creation of Charts

PostPosted: Mon Jun 07, 2021 6:33 pm
by gengstah
Hi everyone,

Right now, I can successfully bind my xml to a content control template. I have a few problems that needed to be solved though.

  • I've read somewhere here that we cannot use content controls for generating charts so I've been reading how to programatically generate charts but so far, no luck. Badly need help on this. Is it possible to use content control and programatically generate charts at the same time?
  • How do I update the table of contents after I am finished binding/manipulating the docx?
  • Is it possible to add a condition (content control) on a table cell to change its background color? or do I need to programatically do that?

Cheers

Re: How to use Content Control & programmatic creation of Ch

PostPosted: Wed Jun 16, 2021 7:33 pm
by jason
Regarding charts, I am aware that some users have implemented their own chart generation based on the low level stuff in docx4j, but there is nothing "high level" in docx4j for this. If you just want pretty charts, then you can use a third party charting library to create them (you can include the image bytes as a base 64 encoded string in your XML, in which case OpenDoPE can include this in the docx as a picture). But if you want real Office charts which one can edit in Office, then you'll need to create them "properly".