Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Chart component and date values on x-axis

Status
Not open for further replies.

gaudibri

Programmer
Dec 6, 2002
19
FR
Hi all,

I use the chart component to plot prices (y) through a time period (x). My problem is that the gap between the dates is always the same whether there is one day or one month between two dates.
How can I tell the chart component that the x-axis is a non-discrete variable (ie. a continuous one).

Thanks for any kind of help.
 
I reply to myself (this is not the first time), perhaps someone will encounter the same problem. I 've been looking for a solution during over a year !!

This is working with data given by a two-columns recordset (first contains the dates, second contains the values).

Chart.Type = chChartTypeScatterMarkers (or whatever but scatter-like)

Chart.SetData chDimXValue, 0, 0 -- dates on X axis
Chart.SetData chDimYValue, 0, 1 -- values on y axis

o.Axes(1).NumberFormat = "dd/mm/yy"

Have a star !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top