BookmarkSubscribeRSS Feed
andypandy_swe
Obsidian | Level 7

I'd like to control the tooltip in a barchartparm.

I can manage "[text of my choice]=[valueofmychoice]" and "=[valueofmychoice" but not just "[valueofmychoice]" without the equals sign. Is there a way to do this?

Beeing able to display part of the value as bold would be a bonus...

 

I found some discussions online but the reply stating that it was not possible was kind of old...

 

/Andreas  

6 REPLIES 6
Rick_SAS
SAS Super FREQ

Can you show some sample code? It is not clear if you are using the graph template language, an SG procedure, or an older SAS/GRAPH procedures.

andypandy_swe
Obsidian | Level 7
Sample code would be complex... But I'm using SAS GTL.

Creating a character variable in the data using the percentage, nominator and denominator looking something like this: "10% (1 out of 10)"
I send it to my template in a dynamic called "_tipvalue1_" and the template uses it in a barchartparm:

layout overlay /
xaxisopts=( display=( tickvalues ) type=linear GRIDDISPLAY=ON linearOpts=(tickValueList=_tickValueList_ TICKVALUEPRIORITY=TRUE) )
yaxisopts=( type=discrete display=(label) labelposition=top label=_yAxisLabel_Graph_ );
BarChartParm X=_bar_ Y=_measure_ /
primary=true
orient=horizontal
Group=_group_
Groupdisplay=cluster
LegendLabel=""
NAME="BARS"
BaseLineAttrs=( Thickness=0)
displayZeroLengthBar=true
rolename=(tip1=_tipvalue1_ tip2=_tipvalue2_)
tip=(tip1 tip2)
tiplabel=(tip1=_tiplabel1_ tip2=_tiplabel2_)
datatransparency=0.07
barwidth=0.9;
endlayout;

I'd like to be able to skip the tiplabel and only present "10% (1 out of 10)" in the mouseover. Not "[tiplabel]=10% (1 out of 10)"
andypandy_swe
Obsidian | Level 7
I can set the tiplabel dynamic to ' ' but then i get "=10% (1 out of 10)". I can't find a way to get rid of the equals sign.
Rick_SAS
SAS Super FREQ

I do not think you can get rid of the equal sign. I see nothing in the documentation that indicates that you can customize the details of the tool tips.

andypandy_swe
Obsidian | Level 7
No, I couldn't find it either. Figured someone might have a trick up their sleeve. I'll have to tell the client it can't be done.
GraphGuy
Meteorite | Level 14

I don't know of a way to get rid of the '=' in the tooltip in GTL or ODS Graphics. This would be a useful feature to request for possible implementation in the future.

 

(You can do it in SAS/Graph procs, such as proc gplot, ... but you're using GTL / ODS Graphics.)

 

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 6 replies
  • 1318 views
  • 0 likes
  • 3 in conversation