BookmarkSubscribeRSS Feed
RoyPardee
Obsidian | Level 7

This code:

 

options orientation = landscape ;
ods graphics / height = 8in width = 10in ;
%let out_folder = c:\deleteme ;
ods html5 path = "&out_folder" (URL=NONE)
         body   = "deleteme.html"
         (title = "deleteme output")
         style = magnify
         nogfootnote
         device = svg
          ;
  title1 "this is a title" ;
  proc sgplot data = sashelp.class ;
    hbox age / category = sex ;
    xaxis grid ;
    yaxis grid ;
  run ;
run ;
ods _all_ close ;

Results in a title that's cut-off:

RoyPardee_0-1608163949404.png

This behavior is consistent across chrome and firefox.

I've seen e.g., this post, but I really do want SVG output with integrated titles.

Interestingly, if I take the contents of the <svg> element & save it off to an external .svg file, I can then insert that into a powerpoint slide & the title is not cut off.

This is a bug, isn't it?

4 REPLIES 4
Reeza
Super User
What happens if you add alignment options to the Title statement, mostly out of curiosity. Looks like a bug to me at first glance.
mkeintz
PROC Star

I ran your program and viewed the html file in Chrome (87.0.4280.88), Firefox (81.0.2), and Edge ( 87.0.664.60), and could not reproduce your result.  I'm running SAS 9.4 TS Level 1M6.   "Title" completely appears in all of them.

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
RoyPardee
Obsidian | Level 7
Hmm--I'm on 1M4 right now, but do have access to a 1M6 install--will try there & see if I have different results.
RoyPardee
Obsidian | Level 7

Yep, looks like this was fixed in one of those maintenance releases. Compare:

RoyPardee_0-1608229281386.png

to:

RoyPardee_1-1608229311005.png

Huzzah!

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 4 replies
  • 960 views
  • 8 likes
  • 3 in conversation