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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 511 views
  • 0 likes
  • 3 in conversation