a1tair General User

Joined: 05 Jun 2006 Posts: 15
|
Posted: Tue Oct 03, 2006 7:00 am Post subject: property for OLE chart object? |
|
|
Hi all,
I encountered with a problem and am unable to figure it out.. hope you guys can enlighten me.
I inserted a Graph into a drawpage as a OLE object. After which is there anyway i can change the type of the graph like bardiagram to xydiagram?
Also i can't seem to construct a new graph with the particular diagram type. Default is always bardiagram.
I am using Java as the sdk..
Thanks for all the help
-------------------------
XShape aShape = (com.sun.star.drawing.XShape)
UnoRuntime.queryInterface(
com.sun.star.drawing.XShape.class,
aFact.createInstance("com.sun.star.drawing.OLE2Shape"));
aPage.add(aShape);
aShape.setPosition(new com.sun.star.awt.Point(1000, 1000));
aShape.setSize(new com.sun.star.awt.Size(15000,9271));
// make the OLE shape a chart
XPropertySet aShapeProp = (XPropertySet) UnoRuntime.queryInterface(
XPropertySet.class, aShape );
// set the class id for charts.
aShapeProp.setPropertyValue("CLSID", msChartClassID);
// retrieve the chart document as model of the OLE shape
aChartDoc = (XChartDocument) UnoRuntime.queryInterface(
XChartDocument.class,
aShapeProp.getPropertyValue("Model"));
XDiagram aDiagram = (XDiagram) UnoRuntime.queryInterface(
XDiagram.class, aFact.createInstance("com.sun.star.chart.XYDiagram"));
aChartDoc.setDiagram(aDiagram);
... |
|