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
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
ENDSTYLE END -RUN -********************************************************************************
ThanksThis message has been edited. Last edited by: FP Mod Chuck,
WebFOCUS 8 Windows, All Outputs
September 08, 2017, 04:06 PM
ebaig
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
September 12, 2017, 04:24 PM
Mike in DeLand
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!