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 2025: Register Now

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!

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
  • 1340 views
  • 0 likes
  • 3 in conversation