Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Code Text Into Chart Lines?

I have 39 charts in a workbook, where data value changes
cause movement of the lines on the charts. I use text
boxes to identify some of the data lines on the charts.
But as data values change, the text boxes stay in place
while the lines move - requiring manual repositioning of
the text box. This is out of control. How can I attach
text to a data line (coding?) such that it moves with the
line?

Thanks, Phil

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default Code Text Into Chart Lines?

Phil,

Attach data labels to your chart points.

If you want to use any text, it is quite tricky to do this manually. Using code you can do something like the following:

Set seSales = ActiveSheet.ChartObjects(1).Chart.SeriesCollection (1)
seSales.HasDataLabels = True
seSales.Points(2).DataLabel.Text = "Oranges"


--

John Green - Excel MVP
Sydney
Australia


"Phil Hageman" wrote in message ...
I have 39 charts in a workbook, where data value changes
cause movement of the lines on the charts. I use text
boxes to identify some of the data lines on the charts.
But as data values change, the text boxes stay in place
while the lines move - requiring manual repositioning of
the text box. This is out of control. How can I attach
text to a data line (coding?) such that it moves with the
line?

Thanks, Phil



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Code Text Into Chart Lines?

John, Thanks for your response. I want to leave data
labels alone - they show a plotted value, say 100, 200,
etc. I would like to somehow attach text to the line that
says "Oranges". Another line could represent "Apples" etc.

Phil

-----Original Message-----
Phil,

Attach data labels to your chart points.

If you want to use any text, it is quite tricky to do

this manually. Using code you can do something like the
following:

Set seSales = ActiveSheet.ChartObjects

(1).Chart.SeriesCollection(1)
seSales.HasDataLabels = True
seSales.Points(2).DataLabel.Text = "Oranges"


--

John Green - Excel MVP
Sydney
Australia


"Phil Hageman" wrote in message

...
I have 39 charts in a workbook, where data value changes
cause movement of the lines on the charts. I use text
boxes to identify some of the data lines on the charts.
But as data values change, the text boxes stay in place
while the lines move - requiring manual repositioning of
the text box. This is out of control. How can I attach
text to a data line (coding?) such that it moves with

the
line?

Thanks, Phil



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Code Text Into Chart Lines?

Thanks, John
-----Original Message-----
That's exactly what my code does.

--

John Green - Excel MVP
Sydney
Australia


"Phil Hageman" wrote in message

...
John, Thanks for your response. I want to leave data
labels alone - they show a plotted value, say 100, 200,
etc. I would like to somehow attach text to the line

that
says "Oranges". Another line could represent "Apples"

etc.

Phil

-----Original Message-----
Phil,

Attach data labels to your chart points.

If you want to use any text, it is quite tricky to do

this manually. Using code you can do something like the
following:

Set seSales = ActiveSheet.ChartObjects

(1).Chart.SeriesCollection(1)
seSales.HasDataLabels = True
seSales.Points(2).DataLabel.Text = "Oranges"


--

John Green - Excel MVP
Sydney
Australia


"Phil Hageman" wrote in message

...
I have 39 charts in a workbook, where data value

changes
cause movement of the lines on the charts. I use

text
boxes to identify some of the data lines on the

charts.
But as data values change, the text boxes stay in

place
while the lines move - requiring manual

repositioning of
the text box. This is out of control. How can I

attach
text to a data line (coding?) such that it moves with

the
line?

Thanks, Phil



.



.

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
VBA code to chaneg axis text on a chart? Newbie Charts and Charting in Excel 2 March 25th 10 01:32 PM
In Excel 2007 chart with multiple lines, mouse doesn't track lines sfuelling Charts and Charting in Excel 1 August 19th 09 09:41 PM
Looking for code to separate one line of text into multiple lines in Excel [email protected] Excel Worksheet Functions 1 February 13th 07 12:59 AM
Vertical Lines on the Lines on 2 Axes Chart [email protected] Charts and Charting in Excel 3 March 3rd 06 04:14 AM
Pie chart with 'anchored' lines to text box TOMB Charts and Charting in Excel 0 May 4th 05 09:14 PM


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

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

About Us

"It's about Microsoft Excel"