Need help to create chart in PPT slide
Posted: Thu Sep 12, 2013 9:29 pm
Hi,
I'm trying to insert a chart into PPT by unmarshalling an existing chart XML.
I've created ChartSpace by unmarshalling chart XML. created Chartobject and added to slide by using the following code.
>>>
Chart chart = new org.docx4j.openpackaging.parts.DrawingML.Chart(new PartName("/ppt/charts/chart1.xml"));
CTChartSpace cs = (CTChartSpace)XmlUtils.unmarshalString(chartXML);
chart.setJaxbElement(cs);
sp.addTargetPart(chart);
<<<
When i tried opening the presentation, it's says "Powerpoint found a problem with the content and it can attempt to repair". The moment, I click on repair, it says 'Removed unreadable content' and blank slide is getting displayed.
Could anyone please provide help in fixing this issue ? I'm attaching the generated PPT for reference
-Thanks,
Praveen
Could you please help me in figuring out the actual issue ? I'm attaching the generated PPTX file here.
-Thanks,
Praveenb
I'm trying to insert a chart into PPT by unmarshalling an existing chart XML.
I've created ChartSpace by unmarshalling chart XML. created Chartobject and added to slide by using the following code.
>>>
Chart chart = new org.docx4j.openpackaging.parts.DrawingML.Chart(new PartName("/ppt/charts/chart1.xml"));
CTChartSpace cs = (CTChartSpace)XmlUtils.unmarshalString(chartXML);
chart.setJaxbElement(cs);
sp.addTargetPart(chart);
<<<
When i tried opening the presentation, it's says "Powerpoint found a problem with the content and it can attempt to repair". The moment, I click on repair, it says 'Removed unreadable content' and blank slide is getting displayed.
Could anyone please provide help in fixing this issue ? I'm attaching the generated PPT for reference
-Thanks,
Praveen
Could you please help me in figuring out the actual issue ? I'm attaching the generated PPTX file here.
-Thanks,
Praveenb