BookmarkSubscribeRSS Feed
PaigeMiller
Diamond | Level 26

If users don't have the access to the server, you'd have to send them the .html file and the graphs (.png or .gif or .jpg files) that are created.

 

As stated, exporting is not a step in this process.

--
Paige Miller
Ahsan
Calcite | Level 5
they have tooltip in the html. I did converted to jpg file but how i can't add tooltip feature in it.
Reeza
Super User

JPEGs don't have tool tips, the web page/HTML file can have tool tips. 

 

 

Ahsan
Calcite | Level 5

The code does successfully generate a map

in a SAS Report format. Then i tried opening the SAS report and using SAS EG

"Export" or "Send To" to generate an HTML file I can share with others.

I'm able to create an HTML file but it doesn't display the map.  Any help would be appreciated.

 

Thank You

 

PaigeMiller
Diamond | Level 26

As I stated earlier, using the ODS HTML command properly will generate the html file and the proper GIF/JPG/PNG file with the image. There is no need to Export anything.

 

Also, you state:

 

I'm able to create an HTML file but it doesn't display the map.

 

Several times I have had to ask for details, but each new piece information contains no detail at all to help us understand what is happening. Can we have the details (SAS Code, SAS LOG, and anything else that is relevant) from now on without asking?

 

 

--
Paige Miller
Ahsan
Calcite | Level 5
Please see the code
/* -------------------------------------------------------------------
Code generated by SAS Task

Generated on: Thursday, May 4, 2017 at 1:08:28 PM
By task: Map Chart

Map Data: SASApp:MAPSGFK.US_COUNTIES Response Data: SASApp:WORK.ADDCOUNTYID Server: SASApp
------------------------------------------------------------------- */

%_eg_conditional_dropds(WORK.MAPCHARTMAPPREP);
PROC SQL;
CREATE VIEW WORK.MAPCHARTMAPPREP AS
SELECT *
FROM MAPSGFK.US_COUNTIES
WHERE STATECODE = 'NC'
;
QUIT;

%_eg_conditional_dropds(WORK.MAPCHARTRESPONSEPREP);
PROC SQL;
CREATE VIEW WORK.MAPCHARTRESPONSEPREP AS
SELECT *
FROM WORK.deviations_by_county
;
QUIT;

GOPTIONS CBACK=
;

PATTERN1 VALUE=SOLID COLOR=CX99CC00;
PATTERN2 VALUE=SOLID COLOR=WHITE;
PATTERN3 VALUE=SOLID COLOR=YELLOW;
PATTERN4 VALUE=SOLID COLOR=CXFF6600;
PATTERN5 VALUE=SOLID COLOR=RED;

LEGEND1
DOWN=5
FRAME
LABEL=( FONT='Times New Roman' HEIGHT=14pt JUSTIFY=LEFT "Light green counties have unusually LOW per enrollee spending. "
FONT='Times New Roman' HEIGHT=14pt JUSTIFY=LEFT "White counties have spending per enrollee that is within plus or minus one standard deviation from the mean. "
FONT='Times New Roman' HEIGHT=14pt JUSTIFY=LEFT "Yellow, orange, and red counties have unusually HIGH per enrollee spending.")
;

TITLE;FOOTNOTE;

TITLE1 "NEMT Per Medicaid Enrollee Spend by County";
TITLE2 "Standard Deviations Above or Below Average";

FOOTNOTE1 "";

ods html5 body="test.htm"
(title="NEMT spending by county") style=htmlblue

/* this successfully creates a test.htm file in the EXMAP library, but the file is blank,
and this isn't the destination I actually want anyway*/
path="/sas/RA/nc_dhhs/OIA/ContinuousAudit/ContinuousAuditShared/CommonResources/ExampleMapProject"

/*I'm trying to export to desktop using either of the paths below but it's not working yet. */
/*path="/sas/sas94/sas94config/Lev5/SASApp"*/
/*path="//trvwcfs02/NC_SAS_PROD/bwhite6/Desktop/_sas_sas94_sas94config_Lev5_SASApp_test_htm.html"*/
(url=none);
ods html5 close;
/* while the HTML files don't work, this code does successfully generate a map
in a SAS Report format. I then tried opening the SAS report and using SAS EG
"Export" or "Send To" to generate an HTML file I can share with others.
I'm able to create an HTML file but it doesn't display the map. */

PROC GMAP GOUT=MAPCHART DATA=WORK.MAPCHARTRESPONSEPREP MAP=WORK.MAPCHARTMAPPREP ALL;
ID STATE COUNTY;
choro Deviations /
WOUTLINE=1
CDEFAULT=BLACK
DISCRETE
LEGEND=LEGEND1 html=tooltip
;
RUN;
QUIT;

TITLE;FOOTNOTE;

GOPTIONS RESET=LEGEND;

GOPTIONS RESET=PATTERN;

GOPTIONS CBACK=;

%_eg_conditional_dropds(WORK.MAPCHARTRESPONSEPREP);
%_eg_conditional_dropds(WORK.MAPCHARTMAPPREP);

/* -------------------------------------------------------------------
End of task code
------------------------------------------------------------------- */
Also html has toolkit option which I believe we don't have in any other format.


