Data visualization with SAS programming

Scaling HTML output graph as per laptop/desktop size.

Reply
New Contributor
Posts: 4

Scaling HTML output graph as per laptop/desktop size.

Hello everyone,

 

I have created a graph through sgplot which is going to a dashboard (linked via my stored procedure).

The problem is dashboard is designed using XML/html coding. they have specified width of graph as percentage of screen size.

 

I need to do something that my graph automatically changes width as per space allotted. (height is pretty much constant as it is defined in pixels). you have, probably, already guessed what issues arises when I give dimensions for desktop monitor and someone access the dashboard via laptop. (edges goes off and scrolling is needed to see the whole graph).

 

I tried Imagefmt=svg in ods graphics. (didn't work).

 

any advice on how to define graph size to fit the space allotted in dashboard is highly appreciated. 

 

regards

Ankit

 

Super User
Posts: 13,023

Re: Scaling HTML output graph as per laptop/desktop size.

Posted in reply to Ankit_ETL

You might try setting the image height and width dimensions in the ODS Graphics statement using the PCT or % unit.

 

ods graphics /height=60pct width=80pct;

 

or similar.

 

I won't claim to have used that as most of my output goes to RTF.

New Contributor
Posts: 4

Re: Scaling HTML output graph as per laptop/desktop size.

thanks for the reply. appreciate it.
that was the first thing I tried but that doesn't work.
I think (not sure) height =xxpct is xx% of the default height and not % of allotted space in dashboard
Ask a Question
Discussion stats
  • 2 replies
  • 137 views
  • 0 likes
  • 2 in conversation