Jump to content
Software FX Community

Date Format on X-Axis


User (Legacy)
 Share

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...