On Sat, 9 Jan 2016, Ken Hausam wrote:
I am using XSSFChart and associated classes to create a line chart using Apache POI. Works great! Thanks. My question is, is there an easy way to change the chart type programmatically from a line chart to a stacked bar chart? I looked quickly at the CTChart class and associated CT classes and noticed that the various chart types had their own class. This makes me think that it's not as easy as just flipping a chart type attribute somewhere, but figured it couldn't hurt to ask.

I haven't looked at the chart stuff recently, so I can't answer off the top of my head. What I'd suggest you do is firstly create a simple file in Excel, with one sheet, with a few data points, and one style of chart. Save that. Next, change the type, and save-as that. Next, unzip both .xlsx files (rename to .zip and unpack). Now, compare the xml, especially for sheets and charts, and see what differs. Post a summary of that, and we'll help if we can!

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to