Hi,

othman wrote:
Hi Ingrid,
I believe the zooming feature might be beyond the scope of my project
requirements now..

Ok.

anyway i wish if you can think adding the feature of scaling the dates
x-axis values for candle charts : date objects are  a widely used data type
and offering this feature of scaling date ranges would be a good Idea.


I agree and I know. There are still a lot of issues of similar quality. Work is ongoing.

i have a small issue :
There is concern on the x-axis labels. I need to  display only one date
label for each month. For instance, if the chart starts from Dec 6 2007,
there should be labels of 12/6/2007, 1/6/2008, 2/6/2008, 3/6/2008, 4/6/2008,
5/6/2008 on x-axis. and other date labels should not be displayed on x-axis
. how can i implement this ?


At the moment there exists no good/normal/acceptable way to do that (neither API nor user interface). You can only try to hack:

Assuming you have a data point for each day (ordered in time) and you have a cell range containing all those days you can try the following: Copy all the dates to another location in the calc. Calculate which of the days you want to display and which not. Clear the cells with the dates that you do not want to display. Use the newly created cell-range (including all the cleared cells) for display of the categories. To use the new range for category display you need to do the following: Query the com::sun::star::chart2::Diagram for interface XCoordinateSystemContainer
(http://api.openoffice.org/docs/common/ref/com/sun/star/chart2/XCoordinateSystemContainer.html).
Get the first coordinate system:
http://api.openoffice.org/docs/common/ref/com/sun/star/chart2/XCoordinateSystem.html.
At the coordinate system use method getAxisByDimension(0,0) to get the primary x axis (http://api.openoffice.org/docs/common/ref/com/sun/star/chart2/XAxis.html). At the axis get the scale data by using method getScaleData (http://api.openoffice.org/docs/common/ref/com/sun/star/chart2/ScaleData.html). At the scale you will find a member "Categories" of type XLabeledDataSequence. You know already how to create such objects from cell ranges. Set the role of the values to "categories" in this case. Then set the new sequence to the Categories member and set the changed scale back to the axis (setScaleData). Be careful when playing around with the other scale settings as not all of them are saved and loaded, some do not have an effect at all so far.

This hack has a problem. When the user changes the original dates after creation of the chart, the chart will not reflect those changes. Don't know whether that is important in your scenario.

Kind regards,
Ingrid

thanks.

othman.




Ingrid Halama wrote:
Hi,

othman wrote:
Hi Ingrid,
as we all know the candle chart has two bars (black and white)
I guess that by changing the bar width, the chart can have a larger date
range displayed.
No.

I am not sure whether this is the correct direction to fix
the x-axis scale problem . what you think about that ? and is it possible
to
change the width of candle chart bars ?
No, that is not the right direction to fix the problem. It is not possible to set a manual width to the candles. The width is calculated automatically dependent on the amount of data and the place provided.

So again, I would suggest to change the data ranges on your zooming
control.

thanks

othman

Kind regards,
Ingrid

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






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

Reply via email to