Jump to content
Software FX Community

Date Format on X-Axis


User (Legacy)

Recommended Posts

Hi,

I have a couple of questions:

1. In the XY-time series graph that I am generating I want the date format

displayed on the X-Axis to be "M/d/yy". When I said

chart1.Axis(AXIS_X).Format = "M-d-yy";

or

chart1.Axis(AXIS_X).Format = AF_DATE;

or

chart1.DateFormat = "M-d-yy";

before doing

chart1.AdoResultset(rstADO);

it still displays dates as "3/23/2003" instead of "3/23/03"

Is there a way to do this ?

2. I would like to set the Minimum and Maximimum date values displayed on

the X-Axis to the minimum and maximum dates in the record set. I did this as

follows:

rstADO.MoveFirst();

dtmDate = new Date(rstADO(0));

chart1.Axis(AXIS_X).Min = dtmDate.getVarDate();

while(!rstADO.EOF)

{

rstADO.MoveNext();

}

rstADO.MovePrevious();

dtmDate = new Date(rstADO(0));

chart1.Axis(AXIS_X).Max = dtmDate.getVarDate();

//chart1.Axis(AXIS_X).Label(chart1.nValues) = dtmDate.getVarDate();

In my case, the record set has a minimum date of 9/23/2001 and max of

1/31/2001. The graph I get as as below. Is there a way to get both these

values to

show up on the graph ?

Thanks,

Sripresanna

FFChart.bmp

Link to comment
Share on other sites

Hi,

that worked. Is there a way to get the min and max dates displayed on the

graph ?

Thanks,

Sripresanna

You need to assign:

chart1.Axis(AXIS_X).Format = "DM-d-yy";

The first letter is always used to indicate the type, in this case a date

(D).

--

FP

Software FX, Inc.

"Sripresanna Narayanasamy" <presannan@ARTHRITIS.ARIZONA.EDU> wrote in

message news:2k9kB3w8CHA.1236@webserver1.softwarefx.com...

> Hi,

>

> I have a couple of questions:

>

> 1. In the XY-time series graph that I am generating I want the date format

> displayed on the X-Axis to be "M/d/yy". When I said

>

> chart1.Axis(AXIS_X).Format = "M-d-yy";

> or

> chart1.Axis(AXIS_X).Format = AF_DATE;

> or

> chart1.DateFormat = "M-d-yy";

> before doing

> chart1.AdoResultset(rstADO);

>

> it still displays dates as "3/23/2003" instead of "3/23/03"

> Is there a way to do this ?

>

> 2. I would like to set the Minimum and Maximimum date values displayed on

> the X-Axis to the minimum and maximum dates in the record set. I did this

as

> follows:

>

> rstADO.MoveFirst();

> dtmDate = new Date(rstADO(0));

> chart1.Axis(AXIS_X).Min = dtmDate.getVarDate();

> while(!rstADO.EOF)

> {

> rstADO.MoveNext();

> }

> rstADO.MovePrevious();

> dtmDate = new Date(rstADO(0));

> chart1.Axis(AXIS_X).Max = dtmDate.getVarDate();

> //chart1.Axis(AXIS_X).Label(chart1.nValues) = dtmDate.getVarDate();

>

> In my case, the record set has a minimum date of 9/23/2001 and max of

> 1/31/2001. The graph I get as as below. Is there a way to get both these

> values to

> show up on the graph ?

>

>

>

> Thanks,

> Sripresanna

>

>

>

post-2107-13922389781332_thumb.jpg

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...