You might want to use an AXISTABLE here instead of a BLOCKPLOT to create this table. AXISTABLES can do exactly what you asked, but as @Ksharp said, we need a little more information to determine if that solution will wrk for you.
I want font color in table same as font color in plot.
code:
As DanH_sas said try XAXISTABLE . Here is an example for proc sgplot, but you could find the similar statement in GTL.
data cars;
set sashelp.cars;
run;
proc sql;
create table have as
select origin,type,sum(invoice) as invoice,count(*) as count
from cars
group by origin,type;
quit;
proc sgplot data=have;
series x=type y=invoice/group=origin markers markerattrs=(symbol=circlefilled);
keylegend /location=inside position=ne across=1;
xaxistable count/x=type class=origin colorgroup=origin;
run;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.