Graphs in HTML format - how to change the background color (not for graphs) to white

Reply
Frequent Contributor
Posts: 134

Graphs in HTML format - how to change the background color (not for graphs) to white

Hi,

I am trying to put few graphs in an html format using ods tagsets. my problem is that the back ground (not of the graphs) is grey, how to change it to white

Snapshot is attached to this note and here is the code used:

/***********************Initializing****************************/

ods listing close;

filename odsout '\\Server\folder';

ods tagsets.htmlpanel path = odsout

                      body = "Report.html";

/**************Top Graph*************************/

goptions reset=all device=javaimg xpixels=210 ypixels=200 cback=white;

ods listing close;

ods html style=listing;

proc gkpi mode=raised;

   speedometer actual=&PERCENT_UTL. bounds=(0 .40 .60 1) /   target=.75

   lfont=(f="Albany AMT" height=.6cm) label="Graph"

   format="percent8.0";

run;

%let panelcolumns = 4;

%let panelborder = 1;

ods tagsets.htmlpanel event=panel(start);

/**************Graph Row 2 - 1************************/

goptions reset=all device=javaimg xpixels=210 ypixels=200 cback=white;

ods listing close;

ods html style=listing;

proc gkpi mode=raised;

   speedometer actual=&PERCENT_UTL_A. bounds=(0 .40 .60 1) /   target=.75

   lfont=(f="Albany AMT" height=.6cm) label="Graph"

   format="percent8.0"

TYPE=HALF;

run;

/**************Graph Row 2 - 2*************************/

goptions reset=all device=javaimg xpixels=210 ypixels=200 cback=white;

ods listing close;

ods html style=listing;

proc gkpi mode=raised;

   speedometer actual=&PERCENT_UTL_B. bounds=(0 .40 .60 1) /   target=.75

   lfont=(f="Albany AMT" height=.6cm) label="Graph"

   format="percent8.0"

TYPE=HALF;

run;

/***************code for other graphs not shown here************/

quit;

ods tagsets.htmlpanel event=panel(finish);

ods tagsets.htmlpanel close;

ods html close;

ods listing;


Dials.gif
Super Contributor
Posts: 326

Re: Graphs in HTML format - how to change the background color (not for graphs) to white

Hi,

Is this executed as a stored process?

I'm not sure if I encountered something similar wherein I need to change the background to white. But what I did was to create a template and then override the default style using proc template then use that style on my ods statement. Can you give it a try I'm not sure though if it would work.

ods path work.templat(update) sasuser.templat(read) sashelp.tmplmst(read);

        proc template;

            define style <templatename>;

            parent=styles.default;

                replace body /

                    background = white                   

                ;

            end;

        run;

Occasional Contributor
Posts: 5

Re: Graphs in HTML format - how to change the background color (not for graphs) to white

Hi ,

%let _ODSSTYLE=Festival;

Just add above statement after goptions   statement in your code it works .

goptions reset=all device=javaimg xpixels=210 ypixels=200 cback=white;

Message was edited by: Zeelan Shaik

Ask a Question
Discussion stats
  • 2 replies
  • 319 views
  • 0 likes
  • 3 in conversation