ExcelTip.com
Account Icon Account Icon Account Icon
ExcelTip.com

Go Back   Excel Help Forum > Microsoft Office Application Help - Excel Help forum > Excel Programming > Excel Charting

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-29-2005, 12:06 PM
Ginger
Guest
 
Posts: n/a
how to show date on the x axis of a line chart?

I have three columns of data. The first column is date in the format of
dd-mmm-yy hh:mm:ss. The second and third columns have the real data I like to
chart for. I select three columns of data and draw a line chart, but date
doesn't show up in x axis. How do I fix this?

Thanks much for your help!
Ginger
Reply With Quote
  #2  
Old 04-29-2005, 02:06 PM
bj
Guest
 
Posts: n/a
RE: how to show date on the x axis of a line chart?

select the two lines of data other than the date and make your chart with
them using <Chart><sourse data><series> enter the x axis data in the
approrite location.

"Ginger" wrote:

> I have three columns of data. The first column is date in the format of
> dd-mmm-yy hh:mm:ss. The second and third columns have the real data I like to
> chart for. I select three columns of data and draw a line chart, but date
> doesn't show up in x axis. How do I fix this?
>
> Thanks much for your help!
> Ginger

Reply With Quote
  #3  
Old 04-30-2005, 04:06 AM
John Mansfield
Guest
 
Posts: n/a
RE: how to show date on the x axis of a line chart?

Ginger,

Excel is reading your original X axis values as a time format. If you
double-click on your X axis label, you'll see in the Format Axis dialog box
-> Scale tab that the minimum time X axis value is one day. Given that
you're tracking hours, the one-day minimum value will not work for you.

To get around this limitation, add a helper column to your chart source.
Assuming your original data looks like this and is in the range A1:C6:

Time Entry Series1 Series2
05-Jan-05 01:00:00 5 5
05-Jan-05 02:00:00 4 3
05-Jan-05 03:00:00 6 4
05-Jan-05 04:00:00 7 6
05-Jan-05 05:00:00 8 5

add a helper column to column B. In the example below I've titled the
helper column "Text Entry". Enter the following formula to cell B2 and copy
it down column B:

=TEXT(A2,"yy-mmm-dd hh:mm:ss")

The revised data set look like this in the range A1:D6.

Time Entry Text Entry Series1 Series2
05-Jan-05 01:00:00 05-Jan-05 01:00:00 5 5
05-Jan-05 02:00:00 05-Jan-05 02:00:00 4 3
05-Jan-05 03:00:00 05-Jan-05 03:00:00 6 4
05-Jan-05 04:00:00 05-Jan-05 04:00:00 7 6
05-Jan-05 05:00:00 05-Jan-05 05:00:00 8 5

Column B will now be interpretted as a text entry that looks just like a
time entry.

Finally, create your chart using column B instead of column A as the X axis.
If you use the Chart Wizard, select the range B1:B6 to create the chart.

----
Regards,
John Mansfield
http://www.pdbook.com


"Ginger" wrote:

> I have three columns of data. The first column is date in the format of
> dd-mmm-yy hh:mm:ss. The second and third columns have the real data I like to
> chart for. I select three columns of data and draw a line chart, but date
> doesn't show up in x axis. How do I fix this?
>
> Thanks much for your help!
> Ginger

Reply With Quote
  #4  
Old 04-30-2005, 08:11 AM
Tushar Mehta
Guest
 
Posts: n/a
Re: how to show date on the x axis of a line chart?

If your x-values are not equivally spaced, there is little in practical
terms that one can do with a line chart. However, a XY Scatter chart
just might be what the doctor ordered.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Multi-disciplinary business expertise
+ Technology skills
= Optimal solution to your business problem
Recipient Microsoft MVP award 2000-2005

In article <49CB5566-C4C7-4B01-B933-6B8655E54645@microsoft.com>,
Ginger@discussions.microsoft.com says...
> I have three columns of data. The first column is date in the format of
> dd-mmm-yy hh:mm:ss. The second and third columns have the real data I like to
> chart for. I select three columns of data and draw a line chart, but date
> doesn't show up in x axis. How do I fix this?
>
> Thanks much for your help!
> Ginger
>

Reply With Quote
  #5  
Old 04-30-2005, 11:06 PM
Jon Peltier
Guest
 
Posts: n/a
Re: how to show date on the x axis of a line chart?

Except that using a Line chart gives you more control over the display of the axis
(try to put a tick mark on just the first of every month in an XY Scatter chart),
and the points are proportionally spaced by day, and the times of day are ignored.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Tushar Mehta wrote:

> If your x-values are not equivally spaced, there is little in practical
> terms that one can do with a line chart. However, a XY Scatter chart
> just might be what the doctor ordered.
>


Reply With Quote
Reply

Bookmarks

New topics in Excel Charting


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -4. The time now is 09:09 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0