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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Chart - Add Vertical Line to show current date (X-Axis value)

Status
Not open for further replies.

Poduska

Technical User
Dec 3, 2002
108
US
I have seen this done in XL but cannot seem to come up an idea that works in my Access form on my OLE Class "Microsoft Chart Graph".

I have a simple line graph based upon a query, 3 lines of data horizontal and a continuous X-Axis by Date, about 150 days at a time along the bottom.

It is a simple chart and works fine however, due to the large number of dates

[highlight #FF99FF]I would like a vertical line on the current day (X-axis value) to make the chart REALLY easy to see where the lines are today.[/highlight]

An example of exactly what I need is here

within the sample 30540.xls? about 1/2 way down.

This example in Excel uses a 2 date Scatter data type (the example uses the NOW() function so you will have to add an old date in to see the line) and since I am using a Query I am at a loss as to if this is even possible in Access as I do not have a cell or range reference to base the second data source for the vertical line.

Another good example is here This discusses 2nd Y axis and data series but for the life of me I cannot seem to find how to do this in Access, I cannot locate anywhere to add a data series or any reference to a second Y axis.

I have heard that the in Access OLE charts are the same as Excel but in Access I can never seem to get to all the formatting or chart menu options which are available in Excel.

Has anyone tried placing a chart on top of another to mimic this effect?

Any ideas from the chart\graph experts as to adding a vertical line? It would seem that this would be a way to indicate the current day without manually adding in the line.

Signed, "Chart Challenged in Corner Cube
 
I wonder if you could create another column in your Row Source property with a calculated expression like:
Code:
IIf([DateField] = Date(),100,0)
You would need to replace DateField with your field name and 100 with an appropriate value.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top