Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 300
Default Labeling points in an X-Y scatter graph?

I'm using Excel 97. I'd like to label the points in an X-Y scatter graph. I
don't want to put the data values at the points, but a text label of my own
choosing. Is this possible?

Thanks, Don <donwiss at panix.com.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Labeling points in an X-Y scatter graph?

Hi Don,

The simpliest way to do this to my reckoning is to
programmatically turn on the data labels and apply text to
them as in the example code below. Advised is that you
don't select the option to display the data labels but
instead rely on the code to do this. This way, you don't
need to have a data label for all points, only the ones of
your choosing.

The example code below uses a loop to individually turn on
and apply a month name to the first five points in the
selected series. The line ".HasDataLabel = True" turns on
the individual point and ".DataLabel.Text = Ar(i)" applies
the chosen text to the particular label (in this case an
element from an array).

Sub ChangeDataLabels()
Dim Ar As Variant, i As Integer
Ar = Array("Jan", "Feb", "Mar", "Apr", "May")
For i = 1 To 5
With ActiveSheet.ChartObjects(1).Chart. _
SeriesCollection(1).Points(i)
.HasDataLabel = True
.DataLabel.Text = Ar(i)
End With
Next
End Sub

Hope it's what you were looking for.

Regards,
Greg
-----Original Message-----
I'm using Excel 97. I'd like to label the points in an X-

Y scatter graph. I
don't want to put the data values at the points, but a

text label of my own
choosing. Is this possible?

Thanks, Don <donwiss at panix.com.
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Labeling points in an X-Y scatter graph?

Correction to my post:
I left out the declaration "Option Base 1" which should be
placed at the top of the module.

Regards,
Greg


-----Original Message-----
Hi Don,

The simpliest way to do this to my reckoning is to
programmatically turn on the data labels and apply text

to
them as in the example code below. Advised is that you
don't select the option to display the data labels but
instead rely on the code to do this. This way, you don't
need to have a data label for all points, only the ones

of
your choosing.

The example code below uses a loop to individually turn

on
and apply a month name to the first five points in the
selected series. The line ".HasDataLabel = True" turns

on
the individual point and ".DataLabel.Text = Ar(i)"

applies
the chosen text to the particular label (in this case an
element from an array).

Sub ChangeDataLabels()
Dim Ar As Variant, i As Integer
Ar = Array("Jan", "Feb", "Mar", "Apr", "May")
For i = 1 To 5
With ActiveSheet.ChartObjects(1).Chart. _
SeriesCollection(1).Points(i)
.HasDataLabel = True
.DataLabel.Text = Ar(i)
End With
Next
End Sub

Hope it's what you were looking for.

Regards,
Greg
-----Original Message-----
I'm using Excel 97. I'd like to label the points in an X-

Y scatter graph. I
don't want to put the data values at the points, but a

text label of my own
choosing. Is this possible?

Thanks, Don <donwiss at panix.com.
.

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default Labeling points in an X-Y scatter graph?

Rob Bovey has a free add-in, the XY Chart Labeler, that you can use to
add the labels:

http://www.appspro.com/utilities/Labeler.asp

Don Wiss wrote:
I'm using Excel 97. I'd like to label the points in an X-Y scatter graph. I
don't want to put the data values at the points, but a text label of my own
choosing. Is this possible?


--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

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
How can i see if two points share a coordiante in a scatter graph? cmeakin Charts and Charting in Excel 0 September 6th 09 07:11 PM
labeling data points in a scatter graph D Charts and Charting in Excel 2 July 17th 08 05:48 PM
Scatter graph, how do I show overlapping points? KieranMoran Charts and Charting in Excel 1 April 10th 07 06:58 PM
Connecting Points In An XY-Scatter Plot Graph Adam WK Charts and Charting in Excel 2 April 9th 06 07:05 PM
labeling data points on a scatter chart Mr Tee Charts and Charting in Excel 1 March 31st 06 01:15 PM


All times are GMT +1. The time now is 05:14 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"