Re: Insert column and line chart in calc
Pivithuru Wijegunawardana <[email protected]>
| Newsgroups | gmane.comp.openoffice.devel.api |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]>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: [email protected]
> For additional commands, e-mail: [email protected]
>
>
--
Best regards,
Pivithuru Wijegunawardana
University of Moratuwa
Sri Lanka