SeriesLines Members
Use the SeriesLines
object to control the appearance of the lines connecting series on 2-D stacked bar and column charts. Use the ChartGroup
object’s SeriesLines
property to get a reference to this object. The SeriesLines
object has the following members:
Application |
Border |
Creator |
Delete |
Name |
Parent |
Select |
Set the HasSeriesLines
property to True before using the SeriesLines
object. You change the appearance of series lines through the Border
property, as shown here:
Sub ChangeSeriesLines( ) Dim chrt As Chart, cg As ChartGroup, sl As SeriesLines ' Get the chart Set chrt = ActiveChart chrt.ChartType = xlColumnStacked ' Get the chart group. Set cg = ActiveChart.ChartGroups(1) ' Turn on series lines cg.HasSeriesLines = True Set sl = cg.SeriesLines ' Use dashed line. sl.Border.LineStyle = 2 ' Make the lines bold. sl.Border.Weight = 4 End Sub
Tip
Use the Series
object to change the lines plotted on a chart. Series lines apply to the lines connecting series on only 2-D column and bar charts.
Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.