BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Jaheuk
Obsidian | Level 7

hi,

when using "grouped colored vertical bar" chart there is no possibility to check the legend option like in other graphs.

(however it can be done in the html output, but when you re-create the graph the legend is gone).

 

Can somebody give me a coded example to I can do it hard coded ?

Even this works not with me 😞

 

Gr,

Herman

 

1 ACCEPTED SOLUTION

Accepted Solutions
ed_sas_member
Meteorite | Level 14

Hi @Jaheuk 

You can use a VBAR statement in PROC SGPLOT to create this kind of graph.

Hereafter is a blog post with meaningful examples on how to use efficiently options such as groupdisplay=cluster or stack depending on what you want.

https://blogs.sas.com/content/sascom/2011/08/22/how-to-make-a-cluster-grouped-bar-chart-graph-using-...

 

Then, this material presents how to get customized legends, and especially how to make the most of the KEYLEGEND statement:

https://blogs.sas.com/content/iml/2018/12/03/tips-customize-legends-proc-sgplot.html

 

Please do not hesitate to share some sample datalines so that we can help you build the desired graph output.

 

Hope this helps,

 

Best,

 

View solution in original post

1 REPLY 1
ed_sas_member
Meteorite | Level 14

Hi @Jaheuk 

You can use a VBAR statement in PROC SGPLOT to create this kind of graph.

Hereafter is a blog post with meaningful examples on how to use efficiently options such as groupdisplay=cluster or stack depending on what you want.

https://blogs.sas.com/content/sascom/2011/08/22/how-to-make-a-cluster-grouped-bar-chart-graph-using-...

 

Then, this material presents how to get customized legends, and especially how to make the most of the KEYLEGEND statement:

https://blogs.sas.com/content/iml/2018/12/03/tips-customize-legends-proc-sgplot.html

 

Please do not hesitate to share some sample datalines so that we can help you build the desired graph output.

 

Hope this helps,

 

Best,

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 773 views
  • 0 likes
  • 2 in conversation