Hi,

othman wrote:
Hi Ingrid & thanks for your patience & further assistance on this thread.

you said previously that the default chart type is the bar chart. so i
suppose my chart type container object already holds the
"com.sun.star.chart2.ColumnChartType". However the below code throws an exception error :

code:
 //remove default bar chart type
        object = xMCF.createInstanceWithContext(
                "com.sun.star.chart2.ColumnChartType", xContext);
       com.sun.star.chart2.XChartType
defaultChartType=(com.sun.star.chart2.XChartType) UnoRuntime.queryInterface(
            com.sun.star.chart2.XChartType.class, object);
       oChartTypeCnt.removeChartType(defaultChartType);

the above code throws this error :

com.sun.star.container.NoSuchElementException: The given chart type is no
element of the container
        at com.sun.star.bridges.jni_uno.JNI_proxy.dispatch_call(Native
Method)
        at com.sun.star.bridges.jni_uno.JNI_proxy.invoke(JNI_proxy.java:183)
        at $Proxy33.removeChartType(Unknown Source)
        at
com.sun.star.openofficecombinedchart.chart.CombinedChart.createChart2(CombinedChart.java:113)
        at
com.sun.star.openofficecombinedchart.OOoCombinedChartController.execute(OOoCombinedChartController.java:70)
        at
com.sun.star.openofficecombinedchart.OpenOfficeCombinedChart.dispatch(OpenOfficeCombinedChart.java:123)

why trying to remove "com.sun.star.chart2.ColumnChartType" gives this error
?

You will need to remove exactly that instance of chart type that is contained in the container. So get all instances of chart types contained in the chart type container and remove exactly that ones from the container.


2) i still don't know how to use the "categories" property for DataSequence
.
I searched the chart2 module for class "Categories" or something like that
,but there is no such class or service.
can you please explain in more details how to use  "categories" property to
set x-axis values of candlestick chart .

Why can't you use the standard API for initial creation? That would solve the issue more easily.

Ingrid

thanks
othman.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to