Hi, below is simple example of proc gplot that finally create html file test.html on some folder on server:
ODS tagsets.htmlpanel device=png body="...test.html";
proc gplot data=sashelp.class;
plot height*weight / vaxis=axis1;
axis1 label=(angle=90 "please change angle");
run;
ODS tagsets.htmlpanel close;
Graphic in html file is correctly presented only in IE browser, because ActiveX is mandatory for Charts representing.
But I'd like to open the Chart in Firefox, for example. So can I somehow convert this graphic(chart) to Image(png,gif) on fly, to make it possible see the Chart image in Firefox?Probably should be applied some ods options etc...
Thanks!
Try using 'goptions device=actximg;' rather than device=activex.
Or, if you're not really utilizing any of activex's special features, I'd suggest using device=png.
Hi Robert,
Thanks for your advice, In my example I put png device as one of ODS option, but looks like I should initialize device option in goption statement.
So now in EG it works correct but when I try open it manually from server - Chart isn't presented there, becouse Chart image stored in EG SAS work session instead of folder on server that I mentioned in ODS body option...
So I will try to redirect(or just copy) chart image from WORK library to needed folder on server, or may be there are some better solution?
Thanks!
Hopefully someone familiar with EG will respond!
Hi again,
Actually this SAS code will run in STP session, so I'll be able use _webout instead of hardcoded html file on server, but I've just checked and looks like problem still actual...
Strange that png file with Chart stores in different folder that I set in body option of ODS statement.
But anyway, thanks for help:)!
Hi Again,
I fixed the problem using ODS options path and file, also I made small corrections of target html file afterwords(Firefox form path to image differ than IE), -replace absolute path to png image to relative ... src="gplot.png".
Thanks!
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!
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.