Focal Point
[SOLVED] Bar Graph - Gap between bars

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

December 10, 2019, 05:27 PM
WebFOCUS_Dev
[SOLVED] Bar Graph - Gap between bars
Hello

I am working on a bar graph and got it as per requirements except 1 thing for now. Below is the sample code.
Is it possible to get some gap between 2 bars? I need to have 2 measures as I want different font format for data labels.
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_STYLE_UNITS='INCHES';
-DEFAULTH &WF_STYLE_HEIGHT='1.000';
-DEFAULTH &WF_STYLE_WIDTH='3.520833';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE car
SUM 
	COMPUTE DL1/D12.2 = DEALER_COST/10000;
	COMPUTE DL2/D12.2 = RETAIL_COST/10000;
BY CAR.ORIGIN.COUNTRY
WHERE CAR.ORIGIN.COUNTRY EQ 'ENGLAND';
ON GRAPH PCHOLD FORMAT PDF
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
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 HBAR
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setReportParsingErrors(false);
setSelectionEnableMove(false);
setRiserWidth(90);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, PAGESIZE=LEGAL, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getDataText(1), true);
setDataTextDisplay(true);
setFillColor(getSeries(1),new Color(136,136,136));
setFillColor(getSeries(0),new Color(190,22,4));
setDisplay(getO1Title(),false);
setDisplay(getO1Label(),false);
setDisplay(getLegendArea(),false);
setTransparentFillColor(getFrameSide(),true);
setTransparentBorderColor(getFrameSide(),true);
setTransparentFillColor(getFrameBottom(),true);
setTransparentBorderColor(getFrameBottom(),true);
setDisplay(getY1Label(),false);
setDataTextRadiusDefault(90);
setDataTextPosition(0);
setDataTextAngleDefault(90);

setFontSizeAbsolute(getDataText(0), true);
setFontSizeInPoints(getDataText(0), 8);
setPlaceResize(getDataText(0), 0);
setCustomDataText(getDataText(0), true);
setTextFormatPreset(getDataText(0), -1);
setFontName(getDataText(0), "BASKERVILLE");
setFillColor(getDataText(0), new Color(242, 102, 94));
setTextFormatPreset(getDataText(0),3);

setFontSizeAbsolute(getDataText(1), true);
setFontSizeInPoints(getDataText(1), 8);
setPlaceResize(getDataText(1), 0);
setCustomDataText(getDataText(1), true);
setTextFormatPreset(getDataText(1), -1);
setFontName(getDataText(1), "BASKERVILLE");
setFillColor(getDataText(1), new Color(195,202,216));
setTextFormatPattern(getDataText(1), "#.#");

setDisplay(getY1Label(),false);
setDisplay(getY1Title(),false);
setDisplay(getO1Title(),false);
setDisplay(getY1AxisLine(),false);
setDisplay(getY1MajorTick(),false);
setDisplay(getO1AxisLine(),false);
setDisplay(getO1MajorTick(),false);
setReferenceTextPosition(getReferenceLineTextY1(0),0);
setDisplay(getReferenceLineY1(0),true);
setBorderColor(getReferenceLineY1(0),new Color(255,255,255));
setFillColor(getReferenceLineTextY1(0),new Color(255,255,255));
setReferenceLineValueY1(0,0.0);
setLineWidth(getReferenceLineY1(0),1);
setLineBasicStrokeType(getReferenceLineY1(0),0);
setTextString(getReferenceLineTextY1(0),"");
*END
ENDSTYLE
END
-RUN

Please suggest.

Thank you

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


WebFOCUS 8206
All formats
December 11, 2019, 07:11 AM
MartinY
As been discussed several times.

Search for : bar gap


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007