Focal Point
[SOLVED]Blank border with graphs

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2627046296

February 18, 2020, 12:05 PM
Frans
[SOLVED]Blank border with graphs
When creating a graph with a coloured background, there is always a white border around the frame because of this frame definition:
  
</HEAD>
<BODY BGCOLOR="ffffff">


Does anyone know how to get rid of this or how to change it?

Here's a sample
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
-DEFAULTH &WF_HTMLENCODE=OFF;
SET HTMLENCODE=&WF_HTMLENCODE

SET ARGRAPHENGINE=JSCHART
-DEFAULTH &WF_EMPTYREPORT=ON;
SET EMPTYREPORT=&WF_EMPTYREPORT

SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_ARVERSION=2;
SET ARVERSION=&WF_ARVERSION

-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0'; 
GRAPH FILE ibisamp/car
-* Created by Info Assist for Graph
SUM CAR.BODY.SEATS
BY CAR.COMP.CAR
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
INCLUDE=IBFS:/WFC/Global/Themes/Standard/Default/theme.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, ORIENTATION=LANDSCAPE, PAGESIZE=A4, $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $
*GRAPH_SCRIPT

*GRAPH_JS_FINAL
"chartFrame": {
    "fill": {
        "color": "rgba(127, 127, 127, 1)"
    }
},
"blaProperties": {
    "seriesLayout": "stacked"
},
"fill": {
    "color": "rgba(127, 127, 127, 1)"
},
"agnosticSettings": {
    "chartTypeFullName": "Bar_Stacked"
}

*END
ENDSTYLE
END
 

This message has been edited. Last edited by: Frans,


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
February 18, 2020, 04:22 PM
Hallway
The only way that I know is to add in the css in an HTMLFORM block to style the body at the end of your code
 
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
-DEFAULTH &WF_HTMLENCODE=OFF;
SET HTMLENCODE=&WF_HTMLENCODE

SET ARGRAPHENGINE=JSCHART
-DEFAULTH &WF_EMPTYREPORT=ON;
SET EMPTYREPORT=&WF_EMPTYREPORT

SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_ARVERSION=2;
SET ARVERSION=&WF_ARVERSION

-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0'; 
GRAPH FILE ibisamp/car
-* Created by Info Assist for Graph
SUM CAR.BODY.SEATS
BY CAR.COMP.CAR
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, ORIENTATION=LANDSCAPE, PAGESIZE=A4, $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $
*GRAPH_SCRIPT

*GRAPH_JS_FINAL
"chartFrame": {
    "fill": {
        "color": "rgba(127, 127, 127, 1)"
    }
},
"blaProperties": {
    "seriesLayout": "stacked"
},
"fill": {
    "color": "rgba(127, 127, 127, 1)"
},
"agnosticSettings": {
    "chartTypeFullName": "Bar_Stacked"
}

*END
ENDSTYLE
END

-HTMLFORM BEGIN NOEVAL
<style>
    body{
        background-color: rgba(127, 127, 127, 1);
    }
</style>
-HTMLFORM END
 



Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
February 18, 2020, 04:34 PM
Hallway
Or you could change it with JavaScript:
  
-HTMLFORM BEGIN NOEVAL
<script>
    document.querySelector('body').setAttribute('bgcolor', '7f7f7f');
</script>
-HTMLFORM END



Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
February 19, 2020, 08:15 AM
dbeagan
I tried PAGECOLOR with your example and it seemed to work:
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
-DEFAULTH &WF_HTMLENCODE=OFF;
SET HTMLENCODE=&WF_HTMLENCODE

SET ARGRAPHENGINE=JSCHART
-DEFAULTH &WF_EMPTYREPORT=ON;
SET EMPTYREPORT=&WF_EMPTYREPORT

SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_ARVERSION=2;
SET ARVERSION=&WF_ARVERSION

-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0'; 
GRAPH FILE ibisamp/car
-* Created by Info Assist for Graph
SUM CAR.BODY.SEATS
BY CAR.COMP.CAR
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
INCLUDE=IBFS:/WFC/Global/Themes/Standard/Default/theme.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, ORIENTATION=LANDSCAPE, PAGESIZE=A4, PAGECOLOR=RGB(127 127 127), $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $
*GRAPH_SCRIPT

*GRAPH_JS_FINAL
"chartFrame": {
    "fill": {
        "color": "rgba(127, 127, 127, 1)"
    }
},
"blaProperties": {
    "seriesLayout": "stacked"
},
"fill": {
    "color": "rgba(127, 127, 127, 1)"
},
"agnosticSettings": {
    "chartTypeFullName": "Bar_Stacked"
}

*END
ENDSTYLE
END  



WebFOCUS 8.2.06
February 19, 2020, 09:28 AM
Frans
Thanks all for your solutions!


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.