Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Line chart or scatter chart?? | Excel Discussion (Misc queries) | |||
Accessing values in points collection of chart & conditional display | Charts and Charting in Excel | |||
Activating a Chart object | Charts and Charting in Excel | |||
Label an average line in a dynamic chart | Charts and Charting in Excel | |||
Missing values in Excel Line Chart | Charts and Charting in Excel |