Jump to content
Software FX Community

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

User (Legacy)

Recommended Posts

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


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?


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


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

  • Create New...