Hi, I used the following code segment to set the chart type to bar diagram and then set the "NumberOfLines" property value. But I couldn't see the lines in the chart. And also I tried to change some other properties also. I couldn't do any property changes.
In the api documentation for bar diagrams http://api.openoffice.org/docs/common/ref/com/sun/star/chart/BarDiagram.html , it has been stated that "NumberOfLines" property value is a long value. But when I use long it gives an error stating that it should be an integer. But even after correcting that error also it was not successful. XDiagram aDiagram = (XDiagram) UnoRuntime.queryInterface( XDiagram.class, aFact.createInstance("com.sun.star.chart.BarDiagram")); XPropertySet pSet = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, aDiagram); pSet.setPropertyValue("NumberOfLines", new Integer(1)); aChartDocument.setDiagram(aDiagram); On Sun, Sep 19, 2010 at 2:56 PM, Niklas Nebel <niklas.ne...@oracle.com>wrote: > Pivithuru Wijegunawardana schrieb: > > I want to insert a column and line chart (which is a chart type available >> in >> the chart wizard) via a java code in Openoffice calc. Is it possible >> directly inserting this type of a chart? I checked with api module for >> charts and this type was not available. If this is not possible how can I >> insert a chart with both columns and lines? >> > > The service com.sun.star.chart.BarDiagram has a property "NumberOfLines" to > show some data series as lines. > > Niklas > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org > For additional commands, e-mail: dev-h...@api.openoffice.org > > -- Best regards, Pivithuru Wijegunawardana University of Moratuwa Sri Lanka