Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2
Default Accessing Points in a Line Chart

This is a cross post, as I had been pointed to this group and an alt. after
I had posted originally. Hoping this one can help.

How do I access the Points in a Chart of type Line? I'm wanting to display
the Values at each point and modify various aspects like size and color. So
far I have not found the proper combination of properties to access these
point, and the access method is different for every chart type. Any ideas?

I guess what I'm really asking is how do I access the Point Labels on a Line
Chart.


  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,489
Default Accessing Points in a Line Chart

Hi,

Using the macro record generated this code when changing 2 points on a
line series.

You can edit the code to get rid of all the select/selection stuff.


ActiveChart.SeriesCollection(1).Select
ActiveChart.SeriesCollection(1).Points(3).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlAutomatic
End With
With Selection
.MarkerBackgroundColorIndex = 6
.MarkerForegroundColorIndex = 3
.MarkerStyle = xlCircle
.MarkerSize = 9
.Shadow = False
End With
ActiveChart.SeriesCollection(1).Points(5).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlAutomatic
End With
With Selection
.MarkerBackgroundColorIndex = xlAutomatic
.MarkerForegroundColorIndex = xlAutomatic
.MarkerStyle = xlTriangle
.MarkerSize = 5
.Shadow = False
End With

Cheers
Andy

Techno_Dex wrote:
This is a cross post, as I had been pointed to this group and an alt. after
I had posted originally. Hoping this one can help.

How do I access the Points in a Chart of type Line? I'm wanting to display
the Values at each point and modify various aspects like size and color. So
far I have not found the proper combination of properties to access these
point, and the access method is different for every chart type. Any ideas?

I guess what I'm really asking is how do I access the Point Labels on a Line
Chart.



--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2
Default Accessing Points in a Line Chart

Correct me if I'm wrong, but it this code looks like it's modifying the
Markers, not the Labels/Values that those Markers represent? (i.e. If the
first Marker is a value of 5.4, will this code actuallly set the
background/forground color for the value 5.4 or does it set the
background/forground color for the Circle/Triangle Marker that represents
the point 5.4)



"Andy Pope" wrote in message
...
Hi,

Using the macro record generated this code when changing 2 points on a
line series.

You can edit the code to get rid of all the select/selection stuff.


ActiveChart.SeriesCollection(1).Select
ActiveChart.SeriesCollection(1).Points(3).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlAutomatic
End With
With Selection
.MarkerBackgroundColorIndex = 6
.MarkerForegroundColorIndex = 3
.MarkerStyle = xlCircle
.MarkerSize = 9
.Shadow = False
End With
ActiveChart.SeriesCollection(1).Points(5).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlAutomatic
End With
With Selection
.MarkerBackgroundColorIndex = xlAutomatic
.MarkerForegroundColorIndex = xlAutomatic
.MarkerStyle = xlTriangle
.MarkerSize = 5
.Shadow = False
End With

Cheers
Andy

Techno_Dex wrote:
This is a cross post, as I had been pointed to this group and an alt.
after I had posted originally. Hoping this one can help.

How do I access the Points in a Chart of type Line? I'm wanting to
display the Values at each point and modify various aspects like size and
color. So
far I have not found the proper combination of properties to access these
point, and the access method is different for every chart type. Any
ideas?

I guess what I'm really asking is how do I access the Point Labels on a
Line Chart.



--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info



  #4   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 1,071
Default Accessing Points in a Line Chart

Yes, you are correct. But, given that Andy told you how he got the
necessary code, you could have done the same with the data label. Use the
macro recorder (Tools | Macro Record new macro...), edit the data label
using the GUI, turn off the recorder, and switch to the VBE. XL will give
you the appropriate code.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article , nospamchurst@osi-
corp.com says...
Correct me if I'm wrong, but it this code looks like it's modifying the
Markers, not the Labels/Values that those Markers represent? (i.e. If the
first Marker is a value of 5.4, will this code actuallly set the
background/forground color for the value 5.4 or does it set the
background/forground color for the Circle/Triangle Marker that represents
the point 5.4)



"Andy Pope" wrote in message
...
Hi,

Using the macro record generated this code when changing 2 points on a
line series.

You can edit the code to get rid of all the select/selection stuff.


ActiveChart.SeriesCollection(1).Select
ActiveChart.SeriesCollection(1).Points(3).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlAutomatic
End With
With Selection
.MarkerBackgroundColorIndex = 6
.MarkerForegroundColorIndex = 3
.MarkerStyle = xlCircle
.MarkerSize = 9
.Shadow = False
End With
ActiveChart.SeriesCollection(1).Points(5).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlAutomatic
End With
With Selection
.MarkerBackgroundColorIndex = xlAutomatic
.MarkerForegroundColorIndex = xlAutomatic
.MarkerStyle = xlTriangle
.MarkerSize = 5
.Shadow = False
End With

Cheers
Andy

Techno_Dex wrote:
This is a cross post, as I had been pointed to this group and an alt.
after I had posted originally. Hoping this one can help.

How do I access the Points in a Chart of type Line? I'm wanting to
display the Values at each point and modify various aspects like size and
color. So
far I have not found the proper combination of properties to access these
point, and the access method is different for every chart type. Any
ideas?

I guess what I'm really asking is how do I access the Point Labels on a
Line Chart.



--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info




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
Line chart or scatter chart?? rmellison Excel Discussion (Misc queries) 0 September 9th 05 10:31 AM
Accessing values in points collection of chart & conditional display nnj Charts and Charting in Excel 1 August 3rd 05 10:29 PM
Activating a Chart object Hari Prasadh Charts and Charting in Excel 6 August 2nd 05 07:22 PM
Label an average line in a dynamic chart John Cordes Charts and Charting in Excel 3 June 17th 05 09:42 AM
Missing values in Excel Line Chart mw55309 Charts and Charting in Excel 1 January 19th 05 12:10 PM


All times are GMT +1. The time now is 05:31 AM.

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"