Focal Point
[SOLVED] Banner with background color in the heading of a chart

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

October 09, 2019, 03:49 PM
BI Dev
[SOLVED] Banner with background color in the heading of a chart
Hi,

I am trying to create a blue background color for heading of a chart. I have 2 lines in my heading like
"Profit Amount is $100K"
"Budget Amount is $ 20K"
when I give the background color in the style sheet, It just colors the background till the end of these lines. But, I would like to extend this background color through the width of the chart like a banner. Is it possible to do some styling within in the chart to achieve this?? Please let me know if you have any inputs on this. Thank you.

Note: I tried using &|nbsp to add space, then the heading background color is not uniform. It is like having two separate lines with color or I might be missing something with &|nbsp.

Regards
BI DEV

This message has been edited. Last edited by: FP Mod Chuck,


Webfocus 8105/8202
Windows
All Outputs
October 10, 2019, 06:47 AM
Frans
You could try HEADALIGN=BODY, in your styling


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
October 10, 2019, 11:53 AM
Les J
Try COLSPAN=(# of columns in your report).


WebFOCUS 8

Windows, All Outputs
October 10, 2019, 04:00 PM
BI Dev
Frans,

It did not work for extending the background coloring of the HEADING of a CHART till the end of the chart.

quote:
Originally posted by Frans:
You could try HEADALIGN=BODY, in your styling



Webfocus 8105/8202
Windows
All Outputs
October 12, 2019, 02:04 PM
BI Dev
Is there a way to achieve this using an external css in the graph and use a css class for the heading? or Should I use HTML form?

This message has been edited. Last edited by: BI Dev,


Webfocus 8105/8202
Windows
All Outputs
October 14, 2019, 04:51 PM
Doug
Please show all of your "TYPE=HEADING" lines in your style section. For this, all you should need is "TYPE=HEADING, BACKCOLOR=RGB(170 200 230), $". comment out, or delete, the rest of the "TYPE=HEADING" lines
October 16, 2019, 07:00 PM
Hallway
You can use an external css sheet or just use an HTMLFORM block to add in the one css property.

You will need to make sure that you have SET EMBEDHEADING=OFF included in the top of the fex. Otherwise it will be a foriegn object within the svg of the graph. by setting it to OFF, it created the title as a div that is 100% wide right above the graph. Then you can style that div with the css. See the example below:
ENGINE INT CACHE SET ON
SET PAGE-NUM=OFF

SET EMBEDHEADING=OFF

GRAPH FILE CAR
SUM SALES
BY CAR
HEADING
"Profit Amount is $100K"
"Budget Amount is $20K"
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET AUTOFIT ON
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET STYLE *
*GRAPH_SCRIPT

setPieDepth(0);
setPieTilt(0);
setDepthRadius(0); 
setPlace(true); 
setCurveFitEquationDisplay(false); 

*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/endeflt.sty,$
TYPE=HEADING, JUSTIFY=CENTER, $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $
*GRAPH_SCRIPT

setReportParsingErrors(false);
setSelectionEnableMove(false);

*END
ENDSTYLE
END

-RUN

-HTMLFORM BEGIN NOEVAL
<head>
    <style>
        body > div:nth-child(1) {
            background-color:#ff0000;
        }
    </style>
</head>    
-HTMLFORM END  



Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
October 17, 2019, 03:05 PM
BI Dev
Thank you very much Hallway. It worked.

quote:
ENGINE INT CACHE SET ON
SET PAGE-NUM=OFF

SET EMBEDHEADING=OFF

GRAPH FILE CAR
SUM SALES
BY CAR
HEADING
"Profit Amount is $100K"
"Budget Amount is $20K"
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET AUTOFIT ON
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET STYLE *
*GRAPH_SCRIPT

setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setPlace(true);
setCurveFitEquationDisplay(false);

*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/endeflt.sty,$
TYPE=HEADING, JUSTIFY=CENTER, $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $
*GRAPH_SCRIPT

setReportParsingErrors(false);
setSelectionEnableMove(false);

*END
ENDSTYLE
END

-RUN

-HTMLFORM BEGIN NOEVAL



-HTMLFORM END



Webfocus 8105/8202
Windows
All Outputs
October 18, 2019, 01:49 PM
BI Dev
Les J, Doug, thank you very much for your inputs.


Webfocus 8105/8202
Windows
All Outputs