Hi ,
I'm working on a
java project which is an openoffice.org addon to draw a combined chart (candlestick+line) .
Basically i have a standard OHLC 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.
The com:sun:star:chart API is very rigid on the chart type so i 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.
I wrote to Ingrid Halama author of com:sum:star:chart2 API but he discouraged me to use chart2 . he said "The ::com::sun::star:chart2 API is not intended for external use yet. It is an internal API that will change further."
i do not agree with Ingrid's approach. Consider that you are building a car, you need to do a lot of road
test to ensure that the car would behave properly. Ingrid is building a car behind close door, it is never a good idea.
i believe The charting component is a major weakness in OO and i'm looking at ways to improve it to match the functionality of Excel.
i'm considering looking at com:sum:star:chart2 because i 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.
However Ingrid & SUN people are not very helpful in this subject.. and it seems they don't want to cooperate on the com:sum:star:chart2 extension and want to keep it hidden from the developers community.
my first aim is to use the chart2 API to programatically draw an OO combined chart .( candlestick chart combined with line chart in same graph ).
2) i also though 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 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 married 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 me how to rewrite the UNO interface so it can use jfreechart behind the scene to draw the complex chart type ?
I Hope i could receive advice, Ideas and hopefully some sample java code from you Guys Regarding this issue.
I know this is a hard problem to solve . this is why i posted it in this forum & i'm looking forward to get help from smart people in this forum section.
Best Regards.