Sorry, i hope you bare with me & be patient answering my questions about the
chart2 API.
i wrote a java code to change the type of my chart from default LineType to
candlestick type.
However this code doesn't work with chart2 .but if i change to standar
com.sun.star.chart and use type "com.sun.star.StockDiagram" it does work
perfectly.
what is wrong with the chart2 code (or how to change my chart2 type to
candlestick )?
thanks.
code :
XEmbeddedObjectSupplier xEmbeddedObjSupplier = (XEmbeddedObjectSupplier)
UnoRuntime.queryInterface(XEmbeddedObjectSupplier.class,
xtablechart);
XInterface xInterface = xEmbeddedObjSupplier.getEmbeddedObject();
com.sun.star.chart2.XChartDocument xChartDoc =
(com.sun.star.chart2.XChartDocument)UnoRuntime.queryInterface(
com.sun.star.chart2.XChartDocument.class, xInterface);
com.sun.star.chart2.XDiagram xDiagram =
(com.sun.star.chart2.XDiagram) xChartDoc.getFirstDiagram();
XMultiServiceFactory xMSF = (XMultiServiceFactory)
UnoRuntime.queryInterface( XMultiServiceFactory.class, xChartDoc
);
Object object = xMSF.createInstance(
"com.sun.star.chart2.CandleStickChartType" );
xDiagram = (com.sun.star.chart2.XDiagram)
UnoRuntime.queryInterface(com.sun.star.chart2.XDiagram.class, object);
XPropertySet xPropSet = (XPropertySet) UnoRuntime.queryInterface(
XPropertySet.class, xDiagram );
xChartDoc.setFirstDiagram(xDiagram);
--
View this message in context:
http://www.nabble.com/combined-chart-type-using-com%3Asun%3Astar%3Achart2-tp19003238p19085781.html
Sent from the openoffice - api dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]