Drawing a Line between two points 
Author Message
 Drawing a Line between two points

....Help....I would appreaciate it if someone could point me in the right
direction to solve the following problem:

I want to add some code to an XL macro which will draw a line between to
data points on a chart object.  Assume that I have the x and y coordinates
in cells x1, x2 and y1, y2 respectively (same metric as the x and y axis).

I want to create a line object which can then be copied and pasted as I
construct the desired form on the chart based on the length defined above.
The Line object requires its arguments in points relative to the upper left
corner of the chart object.  Is there a way to convert the user x,y metric
into coordinates relative to the upper left of the chart?  Will it be
insensitive to various monitor resolution changes? Will it be insensitive to
stand alone vs embedded charts?

Thanks in advance for your assistance.....Rob



Wed, 18 Jun 1902 08:00:00 GMT  
 Drawing a Line between two points
If youi have x1,x2,y1,y2 points, then just adding these as a new series of
xy-scatter chart should make it be a connected line.

Quote:

>....Help....I would appreaciate it if someone could point me in the right
>direction to solve the following problem:

>I want to add some code to an XL macro which will draw a line between to
>data points on a chart object.  Assume that I have the x and y coordinates
>in cells x1, x2 and y1, y2 respectively (same metric as the x and y axis).

>I want to create a line object which can then be copied and pasted as I
>construct the desired form on the chart based on the length defined above.
>The Line object requires its arguments in points relative to the upper left
>corner of the chart object.  Is there a way to convert the user x,y metric
>into coordinates relative to the upper left of the chart?  Will it be
>insensitive to various monitor resolution changes? Will it be insensitive
to
>stand alone vs embedded charts?

>Thanks in advance for your assistance.....Rob



Wed, 18 Jun 1902 08:00:00 GMT  
 Drawing a Line between two points
Bob...Thanks, but for the application, I need a straight line of a specific
length so I can "construct" a more complicated diagram with a series of
pastes.  Using a series of "Series"commands won't work the way I need it to
work.

Any other ideas?.......Rob

Quote:

>If youi have x1,x2,y1,y2 points, then just adding these as a new series of
>xy-scatter chart should make it be a connected line.


>>....Help....I would appreaciate it if someone could point me in the right
>>direction to solve the following problem:

>>I want to add some code to an XL macro which will draw a line between to
>>data points on a chart object.  Assume that I have the x and y coordinates
>>in cells x1, x2 and y1, y2 respectively (same metric as the x and y axis).

>>I want to create a line object which can then be copied and pasted as I
>>construct the desired form on the chart based on the length defined above.
>>The Line object requires its arguments in points relative to the upper
left
>>corner of the chart object.  Is there a way to convert the user x,y metric
>>into coordinates relative to the upper left of the chart?  Will it be
>>insensitive to various monitor resolution changes? Will it be insensitive
>to
>>stand alone vs embedded charts?

>>Thanks in advance for your assistance.....Rob



Wed, 18 Jun 1902 08:00:00 GMT  
 Drawing a Line between two points
Hi Rob,

Quote:
> I need a straight line of a specific
> length so I can "construct" a more complicated diagram with a series of
> pastes.  Using a series of "Series" commands won't work the way I need it
to
> work.

PMFJI

You can extend Bob's suggestion (which was the answer to your question - your
question just wasn't really your question).  You can draw pretty much any
picture/shape you want using XY lines.  For example, a diamond in a square
may be the coordinates (one series):

  X      Y
 10     10
 10     50
 50     50
 50     10
 10     10

 30     10
 10     30
 30     50
 50     30
 30     10

Note that by missing a blank, the XY line has a gap.

 Regards

 Stephen Bullen
 Microsoft MVP - Excel
 http://www.BMSLtd.co.uk



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Drawing a Line between two points

2. Drawing a Line between two points

3. Formula to draw line between to timing points

4. Draw an Average Line two colors?

5. How show/determine the value of intersection point of two line in ms-graph

6. Drawing Lines without Drawing Toolbar?

7. Bring Lines to FRONT that were drawn using Line Method

8. Bring Lines to FRONT that were drawn using Line Method

9. Bring Lines to FRONT that were drawn using Line Method

10. Bring Lines to Front that were drawn using Line Method


 
Powered by phpBB® Forum Software © phpBB Group