Hi Pivithuru,

Pivithuru Wijegunawardana wrote:
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);



Please try to set the diagram to the document first and set the other properties later.

Hope that helps,
Ingrid

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to