#1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 19
Default Simple X/Y Chart.

This is an extremly basic question but I have spent too much time trying to
figure it out.

I would like to chart a simple X/Y graph. However when I select a chart type
of XlChartType.xlLine it uses the first column in the array as a Y value
array. I would like to have the first column in the array to be the X values
and each subsequent column in the range to be Y1, Y2, etc. If I specify the
first column to be a date then it does just what I want. But if I specify the
first column to be say an integer or double then Excel seems to think that
this is one of the Y values. I just want a plot with the X values taken from
the first column and the Y values taken from the subsequent columns, with a
legend for each of the Y column values and the Y values connected with a
line. Like I said just like it does when the first column is a date.

Thank you.

Kevin
  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 6,582
Default Simple X/Y Chart.

xlLine is not an XY chart, it is a line chart. Except for when the X values
are dates, the X values are treated as nonnumeric text labels.

Look for something like xlXYScatter or xlXYScatterLine.

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


"Kevin Burton" wrote in message
...
This is an extremly basic question but I have spent too much time trying
to
figure it out.

I would like to chart a simple X/Y graph. However when I select a chart
type
of XlChartType.xlLine it uses the first column in the array as a Y value
array. I would like to have the first column in the array to be the X
values
and each subsequent column in the range to be Y1, Y2, etc. If I specify
the
first column to be a date then it does just what I want. But if I specify
the
first column to be say an integer or double then Excel seems to think that
this is one of the Y values. I just want a plot with the X values taken
from
the first column and the Y values taken from the subsequent columns, with
a
legend for each of the Y column values and the Y values connected with a
line. Like I said just like it does when the first column is a date.

Thank you.

Kevin



  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 19
Default Simple X/Y Chart.

Will this type automatically create legends based on the column header
values? I found a work-around by making the X values "text" and formatting on
my own. This seems to work.

Thank you.

Kevin

"Jon Peltier" wrote:

xlLine is not an XY chart, it is a line chart. Except for when the X values
are dates, the X values are treated as nonnumeric text labels.

Look for something like xlXYScatter or xlXYScatterLine.

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


"Kevin Burton" wrote in message
...
This is an extremly basic question but I have spent too much time trying
to
figure it out.

I would like to chart a simple X/Y graph. However when I select a chart
type
of XlChartType.xlLine it uses the first column in the array as a Y value
array. I would like to have the first column in the array to be the X
values
and each subsequent column in the range to be Y1, Y2, etc. If I specify
the
first column to be a date then it does just what I want. But if I specify
the
first column to be say an integer or double then Excel seems to think that
this is one of the Y values. I just want a plot with the X values taken
from
the first column and the Y values taken from the subsequent columns, with
a
legend for each of the Y column values and the Y values connected with a
line. Like I said just like it does when the first column is a date.

Thank you.

Kevin




  #4   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 6,582
Default Simple X/Y Chart.

In general, the SetSourceData method defines category values and series
names (legend entries) for a properly defined rata range. Otherwise you can
use the .Name, .XValues, and .Values property of each series.

What's "properly defined"? In a line or column chart, if the first column is
text or dates, it will be assigned to category labels. To make it easier for
Excel to figure out what you want, put a column header label above every
column of Y values, and keep the cell above the column of X values blank.

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


"Kevin Burton" wrote in message
...
Will this type automatically create legends based on the column header
values? I found a work-around by making the X values "text" and formatting
on
my own. This seems to work.

Thank you.

Kevin

"Jon Peltier" wrote:

xlLine is not an XY chart, it is a line chart. Except for when the X
values
are dates, the X values are treated as nonnumeric text labels.

Look for something like xlXYScatter or xlXYScatterLine.

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


"Kevin Burton" wrote in message
...
This is an extremly basic question but I have spent too much time
trying
to
figure it out.

I would like to chart a simple X/Y graph. However when I select a chart
type
of XlChartType.xlLine it uses the first column in the array as a Y
value
array. I would like to have the first column in the array to be the X
values
and each subsequent column in the range to be Y1, Y2, etc. If I specify
the
first column to be a date then it does just what I want. But if I
specify
the
first column to be say an integer or double then Excel seems to think
that
this is one of the Y values. I just want a plot with the X values taken
from
the first column and the Y values taken from the subsequent columns,
with
a
legend for each of the Y column values and the Y values connected with
a
line. Like I said just like it does when the first column is a date.

Thank you.

Kevin






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
A simple chart.. Freddie Mac Charts and Charting in Excel 1 July 2nd 06 02:26 AM
simple chart question Shooter Excel Worksheet Functions 1 January 24th 06 09:30 PM
simple chart question Roney Charts and Charting in Excel 5 November 23rd 05 03:08 PM
simple chart question Shooter Excel Worksheet Functions 1 July 26th 05 06:48 PM
Simple chart TomC Charts and Charting in Excel 3 May 5th 05 01:31 AM


All times are GMT +1. The time now is 05:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"