The SAS Output Delivery System and reporting techniques


Not applicable
Posts: 0


Does anyone out there have any experience with using "HTML_LEGEND=" ?
Super Contributor
Super Contributor
Posts: 3,176

Re: HTML_LEGEND=variable

Posted in reply to deleted_user
Found several hits on the SAS support website when using the Google advanced search argument below:


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

Scott Barry
SBBWorks, Inc.
Not applicable
Posts: 0

Re: HTML_LEGEND=variable

Posted in reply to deleted_user

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 8)

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=0Smiley Wink 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
SAS Employee
Posts: 1,050

Re: HTML_LEGEND=variable

Posted in reply to deleted_user

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.



Ask a Question
Discussion stats
  • 3 replies
  • 3 in conversation