0

I'm trying to make a bar and line chart using Apache POI in Powerpoint like this:

Exameple bar and line chart

I found a solution for excel to the problem, but it creates the chart in Excel instead of PowerPoint, my question now is, is there a way to convert the code in the other solution to one that works for PowerPoint, so I can add it to a slide. And have the input as lists instead of rows/columns in the excel file?

Matt Ke
  • 3,599
  • 12
  • 30
  • 49
Thomas
  • 1
  • 2
  • First step: [how to create a chart in PowerPoint](https://stackoverflow.com/questions/45373942/java-create-a-chart-in-a-powerpoint-using-apache-poi), then modify the output pptx in PowerPoint, then unzip the pptx file and look at the added xml elements (i.e. compare the files), last step: recreate the missing xml elements via the XmlBeans interface. this will be a trial and error process, so make only small adjustments in PowerPoint. – kiwiwings Sep 21 '21 at 15:30
  • I probably should add that we have a XDDF interface / generalization. I currently can't browse the code, but you might find some examples in the [examples artifact](https://search.maven.org/artifact/org.apache.poi/poi-examples/5.0.0/jar) or in the [tests](https://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xddf/usermodel/chart/) – kiwiwings Sep 21 '21 at 16:55
  • See https://stackoverflow.com/questions/62696090/show-sum-value-above-stacked-bar-with-apache-poi/62716111#62716111. This creates a combination of stacked bar chart and line chart in `PowerPoint`. The line chart is not visible and not shown in a separate axis. But this easily can be changed . – Axel Richter Sep 22 '21 at 03:34
  • Thanks for the quick responses! Will try to figure it out, thanks again! – Thomas Sep 22 '21 at 09:08

0 Answers0