excel - Labeling the last point of series -
i have code changes last point in every series on chart legend name. however, not want last point of first 4 series change legend name. have suggestions altering code skip first 4 series , label last point of every series?
for each mysrs in activechart.seriescollection 'change function every series after series 4 changes ast point mysrs npts = .points.count mysrs.points(npts).applydatalabels _ type:=xldatalabelsshowvalue, _ autotext:=true, legendkey:=false mysrs.points(npts).datalabel.text = mysrs.name mysrs.points(npts).datalabel.orientation = 90 mysrs.points(npts).datalabel.font.bold = true end next
a chart series
in excel has property called plotorder
tells order in each series plotted on chart. check property in loop , continue if it's > 4
. example:
for each mysrs in activechart.seriescollection mysrs if .plotorder > 4 npts = .points.count .... end if end next
Comments
Post a Comment