Jump to content
Software FX Community

charting dates on x axis with gaps


User (Legacy)

Recommended Posts

Hello,

Two questions:

1) I have timebased data that is usually hourly, but there can be gaps of a

day or more. I am using CFX Internet.

The product samples show that the x axis is capable of understanding dates

and drawing them to scale with the data properly placed along the timeline

on the x axis.

My experience is that the date range will show the hourly data for one day

(say 6/10) and then the next data points (for 6/12) will be drawn right next

to the points and there is no appropriate space left for the empty 6/11.

I manipulated the installed samples and they drew the chart properly, with

the missing day left as I would like on the x axis.

I am using OLEDB to a SQL 2000 server. The samples use ODBC to a Access

database. Could this be an issue? Do I need to need to put values in for

the missing day (this seems unlikely, I didn't do it with the sample.)

2) I would like all the charts to begin and end at midnight of their

respective days. This code didn't work:

with chart1.Axis(AXIS_X) 'X Axis Labels

.Min = dateserial

(year(cdate(cMinDate)),month(cdate(cMinDate)),day(cdate(cMinDate))) +

timeserial(0, 0,0)

.Max = dateserial

(year(cdate(cMaxDate)),month(cdate(cMaxDate)),day(cdate(cMaxDate))) +

timeserial(23,59,59)

.Format = strFormat

'.STEP = iStep

end with

Again, do I need to add Hidden points?

Thanks,

adam

Link to comment
Share on other sites

I have set the datatype to xvalue, and now I am getting dates like

12/30/1899. My xaxis ranges from 12/1899 to 4/1900. No lines are being

graphed.

Needless to say, my data is in the year 2002!

When I set the datatype to label, it works well.

Playing with datastyle doesn't seem to have any effect. (It could certainly

be documented better, too.)

Thanks,

adam

"SoftwareFX Support" <support@softwarefx.com> wrote in message

news:8HclJ6QVCHA.1288@webserver1.softwarefx.com...

> Looks like you are using your dates merely as labels, to give meaning to

> them you need to use them as X-Values. You can do this by setting the

> DataType and/or DataStyle properties prior to passing your data.

>

> --

> FP

> Software FX, Inc.

>

>

Link to comment
Share on other sites

The answer is that when setting the dates as the x value and then setting

the format property on the dates, formatting the dates needs to be done

after getting the recordset.

This also fixed my min and max problem on the X axis.

This is one of the many places that the object is very sensitive to where

properties are set (before or after binding to the record set.

I strongly encourage you to improve your documentation and samples.

adam

"Adam Davis" <adam.davis@digex.com> wrote in message

news:fZr#N1bVCHA.1344@webserver1.softwarefx.com...

> I have set the datatype to xvalue, and now I am getting dates like

> 12/30/1899. My xaxis ranges from 12/1899 to 4/1900. No lines are being

> graphed.

>

> Needless to say, my data is in the year 2002!

>

> When I set the datatype to label, it works well.

>

> Playing with datastyle doesn't seem to have any effect. (It could

certainly

> be documented better, too.)

>

> Thanks,

>

> adam

>

> "SoftwareFX Support" <support@softwarefx.com> wrote in message

> news:8HclJ6QVCHA.1288@webserver1.softwarefx.com...

> > Looks like you are using your dates merely as labels, to give meaning to

> > them you need to use them as X-Values. You can do this by setting the

> > DataType and/or DataStyle properties prior to passing your data.

> >

> > --

> > FP

> > Software FX, Inc.

> >

> >

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...