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.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
In this example sales GE 20000 should be green and sales LT 20000 should be red. It works with a BY but not with an ACROSS. The ACROSS is needed to order the graph bars.
TABLE FILE CAR SUM SALES BY CAR ON TABLE HOLD END TABLE FILE HOLD BY HIGHEST SALES NOPRINT BY CAR ON TABLE SAVE AS MYORDER END -RUN -SET &HOWMANY = &LINES; -SET &KOUNTER = 0; GRAPH FILE CAR SUM SALES ACROSS CAR COLUMNS -REPEAT end.loop &HOWMANY TIMES -SET &KOUNTER = &KOUNTER +1 ; -READ MYORDER NOCLOSE &CAR.A16 -SET &THING = IF &KOUNTER NE &HOWMANY THEN '''' | &CAR || '''' | ' AND ' -ELSE '''' | &CAR | '''' ; &THING.EVAL -end.loop ENDThis message has been edited. Last edited by: Spence,
WF 8 version 8.2.04. Windows. In focus since 1990.
Posts: 189 | Location: pgh pa | Registered: October 06, 2004
Take out the macro! Post the code, between the code tags </>
Never mind, here's a working example:
TABLE FILE CAR
SUM SALES
BY CAR
ON TABLE HOLD
END
TABLE FILE HOLD
BY HIGHEST SALES NOPRINT
BY CAR
ON TABLE SAVE AS MYORDER
END
-RUN
-SET &HOWMANY = &LINES;
-SET &KOUNTER = 0;
GRAPH FILE CAR
SUM SALES
COMPUTE FLAG/A1 = IF SALES GE 20000 THEN 'Y' ELSE 'N'; NOPRINT
ACROSS CAR
COLUMNS
-REPEAT end.loop &HOWMANY TIMES
-SET &KOUNTER = &KOUNTER +1 ;
-READ MYORDER NOCLOSE &CAR.A16
-SET &THING = IF &KOUNTER NE &HOWMANY THEN '''' | &CAR || '''' | ' AND '
-ELSE '''' | &CAR | '''' ;
&THING.EVAL
-end.loop
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET HAXIS 720
ON GRAPH SET VAXIS 405
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRMERGE ON
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
ON GRAPH PCHOLD FORMAT JPEG
ON GRAPH SET STYLE *
TYPE = REPORT, FONT=VERDANA, SIZE=9, $
TYPE = HEADING, FONT=VERDANA, SIZE=10, STYLE=BOLD, $
TYPE=DATA, ACROSSCOLUMN=N1, COLOR=GREEN, WHEN=FLAG EQ 'Y',$
TYPE=DATA, ACROSSCOLUMN=N1, COLOR=RED, WHEN=FLAG EQ 'N',$
ENDSTYLE
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBISouthWestern.txt");
setFontName(getDataText(),"Verdana");
setDepthAngle(65);
setPieDepth(45);
restoreAllSlices();
setPieFeelerTextDisplay(2);
setPieTilt(25);
setPieLabelDisplay(0);
setDisplay(getPieLabel(),true);
setLegendAutomatic(false);
setFontStyle(getLegendText(),2);
setFontStyle(getPieSliceLabel(),2);
setTextFormatPreset(getPieSliceLabel(),5);
setFontSizeInPoints(getTitle(),12);
setFontSizeAbsolute(getPieSliceLabel(),true);
setFontSizeInPoints(getPieSliceLabel(),8);
setFontSizeAbsolute(getLegendText(),true);
setFontSizeInPoints(getLegendText(),9);
setTextFormatPattern(getDataText(),"$#,###,###,###.##");
setFontSizeInPoints(getO1Label(),9);
setFontSizeInPoints(getY1Label(),9);
setFontSize(getDataText(),10);
setFontSizeAbsolute(getTitle(),true);
setFontSizeInPoints(getTitle(),12);
setLegendMarkerPosition(0);
setTransparentBorderColor(getChartBackground(),true);
setRect(getPieFrame(), new Rectangle(-15500,-13500,27000,27000));
setRect(getFrame(), new Rectangle(-10400,-10000,25000,30000));
setTextString(getTitle(),"TOTAL RETAIL COST BY COUNTRY");
ENDSTYLE
END
-RUN
-EXIT
I did not have ACROSSCOLUMN in style sheet, just COLUMN.
TABLE FILE CAR SUM SALES BY CAR ON TABLE HOLD END TABLE FILE HOLD BY HIGHEST SALES NOPRINT BY CAR ON TABLE SAVE AS MYORDER END -RUN -SET &HOWMANY = &LINES; -SET &KOUNTER = 0; GRAPH FILE CAR SUM SALES ACROSS CAR COLUMNS -REPEAT end.loop &HOWMANY TIMES -SET &KOUNTER = &KOUNTER +1 ; -READ MYORDER NOCLOSE &CAR.A16 -SET &THING = IF &KOUNTER NE &HOWMANY THEN '''' | &CAR || '''' | ' AND ' -ELSE '''' | &CAR | '''' ; &THING.EVAL -end.loop ON GRAPH SET STYLE * TYPE=DATA, ACROSSCOLUMN=SALES, COLOR=RGB(255 0 0), WHEN=SALES LT 8000, $ TYPE=DATA, ACROSSCOLUMN=SALES, COLOR=RGB(0 128 0), WHEN=SALES GE 8000, $ ENDSTYLE END
WF 8 version 8.2.04. Windows. In focus since 1990.
Posts: 189 | Location: pgh pa | Registered: October 06, 2004