Hi, I would like to format the datalabel without formatting the axis values. I have used a different variable to store the format, but it does not seem to work when using group=. Here is my code. proc format;
picture thousand low-high='000,009.99 K$' ;
picture thousandRound low-high='000,009' ;
run;
data TeamMap;
input id $ value & :$25. fillcolor :$8.;
datalines;
Team Atlanta CX00061c
Team Baltimore cx000d38
Team Boston CX001455
Team California CX001b71
Team Chicago CX00228d
Team Cincinnati Cx0029aa
Team Cleveland CX0030c6
Team Detroit CX0037e2
Team Houston CX003eff
Team Kansas City CX1c53ff
Team Los Angeles CX3868ff
Team Milwaukee CX557efe
Team Minneapolis CX7193ff
Team Montreal CX8da9ff
Team New York CXa9beff
Team Oakland CXc6d4ff
Team Philadelphia CXe2e9ff
Team Pittsburgh CXf6f8ff
Team San Diego CXfff6f8
Team San Francisco CXffdde4
Team Seattle CXffc3d0
Team St Louis CXffaabd
Team Texas CXff91a9
Team Toronto CXff7795
;
run;
data have;
retain Team Salary Salary_F Salary_F2;
set sashelp.baseball;
salary_F = salary;
salary_F2 = salary;
format salary_F thousand. salary_f2 thousandRound.;
run;
proc sgplot data=have dattrmap=TeamMap noautolegend;
vbar Team / response=salary_F2 datalabel=salary_F group=Team attrid=Team outlineattrs=(color=black);
xaxis discreteorder=data;
run; If I don't specify a variable, I don't have the right format but the datalabel is displayed. If I specify a variable, the datalabel is not showing unless I remove the group= option. I do need the group= option to specify the fill color using a dattrmap. Any solution that allows me to use two different formats plus a specific fill color maping is welcome.
... View more