BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Does anyone out there have any experience with using "HTML_LEGEND=" ?
3 REPLIES 3
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Found several hits on the SAS support website http://support.sas.com when using the Google advanced search argument below:

+"HTML_LEGEND" site:sas.com

Here is one SUGI/SGF technical paper with reference to this topic area:

http://www2.sas.com/proceedings/sugi28/149-28.pdf


Scott Barry
SBBWorks, Inc.
deleted_user
Not applicable
Ok,

Here's mine.

I am experimenting with drill down today.
Using html= works as expected, no problems, simple.
Using html_legend= is not so nice.

So that I have a complete legend of all potential values, I want to use explicit midpoints
midpoint=(1 2 3 4 5 6 7 😎

Well, if I have only 2 actual data values in the data=dataset, then I get a nasty error because there is nothing to associate with the other 6 values.

So, what works?
2 data values, 2 gmap areas, 2 midpoints -- html_legend works fine.
3 values: 2 real data values (1 2), 1 dummy value = 3, 3 gmap areas (a b z, where z is 0x0x0x0); 3 midpoints (1 2 3) works fine.
4 values: 2 real (1 2), 2 dummy (3 4); 3 gmap areas (a b z) -- aha weirdness.

legend 1 works, legend 2 works, legend 3 works, legend 4 does not transform to a hand, and so I can't click on it and open up its description page.

This weirdness holds for 5 and 6.
When I try to include value "7" the program breaks with the nasty error.

Using proc GMAP, SAS 9.1.3 on Windows XP.

I changed the experimental program to use z1 through z6 as dummy areas of size 0 (x=0; y=0;) for the remainder of the values, and we have a winner.

I found an additional annoyance.
All observations in the data=dataset have to have the correct link associated with its value. That is if ldrill is the html_legend= variable; then, even if I have an observation with z_value=1; label='z1'; and ldrill='href="value1.txt"'; for a place holder, and then later in the dataset there is a record with z_value=1; label='a '; and ldrill=''; then the legend drill does not work.

Aha, another annoyance.
Putting the dummy records first makes html= to not work properly. The dummy records so that I can have the legend work, have to come after the real data observations.

But, a good thing:
You don't have to use x=0; y=0; four times to create the dummy area.

x=0; y=0;
label='z1'; output;
label='z2'; output;
label='z3'; output;
label='z4'; output;
label='z5'; output;
label='z6'; output;
label='z7'; output;
label='z8'; output;

works well enough

null Message was edited by: Chuck
GraphGuy
Meteorite | Level 14

This one's a bit old (~4 years), but just wanted to mention that several html_legend problems have been fixed in v9.2 and v9.3.  You will probably find that what you were trying to do works now Smiley Happy

If you can still reproduce the problem in 9.3, please send me some sample code, and I'll enter a bug on it.

Thanks!

Robert

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

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