Jump to content
Software FX Community

Re: Formatting X-axis as Time wont work...


Software FX

Recommended Posts

Hello,

In order to set the Min and Max property of the x-axis object you need to assign both x and y values. If you assign y values only then the Max property will be ignored. If you are passing both x and y values then you need to make this assignment after you have passed the recordset to ChartFX. If you make this assignment before it will be overwritten by the range of the recordset.

-----Original Message-----

From: Alexis M [mailto:nospam@hotmail.com]

Posted At: Saturday, November 18, 2000 8:01 PM

Posted To: Server

Conversation: Formatting X-axis as Time wont work...

Subject: Re: Formatting X-axis as Time wont work...

OK... it works now...

Seems that I have to put the

Chart.Axis(AXIS_X).Format = AF_TIME

line before

Chart.AdoResultset rsChart

(I had it the other way round before)...

However, I have a new problem now... I can't get the X-Axis scale to work

properly. Whatever values I set it to, it will always adjust itself

automatically to the input values. I've tried using the AutoScale = False

property, but that wont work either.

I want my time scale (X-Axis) to be a fixed width (i.e. from 08:00 to 20:00

which is when I will be getting readings into my database). So I use line

like:

Chart.Axis(AXIS_X).Min = DateSerial(1900,01,01) + TimeSerial(08,0,0)

Chart.Axis(AXIS_X).Max = DateSerial(1900,01,01) + TimeSerial(20,0,0)

to set the range. My database only stores time values, so by default the

date returned from the SQL statement will always be 01/01/1900. Whatever

values I set Min and Max to, the X-Axis always adjusts itself to fit the

data range.

Strangely when I print out debugging info (I print the values of Min and

Max), the values are what I set them to be.

What am I overlooking here?

Thanks

Alexis M

< a l e x _ m 7 4 at h o t m a i l dot c o m >

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...