Format Date values in candlestick chart

Creating a macro - Writing a Script - Using the API

Format Date values in candlestick chart

Postby othmanelmoulat » Tue Aug 26, 2008 2:33 pm

Hi forum,
i'm trying to understand how OO chart API handles the dates values in a candlestick chart .
for my Y axis i have double values; so i suppose i can handle the ranges for y axis easily with properties Min, Max , StepMain via ChartAxis service.
however my x axis holds dates in the format mm/dd/yyyy .i'm facing a problem with x-axis values :i need to manipulate the dates ranges programatically (set a min date , a max date and range date) . like i said previously values in x-axis are Date formats (mm/dd/yyyy). i tried using the format->x-Axis wizard to change the scaling of chart's x-axis . however the text fields in x-axis scale wizard are disabled ! i can't change the scaling for my dates ranges .
i'm not facing this problem in Y-axis values ..i can correctly use the format->y-axis-scale wizard to scale the y-values..
what is the problem of the dates being used for x-axis values in a candlestick chart ?

can you please shade some light on this issue ?
OOo 3.4 and LibreOffice 3.4 on openSuse 11.4 + windows 7
othmanelmoulat
 
Posts: 142
Joined: Sun Aug 03, 2008 4:39 am

Re: format Date values in candlestick chart

Postby Villeroy » Tue Aug 26, 2008 3:39 pm

http://api.openoffice.org/docs/common/r ... plier.html
http://api.openoffice.org/docs/common/r ... mberFormat (property, ID number)
Like in a spreadsheet all numeric values are of type "Double".
The chart document has a NumberFormatSupplier where each number format has an ID number and a locale.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 27094
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: format Date values in candlestick chart

Postby othmanelmoulat » Tue Aug 26, 2008 6:28 pm

Villeroy wrote:http://api.openoffice.org/docs/common/ref/com/sun/star/chart/XAxisYSupplier.html
http://api.openoffice.org/docs/common/r ... mberFormat (property, ID number)
Like in a spreadsheet all numeric values are of type "Double".
The chart document has a NumberFormatSupplier where each number format has an ID number and a locale.


sorry i forgot to mention that i'm using com:sun:star:chart2 API (not the standard com:sun:star:chart) . I think chart2 handles this issue differently
does anyone knows how to format Dates with chart2 API ?

thanks.
OOo 3.4 and LibreOffice 3.4 on openSuse 11.4 + windows 7
othmanelmoulat
 
Posts: 142
Joined: Sun Aug 03, 2008 4:39 am

Re: format Date values in candlestick chart

Postby Villeroy » Tue Aug 26, 2008 7:28 pm

As far as I know, module chart2 extends module chart. Any chart, created with a version >=2.3 implements services of both modules.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 27094
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: format Date values in candlestick chart

Postby othmanelmoulat » Tue Aug 26, 2008 10:49 pm

Villeroy wrote:As far as I know, module chart2 extends module chart. Any chart, created with a version >=2.3 implements services of both modules.


unfortunately chart2 doesn't extend the standard chart module..chart2 is an internal module that is used to back the chart standard.

anyway i think i can set the range for dates in string formats like this :
XCellRange myRange = oRange.getCellRangeByName("A1230:E1740");
this did the trick for setting a min date and max date .what remains is only to set a step for my range within the String range . i suppose this could be done using a formula like : oRange.getCellRangeByName("A1230:E1740:DATE_STEP_RANGE"); (i'm not sure if this is possible)
is it possible to set a step range in string range formula ? if yes how to specify this range step ?
OOo 3.4 and LibreOffice 3.4 on openSuse 11.4 + windows 7
othmanelmoulat
 
Posts: 142
Joined: Sun Aug 03, 2008 4:39 am


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 4 guests