BookmarkSubscribeRSS Feed
dishen_pancholi
Fluorite | Level 6

Hello Everyone, 

 

I have a requirement wherein I need to use one field for grouping and a separate field to color the lines. How shall I achieve this in SAS VA. I also tried creating a custom line chart using the custom graph builder but I am unable to add a 'Color' role if I have a 'Group by' role. 

 

Thanks,

Dishen

3 REPLIES 3
Madelyn_SAS
SAS Super FREQ

Which version are you using? What about using display rules to specify the individual colors? 

dishen_pancholi
Fluorite | Level 6

Hello Madelyn, 

 

I am using Viya 8.4. And i tried using display rules but it didn't work. There was no change in the graph when I defined the display rules since the color based on the group by variable takes precedence over display rules. 

acordes
Rhodochrosite | Level 12

One strategy would consist in

  1. creating a custom graph with the graph builder like a line chart with the group option but removing the automatic color option putting background color insted
  2. use the object's display rules to make the line chart color respond to conditions like comparing two variables

pic.png

 

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

Tips for filtering data sources in SAS Visual Analytics

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.

Discussion stats
  • 3 replies
  • 2002 views
  • 0 likes
  • 3 in conversation