This is sample code for a bar graph with the average as a line graph. If you check the stylesheet, anything that references (5) is controlling the line.
-* Created by Graph Assistant
-* HTML Tool
-* Created by Graph Assistant
-* FF Line do not change this line! Field Name
-* FF Line do not change this line! Alias
-* FF Line do not change this line! Format
-* FF Line do not change this line! Segment
-* FF Line do not change this line! UseAlias
DEFINE FILE TENDERTRACK
-* DEFINE BEGIN T_DATE
T_DATE/MtYY = TENDERTRACK.TENDERTRACK.ISSUEDBYCUSTOMER;
APR_CNT/I8=IF REGION CONTAINS 'APR' THEN 1 ELSE 0;
EAR_CNT/I8=IF REGION CONTAINS 'EAR' THEN 1 ELSE 0;
LAR_CNT/I8=IF REGION CONTAINS 'LAR' THEN 1 ELSE 0;
MER_CNT/I8=IF REGION CONTAINS 'MER' THEN 1 ELSE 0;
UNKWN/I8=IF APR_CNT EQ 0 AND EAR_CNT EQ 0 AND LAR_CNT EQ 0 AND MER_CNT EQ 0 THEN 1 ELSE 0;
END
TABLE FILE TENDERTRACK
SUM
APR_CNT
EAR_CNT
LAR_CNT
MER_CNT
COMPUTE AVG/D12.2 = (APR_CNT + EAR_CNT + LAR_CNT + MER_CNT)/4;
-* UNKWN AS 'UNKNOWN'
BY T_DATE
&WHR1.EVAL
&WHR2.EVAL
ON TABLE HOLD AS THOLD1
END
-*
GRAPH FILE THOLD1
PRINT
APR_CNT AS 'APR'
EAR_CNT AS 'EAR'
LAR_CNT AS 'LAR'
MER_CNT AS 'MER'
AVG
ACROSS T_DATE AS ''
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET 3D OFF
ON GRAPH SET BARNUMB OFF
ON GRAPH SET GRID ON
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET GRMERGE ON
ON GRAPH SET VZERO ON
ON GRAPH SET VAXIS 560
ON GRAPH SET HAXIS 1100
ON GRAPH SET GRAPHSTYLE *
-* setTemplateFile("/images/tdg/template/IBITrueColors.txt");
-* setGraphType(20);
setSeriesType(0,1);
setLegendDisplay(true);
setLegendMarkerPosition(0);
setMarkerDisplay(true);
setUseSeriesShapes(false);
setConnectLineMarkers(true);
setConnectScatterMarkers(true);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(4);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,1);
setAxisAssignment(1,0);
setSeriesType(1,1);
setAxisAssignment(4,1);
setSeriesType(4,2);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),1);
setDataTextDisplay(true);
setCustomDataText(getSeries(0), true);
setCustomDataText(getSeries(1), true);
setCustomDataText(getSeries(2), true);
setCustomDataText(getSeries(3), true);
setCustomDataText(getSeries(4), true);
setCustomDataText(getSeries(5), true);
setDisplay(getDataText(0), false);
setDisplay(getDataText(1), false);
setDisplay(getDataText(2), false);
setDisplay(getDataText(3), false);
setDisplay(getDataText(4), false);
setDisplay(getDataText(5), true);
setTextFormatPreset(getDataText(2),2);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setTextJustHoriz(getO1Label(),2);
setFontSizeAbsolute(getO1Label(),true);
setFontSize(getO1Label(),12);
setTextRotation(getO1Label(),3);
setTextWrap(getO1Label(),false);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
ENDSTYLE
ON GRAPH SET STYLE *
TYPE=DATA,
FIELD=APR_CNT,
COLOR=RED,
$
TYPE=DATA,
FIELD=EAR_CNT,
COLOR=PURPLE,
$
TYPE=DATA,
FIELD=LAR_CNT,
COLOR=RGB(255 215 0),
$
TYPE=DATA,
FIELD=MER_CNT,
COLOR=GREEN,
$
TYPE=DATA,
FIELD=AVG,
COLOR=NAVY,
$
ENDSTYLE
ON GRAPH PCHOLD FORMAT HTML
END
-EXIT
Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes