Hi,
Inspired by @TeriPatsilaras post on using parameters to highlight data points, I'm using Visual Analytics 8.3 to extend her ideas to line charts. My goal is to get graph of multiple lines (set by the group category) to all be a gray or muted color, with the highlighted line (driven by a parameter as Teri outlines) a brighter color. Analogous to the "Number of Super Bowl Wins" graph in her first figure in the link above. Something like this:
Although I can replicate Teri's approach using bar charts, with line charts, I get this error: "The report object uses rules that might conflict with essential color mapping. Use the Rules pane to remove the conflicts." The rules in question are the analogue to Teri's SelectedTeamFlag display rule.
I tried another approach, creating a custom graph of two line charts overlaid, with the idea of one chart showing the muted non-selected "teams" and the other showing the selected "team" as a bright line. But here I get the error message: "The line chart encountered duplicate line classification data values and cannot be displayed." In this case, the chart with the highlighted team is not displaying.
Any suggestions for things to try? Another way to approach? Here is the effect I'm after:
Thanks so much,
Andy
It is a while since the question came up, there is a way to do this.
The beginning will be the same:
create a dropdown to select the one to highlight and put the value into a parameter
then create a new calculated item as follows:
IF ( 'Continent Name'n = 'selectedContinent'p ) RETURN '_#_' ELSE Concatenate('Continent Name'n, '_#_')
Use the new item as group element in your line chart, do not display any legend
Create a new display rule using the new calculated item: use your favorite color for the "_#_" value and some other for all the others
It is a while since the question came up, there is a way to do this.
The beginning will be the same:
create a dropdown to select the one to highlight and put the value into a parameter
then create a new calculated item as follows:
IF ( 'Continent Name'n = 'selectedContinent'p ) RETURN '_#_' ELSE Concatenate('Continent Name'n, '_#_')
Use the new item as group element in your line chart, do not display any legend
Create a new display rule using the new calculated item: use your favorite color for the "_#_" value and some other for all the others
@BrunoMueller , thank you so much for this creative solution. It worked perfectly! I really appreciate it.
Andy
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.