Hi othman,

othman wrote:
Hi Ingrid,
I appreciate your reply & interest to help in our project.our project scope
is more interesting .i'll explain it below.at this stage i'm trying to
discover the new chart2 API which still remains obscure to me.i'll need some
time to understand well the structure of this chart2 module.your feedback in
mailing list was quit helpful to get started. I hope you will continue
supporting us during our project.
I hope you don't mind i discuss with you my project goals for you are the OO
chart expert & your advise will be very helpful to me.
actually our project aim is to extend the openoffice.org com:sun:star:chart2
module using java and openoffice.org UNO API.

we believe The charting component in OO could be improved and we are looking
at ways to improve it to match the functionality of Excel.
we are considering looking at com:sum:star:chart2 because we feel that SUN
had already work on com:sum:star:chart2 for more than 2 years and they have
already developed most of the infrastructure, what it needed is a way to
extend it in UNO to suit my need.
our first aim is to use the chart2 API to programatically draw an OO
combined chart .( candlestick chart combined with line chart in same graph
).
a second project iteration will be to create and deploy a new java  OO UNO
service that extends com:sun:star:chart2 by adding the new chart type
(CandlestickAndLineType). i think that Netbeans OO Integration tool provide
easy features to create and deploy a new OO service.
2) we also thought of a second approach :

It seems to me that in OO UNO all it matters is the interface. Therefore if
i can redefine the interface, i may even use the jfreechart library behind
the scene to draw the chart in the canvas. what do you think of this
approach ? can you give me Ideas how to marry the OO chart API with the
jfreechart library ? (http://www.jfree.org/jfreechart/ )
if i use the jfreechart library, i need a way to map the spreadsheet data to
the format expected by jfreechart. I believe i need to marry the jfreechart
with chart2 in UNO. The jfreechart library is a good candidate to physically
draw the chart in the canvas while the chart2 interface already have the
infrastructure in place to understand the data in the spreadsheet like
range, columns etc.
can you please advise us how to rewrite the UNO interface so it can use
jfreechart behind the scene to draw the complex chart type (using java ) ?


I see no reasonable way to merry chart API and jfreechart with an UNO component.

You might generate just a jfreechart chart directly from the spreadsheet data, but such a chart will not survive saving and reloading the document. You will also need to implement additional user interface to insert jfreecharts by yourself.

Another idea is to just generate a picture using jfreechart - as a picture would survive saving and reloading. But then the user cannot change the chart afterwards but instead has to recreate it from scratch to make a correction or change later. That is also painful when the chart should display data that changes again and again.

Another possibility might be to generate a jfree chart on top of an OpenOffice.org chart using all the underlying chart data and thus using the service for saving and loading the chart information. I am not sure how to trigger the paints and whether it is possible at all - just an idea. Anyhow what happens with the user interface? The OpenOffice chart comes with a user interface that fits to the information that can be saved within ODF fileformat. Do you want to implement that all in duplicate? Or do you want to leave the user with charts that can not be changed or corrected afterwards anymore?

So draw backs are:
-You might loose the possibility to save in ODF fileformat
-You might loose the user interface that fits to the feature set of ODF

I Hope i could receive advice, Ideas and hopefully some sample java code
from you  Regarding this project.



My advice would be to implement an additional menu item or similar within calc to create your special chart type, implement a creation dialog for that special combi charttype ( number of lines, range strings ) and create an OpenOffice.org chart from there. Then you get the service of rendering, saving and reloading from ODF and full interactive user interface all from the OpenOffice.org chart.

Ingrid

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

Reply via email to