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!

Graphs with Time values

Status
Not open for further replies.

DaverD

Technical User
Jun 11, 2003
14
US
Hello.

I am keeping track of blood pressure values over time and use MS Graph to produce the graphical report. My problem is that MS Graph seems to ignore the time portion of the date/time X axis data.

I was hoping someone can explain to me how MS Graph treats time as the X axis.

Let me explain a little more...
Data is collected simply with a date, a time and the two blood pressure values. I can produce a graph that shows the blood pressure values over many months. The X axis is date/time and the Y axis are the blood pressure values.

Because the values have been collected at different times during the day, I want to graph the blood pressure values where the X axis is the time of day - irregardless of the date.

I have the time only data in a column. It is formatted as time and I've confirmed this by changing the time format via Table Design and sure enough, I see the display change. However, when I graph it, it shows up evenly spaced across the X axis. In fact, if I put in multiple values for the same time, the time value is shown multiple times, evenly spaced across the X axis.

It is like it does not understand that it is graphing time units...

I tried exporting the table that I am graphing to Excel and interestingly, the time values come across as 1/1/1900.

Next, I tried graphing 12 blood pressure values taken over the course of one day. I had the X axis be the date/time and the result was a single column on the graph.

So I am left with the question...
How do I graph time values?

Anyone with insight?

Thanks in advance...
DaverD
 
All charts display data based on the Row Source property. Dates/Times are stored in floating point numbers. The Time portion is to the left of the decimal.

You can extract the times usinge something in your Row Source query like
Format([YourField],"hh:nn")
or
TimeValue([YourField]) * 24

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 

Hey DaverD,

Given my own BP issues, I'm curious.

Blood Pressure is represented by TWO numeric figures, such as 120/80. In addition to time, which figure are you graphing? If both, do you need to merge them? Certainly you're not using the percentage, since "120/80" = "180/120." The health implications, obviously, are quite different.

Just curious! Good health to all!

"Ducktor"



[green]Tis far easier to keep your duck in a row if you just have the one.[/green]
 
MallardVHS,

I am tracking Date, Time, Systolic, Diastolic, and Pulse.

To add a kink to this, I am taking readings at two locations. One at work and one at home. I am interested not so much in the different equipment but the the different environments. So the table has Date, Time, Systolic, Diasystolic, Pulse, and a HomeWork designator. Nothing fancy from a data schema perspective - just one table.

However, things do get interesting from a graphing perspective because I want to see graphically a pattern differential between the two environments. To do this, I create a graph source table on-the-fly (via a macro) that separates the home and work values into separate columns for separate data series.

I produce three graphs with this concept. One for work only data; one for home only data; and one that has both work and home data on it. They all show blood pressure over the time period recorded.

What I want to add to this graph inventory is a graph that shows how blood pressure changes over the course of one day for all the days I have. So on the X axis, I have 00:00 AM through 12:00 AM. I am expecting it to show that my blood pressure is elevated consistently over certain times of the day.

Taken one step further, I'd be interested to see a graph over a week (again for all the weeks I have collected) so I can see how blood pressure changes from Sunday to Monday, through the work week and then during the Friday-to-weekend transition.

I plan on trying the TimeValue function to see if this changes how MS Graph "sees" the data. (Thanks dhookom)

DaverD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top