Hi Ingrid ,
Thanks for providing the steps to use chart2 API for combining two chartype
. I'll try implementing this method using the java UNO API .will get back to
you if i face any eventual issues implementing the below method .
Yes i'm aware of the risk using the unpublished chart2 API . our boss seems
to be convinced that we should start using chart2 API . our project will be
subject of future monitoring & re-factoring; so we will be tracking the
changes in chart2 API and reflecting them in our java code.

I'll get back to you when i try your method described below.
thanks for the help.

othman


Ingrid Halama wrote:
> 
> Hi othman,
> 
> Again a warning about using ::com::sun::star::chart2 API: It is not 
> provided for external usage yet. It is an internal API that will change 
> further. When the API evolves your code will not work with future 
> versions. If you nevertheless want to use the chart2 API on your own 
> risk do the following:
> 
> Query your chart document for interface 
> com::sun::star::chart2::XChartDocument. Use method getFirstDiagram() and 
> getDataProvider(). Query the received diagram for 
> com::sun::star::chart2::XCoordinateSystemContainer. Receive the first 
> and only coordinate system from the container. Query the coordinate 
> system for interface com::sun::star::chart2::XChartTypeContainer.
> There is the candlestick chart type already in. You need to add the 
> additional chart type 'Line' here. Create an instance of service 
> "com.sun.star.chart2.LineChartType" with the global service manager and 
> add it to the chart type container. Query the new chart type for 
> interface com::sun::star::chart2::XDataSeriesContainer. Create a new 
> data series ( create an instance of service 
> "com.sun.star.chart2.DataSeries") and add it to the container.
> To connect data to the data series do the following. Query the series 
> for interface com::sun::star::chart2::data::XDataSink. Use method 
> createDataSequenceByRangeRepresentation() at the formerly received data 
> provider to create a data sequences from the cell ranges of your choice. 
> Set the property 'Role' at the data sequence to 'values-y'. Create an 
> instance of UNO service 'com.sun.star.chart2.LabeledDataSequence' and 
> use method setValues() to attach the formerly created sequence. Use 
> method 'setData()' at the formerly received interface XDataSink to 
> attach the labeled data sequences to the series.
> 
> Ingrid
> 
> othman wrote:
>> Hi,
>> i have a standard OHLC (candlestick) chart which could be drawn on OO
>> perfectly. OO could draw the OHLC chart but could not combine it with
>> other
>> line charts in the same graph .
>> What i needed is a way to modify the OO code so that it could superimpose
>> charts with same coordinate system to appear on the same
>> graph.(candlestick
>> chart + line charts)
>> 
>> The com:sun:star:chart API is very rigid on the chart type so you need to
>> develop new chart type to take care of our needs and it is not flexible
>> to
>> use this approach.
>> The com:sum:star:chart2 API appears to be the answer as it has the
>> infrastructure in place to allow you to draw more than one charttype on
>> the
>> same graph under the same coordinate system. However, I have never tried
>> this feature out.
>> 
>> does anyone know how to combine two chart types (candlestick and line
>> chart)
>> in same coordinate system ? i need to do this programaticaly using java
>> com:sun:star:chart2 module. (as i said i have little knowledge how to use
>> the chart2 module)
>> 
>> i would appreciate any small snippet code showing how to achieve this
>> charttype combination. (java or even visual basic code)
>> 
>> thanks. 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/combined-chart-type-using-com%3Asun%3Astar%3Achart2-tp19003238p19028885.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]

Reply via email to