Hi,
How can a chart be put onto openxml Word doc? I can create a blank or dummy chart to put there and try to sort thru to get into the values, but how is it done?
Goal: to add a 1-100% stacked Horiz bar chart with 3 series.
I have a docx used as a template, i copy this into a memory stream, then search into that to find elements. So far adding a Chart has failed, the resulting docx is "corrupt". To find the location to add something, I had added string literals in the word doc but made the font invisible.
so "put_item_here" is tiny and white as the background.
foreach (DocumentFormat.OpenXml.OpenXmlElement xde in bodyDoc) { if (xde.InnerText == "put_item_here") { xde.InsertAfterSelf(GenerateTheChart()); }So the problem is HOW to add a Chart? I made the method GenerateTheChart(), I took a blank Word doc and added a chart, saved it, opened in OpenXml sdk tool to get at the code, but putting this into the method worked for Tables, but its not working for the chart.