Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Styling multiple heading lines in graph

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Styling multiple heading lines in graph
 Login/Join
 
Member
posted
Hi All,

I am facing an issue with headings in graph.

Case1: Graph headings in “HEADING” part of the code with ON GRAPH SET EMBEDHEADING ON option.
It ignores the different styling of the heading lines and left aligned.

Case2: Graph headings in “HEADING” part of the code with ON GRAPH SET EMBEDHEADING OFF option.
Heading styling applied to all the lines as expected but headings are centered according to the page instead of graph.

Case3: Graph headings using JSON properties can add only 2 line of heading 3rd line of heading not possible using JSON properties

title: {
text: 'Heading line 1,
visible: true,
align: 'center',
font: 'Bold 14pt Arial',
color: '#e1e1e1',
},
subtitle: {
text: ‘Heading line 2’,
visible: true,
font: 'Bold italic 12pt Arial',
color: '#A2C5F6',
},

Question: Is there a way to add 3rd line using JSON or is there a way to apply different styling to heading lines and center them according to the graph?

Please refer to the sample graph code below using car file.
-******************************************************************
ENGINE INT CACHE SET ON
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE car
SUM CAR.BODY.SALES
BY CAR.ORIGIN.COUNTRY
HEADING
"This is First Line"
" "
"This is Second Line"
" "
"This is Third Line"
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRWIDTH 1

ON GRAPH SET EMBEDHEADING ON

ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET AUTOFIT OFF
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setReportParsingErrors(false);
setSelectionEnableMove(false);
*END

TYPE=HEADING, LINE= 1,JUSTIFY=CENTER, FONT='ARIAL', SIZE=14, COLOR=RGB(255 50 100), STYLE=NORMAL, $
TYPE=HEADING,LINE= 3, JUSTIFY=CENTER, FONT='ARIAL', SIZE=12, COLOR=RGB(30 128 245), STYLE=NORMAL, $
TYPE=HEADING, LINE= 5,JUSTIFY=CENTER, FONT='ARIAL', SIZE=10, COLOR=RGB(150 80 192), STYLE=NORMAL, $

ENDSTYLE
END
-RUN
-********************************************************************************

Thanks

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


WebFOCUS 8
Windows, All Outputs
 
Posts: 23 | Registered: April 16, 2015Report This Post
Member
posted Hide Post
Could try holding your chart, then calling it using the !IBI.FIL command:

ENGINE INT CACHE SET ON
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE car
SUM CAR.BODY.SALES
BY CAR.ORIGIN.COUNTRY
ON GRAPH HOLD AS BAR_CHART FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET EMBEDHEADING ON
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET AUTOFIT OFF
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setReportParsingErrors(false);
setSelectionEnableMove(false);
*END
ENDSTYLE
END
-RUN

-HTMLFORM BEGIN
<TABLE>
<TR><TD ALIGN=CENTER><div style="color:blue;font-size:25px">line block 1</div></TD></TR>
<TR><TD ALIGN=CENTER style="color:red">line block 2</TD></TR>
<TR><TD>!IBI.FIL.BAR_CHART;</TD></TR>
</TABLE>

-HTMLFORM END


Erfan


WebFOCUS 77, Windows, HTML PDF EXCEL
 
Posts: 11 | Registered: November 28, 2011Report This Post
Guru
posted Hide Post
Try your Case#2, but set AUTOFIT ON. The graph and centered titles line up nice, and the left-justified lines stay on the left. I had the same dilema - I wanted some heading lines centered, but my last 2 lines I wanted on the left. Works!


Webfocus 8
Windows, Linux
 
Posts: 258 | Location: Palm Coast, FL | Registered: February 05, 2010Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Styling multiple heading lines in graph

Copyright © 1996-2020 Information Builders