Jump to content
The ibi Community has moved to a new platform: Please Sign In and choose Forgot Password to continue

Hello People, I am working on a bar chart and I am using two BY fields and displaying BY field values on the X axis. The problem is with lines I am getting between then labels and I wanted to eliminates these lines


sai pavan

Recommended Posts

I couldn't find a way to remove from my graph. Can someone help me with it, Thanks in advance. Here is the sample code.

-DEFAULTH &WF_STYLE_UNITS='PIXELS';-DEFAULTH &WF_STYLE_HEIGHT='2000.0';-DEFAULTH &WF_STYLE_WIDTH='770.0';-DEFAULTH &WF_TITLE='WebFOCUS Report';  GRAPH FILE CARPRINT SEATS BY CARBY MODEL-*ON GRAPH PCHOLD FORMAT JSCHARTON GRAPH SET VZERO OFFON GRAPH SET HTMLENCODE ONON GRAPH SET GRAPHDEFAULT OFFON GRAPH SET HAXIS '&WF_STYLE_HEIGHT'ON GRAPH SET VAXIS '&WF_STYLE_WIDTH'ON GRAPH SET GRMERGE ADVANCEDON GRAPH SET GRMULTIGRAPH 0ON GRAPH SET GRLEGEND 0ON GRAPH SET GRXAXIS 2ON GRAPH SET LOOKGRAPH VBARON GRAPH SET AUTOFIT ONON GRAPH SET STYLE * *GRAPH_SCRIPTsetPieDepth(0);setPieTilt(0);setDepthRadius(0);setCurveFitEquationDisplay(false);setPlace(true);setRiserWidth(2); *END TYPE=HEADING, LINE=1, JUSTIFY=CENTER, FONT='TAHOMA', BACKCOLOR=RGB(240 240 240), SIZE=9, STYLE=NORMAL, $TYPE=HEADING, LINE=2, JUSTIFY=CENTER, SIZE=1, STYLE=ITALIC, $TYPE=FOOTING, LINE=1, JUSTIFY=LEFT, FONT='TAHOMA', BACKCOLOR=RGB(247 247 247), SIZE=6, STYLE=NORMAL, $*GRAPH_SCRIPTsetReportParsingErrors(false);setSelectionEnableMove(false);setDataTextDisplay(true);setDisplay(getY1Label(),false);setDisplay(getO1MajorGrid(),false);setDisplay(getY1MajorGrid(),false);setDisplay(getY1Label(),false);setDisplay(getX1Label(),false);setDisplay(getO1Title(),false);setDisplay(getO1Label(),false);setDisplay(getY1Title(),false);setDisplay(getY1Label(),false);setDisplay(getO1AxisLine(),false);setPieTilt(0);setPieDepth(0);setDepthRadius(0);setDepthAngle(0);setFillColor(getFrame(),new Color(255,255,255));setBorderColor(getFrame(),new Color(255,255,255));-*setColorMode(2);setColorMode(1);setDisplay(getLegendArea(),true);setDisplay(getO1Label(),true);setDataTextPosition(1);setFontName(getDataText(),"TAHOMA");setFontSizeAbsolute(getDataText(),true);setAutofit(getDataText(),false);setFontSizeInPoints(getDataText(),8);setPlaceResize(getDataText(),0);setFontStyle(getDataText(),0);setFontName(getO1Label(),"TAHOMA");setFontSizeAbsolute(getO1Label(), true);setFontSizeInPoints(getO1Label(), 8);setPlaceResize(getO1Label(), 0);setY1AxisLineDisplay(false);-*setFrameAutoShade(true);*ENDENDSTYLEEND-RUN
Link to comment
Share on other sites

You can write it like this:

GRAPH FILE ibisamp/carSUM SEATSBY CARBY MODELON GRAPH PCHOLD FORMAT JSCHARTON GRAPH SET LOOKGRAPH BARON GRAPH SET AUTOFIT ONON GRAPH SET STYLE *INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $TYPE=DATA, COLUMN=N2, BUCKET=x-axis, $TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $*GRAPH_SCRIPTsetReportParsingErrors(false);setSelectionEnableMove(false);setTextRotation(getO1Label(),0);setFillColor(getFrameSide(),new Color(241,241,241));*GRAPH_JS_FINAL"xaxis": { "labels": { "nestingConcatSymbol": undefined, "nestingLineStyle": { "width":"0", "color": "green", "dash": "dash" } }}*ENDENDSTYLEEND

If the NestingLineStyle width is set to 0 or the color to white then the lines do not appear.

Link to comment
Share on other sites

Hi Sai. For a stacked bar, I don't know if you can suppress the x-axis lines with LOOKGRAPH VBRSTK1. But you can do a stacked bar, coding it the newer way:image.thumb.png.dbad4c39598e5d8099372c3c5d239d7a.png

GRAPH FILE ibisamp/ggsalesSUM GGSALES.SALES01.UNITSGGSALES.SALES01.DOLLARSGGSALES.SALES01.BUDUNITSGGSALES.SALES01.BUDDOLLARSBY GGSALES.SALES01.REGIONBY GGSALES.SALES01.STON GRAPH PCHOLD FORMAT JSCHARTON GRAPH SET LOOKGRAPH BARON GRAPH SET AUTOFIT ONON GRAPH SET STYLE *INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $TYPE=DATA, COLUMN=N2, BUCKET=x-axis, $TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $TYPE=DATA, COLUMN=N4, BUCKET=y-axis, $TYPE=DATA, COLUMN=N5, BUCKET=y-axis, $TYPE=DATA, COLUMN=N6, BUCKET=y-axis, $*GRAPH_SCRIPTsetReportParsingErrors(false);setSelectionEnableMove(false);*GRAPH_JS_FINAL"xaxis": { "labels": { "nestingConcatSymbol": undefined, "nestingLineStyle": { "width":"0", "color": "green", "dash": "dash" } }},"blaProperties": { "seriesLayout": "stacked"},"agnosticSettings": { "chartTypeFullName": "Bar_Stacked"}*ENDENDSTYLEEND
Link to comment
Share on other sites

There is another approach to producing a stacked bar. The approach used above has a different field for each colored slice of the bars. The following uses one field for all, the colored slices are based on each distinct value of the one field. image.thumb.png.39e34004de3ab03b91d161e3057a5c2e.pngEach distinct value of the CATEGORY field makes a different colored slice. Code it like this:

GRAPH FILE ibisamp/ggsalesSUM UNITS BY CATEGORY BY REGION BY STON GRAPH PCHOLD FORMAT JSCHARTON GRAPH SET GRWIDTH 1ON GRAPH SET LOOKGRAPH BARON GRAPH SET AUTOFIT ONON GRAPH SET STYLE **ENDINCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$TYPE=DATA, COLUMN=N1, BUCKET=color, $TYPE=DATA, COLUMN=N2, BUCKET=x-axis, $TYPE=DATA, COLUMN=N3, BUCKET=x-axis, $TYPE=DATA, COLUMN=N4, BUCKET=y-axis, $*GRAPH_JS_FINAL"xaxis": { "labels": { "nestingConcatSymbol": undefined }},"blaProperties": { "seriesLayout": "stacked"},"agnosticSettings": { "chartTypeFullName": "Bar_Stacked"}*END
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...