I assume the place to change the color of the bars in on the right side, Fill...
but when I clicked on those squares, nothing happened...
It looks like you have only two group values, so the only color buttons that apply are the first two. It looks like your chart is using those two colors, although the graph colors look a bit lighter. Have you adjusted the transparency setting?
-------------------------------------------------------------------------
Four tips to remember when you contact SAS Technical Support
Tricks for SAS Visual Analytics Report Builders
SAS Visual Analytics Learning Center
Thank you for your feedback. Yes, I only have 2 groups and the colors being used are the first two. But I dont want these two colors, how can I change it? Or at least, i want to switch the color of the two groups.
You don't say which version you are using but the steps should be the same for any version. To change the color for the two groups, click the first two color buttons to open the palette. So, here I am changing the first color from red to purple. Are these steps not working for you? If the color palette is not opening for you at all, make sure that your browser is zoomed to 100%. If that is not an issue, then log out and try in a new session. Finally, which browser are you using? Can you try with a different supported browser?
-------------------------------------------------------------------------
Four tips to remember when you contact SAS Technical Support
Tricks for SAS Visual Analytics Report Builders
SAS Visual Analytics Learning Center
i got your point. i guess it works. will try it later... now out of office... thanks!
I’m not sure if you want to change the colors by groups or if you want to change the colors by bars. But I was trying to find out how to change the colors of specific bars and I got it. So I’ll share, hoping it could help.
Before I explain, I must say that I’m using SAS VA in Brazilian Portuguese. So, the references to buttons names could be a little different.
Now, going to the point, if you want to change the colors of specific bars you’ll have to:
I hope it could help somebody!
Thank you for putting this. It was also my question how to change colors per bar. I understood that for every bar you have to add a new rule? Then there are a lot of rules you need to add. I hoped there is an easier way.
To have different colours in you bar chart, you have to group the items accordingly. To group you create a new data item --> custom category and you create as many groups as you need for you column. Then you add bar chart, choose you new custom category as group. Then the bars will be in different colours. I hope it helps.
Correct! I am also finding answer to this question. The question is - There are two colors in the graph for bars - blue and red. Now I want to change these colors. What is the way to change these colors? Is there is some option somewhere where I can use something like colors = (gray, green) etc.? Thanks in advance.
- Dr. Abhijeet Safai
I got the answer at least to my question. Thanks to my colleague Akash Kadam.
First let me share that my question was not related to SAS Viya but it was related to Base SAS.
I used following code in the programme 'inside' proc sgplot and the issue was solved.
styleattrs datacontrastcolors=(black) datacolors = (lightgray gray);
Yes, it was that simple. Thanks. Thanks to Akash once again!
- Dr. Abhijeet Safai
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.