PaigeMiller
Diamond | Level 26

In my earlier reply, I specifically provided coded that also used the GPATH option, and it should point to the exact same folder as the PATH= option.

 

Also I use the FILE= option instead of the BODY= option, I don't know if this makes a difference or not.

--
Paige Miller
GraphGuy
Meteorite | Level 14

By default, I believe most versions of SAS Enterprise Guide create activex output, when you submit SAS/Graph procedures (such as Proc Gplot, GChart, and Gmap). Some users like activex output, as it tends to be somewhat 'interactive' (with mouse-over text, and allowing users to sometimes change various things about the graphs on-the-fly).

 

In recent years, activex has fallen out-of-favor (it might be a security risk, and everyone must install activex 'stuff' to view the output, the SAS/Graph activex control doesn't support all the SAS/Graph features, etc).

 

I would recommend using png output. This supports all the SAS/Graph functionality, and anyone can view a png file (without having to install anything). Here's a help page that describes how to change the Enterprise Guide output from the default: http://support.sas.com/kb/44/010.html

 

You mentioned that you want mouse-over text for your graphs. In order to do that with non-activex output (such as png), you'll need to do a few things manually in your code (such as creating a special variable containing html 'alt' tags with the desired text, and then pointing to that variable with the Procs' html= option). And then when you make the output available to your users, you'll need to make the png and html file available on a web server, or use the new html5 stuff.

 

Ahsan
Calcite | Level 5

Please see the code
/* -------------------------------------------------------------------
Code generated by SAS Task

Generated on: Thursday, May 4, 2017 at 1:08:28 PM
By task: Map Chart

Map Data: SASApp:MAPSGFK.US_COUNTIES Response Data: SASApp:WORK.ADDCOUNTYID Server: SASApp
------------------------------------------------------------------- */

%_eg_conditional_dropds(WORK.MAPCHARTMAPPREP);
PROC SQL;
CREATE VIEW WORK.MAPCHARTMAPPREP AS
SELECT *
FROM MAPSGFK.US_COUNTIES
WHERE STATECODE = 'NC'
;
QUIT;

%_eg_conditional_dropds(WORK.MAPCHARTRESPONSEPREP);
PROC SQL;
CREATE VIEW WORK.MAPCHARTRESPONSEPREP AS
SELECT *
FROM WORK.deviations_by_county
;
QUIT;

GOPTIONS CBACK=
;

PATTERN1 VALUE=SOLID COLOR=CX99CC00;
PATTERN2 VALUE=SOLID COLOR=WHITE;
PATTERN3 VALUE=SOLID COLOR=YELLOW;
PATTERN4 VALUE=SOLID COLOR=CXFF6600;
PATTERN5 VALUE=SOLID COLOR=RED;

LEGEND1
DOWN=5
FRAME
LABEL=( FONT='Times New Roman' HEIGHT=14pt JUSTIFY=LEFT "Light green counties have unusually LOW per enrollee spending. "
FONT='Times New Roman' HEIGHT=14pt JUSTIFY=LEFT "White counties have spending per enrollee that is within plus or minus one standard deviation from the mean. "
FONT='Times New Roman' HEIGHT=14pt JUSTIFY=LEFT "Yellow, orange, and red counties have unusually HIGH per enrollee spending.")
;

TITLE;FOOTNOTE;

TITLE1 "NEMT Per Medicaid Enrollee Spend by County";
TITLE2 "Standard Deviations Above or Below Average";

FOOTNOTE1 "";

ods html5 body="test.htm"
(title="NEMT spending by county") style=htmlblue

/* this successfully creates a test.htm file in the EXMAP library, but the file is blank,
and this isn't the destination I actually want anyway*/
path="/sas/RA/nc_dhhs/OIA/ContinuousAudit/ContinuousAuditShared/CommonResources/ExampleMapProject"

/*I'm trying to export to desktop using either of the paths below but it's not working yet. */
/*path="/sas/sas94/sas94config/Lev5/SASApp"*/
/*path="//trvwcfs02/NC_SAS_PROD/bwhite6/Desktop/_sas_sas94_sas94config_Lev5_SASApp_test_htm.html"*/
(url=none);
ods html5 close;
/* while the HTML files don't work, this code does successfully generate a map
in a SAS Report format. I then tried opening the SAS report and using SAS EG
"Export" or "Send To" to generate an HTML file I can share with others.
I'm able to create an HTML file but it doesn't display the map. */

PROC GMAP GOUT=MAPCHART DATA=WORK.MAPCHARTRESPONSEPREP MAP=WORK.MAPCHARTMAPPREP ALL;
ID STATE COUNTY;
choro Deviations /
WOUTLINE=1
CDEFAULT=BLACK
DISCRETE
LEGEND=LEGEND1 html=tooltip
;
RUN;
QUIT;

TITLE;FOOTNOTE;

GOPTIONS RESET=LEGEND;

GOPTIONS RESET=PATTERN;

GOPTIONS CBACK=;

%_eg_conditional_dropds(WORK.MAPCHARTRESPONSEPREP);
%_eg_conditional_dropds(WORK.MAPCHARTMAPPREP);

/* -------------------------------------------------------------------
End of task code

 

where do you think i should change the code.

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