I am trying to add a reference line to each bar in SAS GTL. I know I have target= in barchartparm but I need to customize the line to dashed, which I can not find anyway to do that in barchartparm.
I tried scatterplot and symbolchar to overlay a "DASHED LINE" unicode but the issue is the unicode I used is not vertical centered. It cannot be placed right at the data point. I tried vertical offset to fix it then another issue is in the legend, the same symbol char was used but if I changed the size of the symbol in legend it resulted in so much space in the legend box then the figure became too long.
I wanna ask are there some other way to get around this? or some magical normal dashed line unicode that I can use? I searched so many some just gave me a empty box which I do not understand why.
Thank you so much for your help!
Here are the part of the code:
proc template;
define statgraph &st.&yr.&pp.TopBox;
BeginGraph / DesignWidth = &Height.in ;
symbolchar name=line char='2508'x /voffset= 0.39 ;
symbolchar name=linelengend char='2508'x /voffset= 0.3;
discreteattrmap name = "line";
Value "1" /markerattrs=(symbol=line color=black size = 0.8in);
enddiscreteattrmap;
discreteattrvar attrvar = drawline var = line attrmap = "line";
legenditem type = marker name= "XXXX" / label="XXXX"
markerattrs = (Symbol = linelengend Color = black Size = 0.4in);
Layout Overlay / XXXXX ;
/* Create Bars */
BarChartPARM x = XXXX y = XXXXX / Group = PlanColor
GROUPORDER= reversedata
GroupDisplay = Cluster
CLUSTERWIDTH = 0.5
Orient = vertical
DataSkin = &DataSkin.
/* DATALABEL = XXXX*/
/* DISCRETEOFFSET = -0.2*/
datalabelattrs=(size=10 weight=bold)
ERRORLOWER = Lower_CI
ERRORUPPER = Upper_CI
/* target = XXXX*/
;
ScatterPlot x = XXXXX y = XXXXX / Group = drawline
GROUPORDER = reversedata
GroupDisplay = Cluster
/* DATALABEL = XXXXX*/
;
DiscreteLegend "XXX" / Border = Yes
ValueAttrs = (Family = "Calibri" Color = Black Size = 10)
;