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.
Date Name Qty
05/01/2008 A 2
B 2
E 3
05/02/2008 B 2
C 1
D 3
need a graph that looks like(stacked) :
7 | A
6 | A C
5 | B B
4 | B B
3 | E D
2 | E D
1 | E D
------------------------------
05/01/2008 05/02/2008
my code now :
GRAPH FILE XYZ
PRINT QTY
ACROSS DATE
WHERE YEAR LE CURRY AND MONTH LE CURRM;
WHERE MONTH EQ '05';
ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,1);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),2);
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
PAGESIZE='Letter',
LEFTMARGIN=0.250000,
RIGHTMARGIN=0.250000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
BACKCOLOR='NONE',
STYLE=NORMAL,
$
ENDSTYLE
END
The problem that you have is the graph needs to know about the Name data, and it should be in separate fields so it is represented as different series in the graph. Then the series can be stacked.
What you need to get the stack is
GRAPH FILE XYZ
SUM QTY_1
QTY_2
QTY_3
QTY_4
ACROSS DATE
This message has been edited. Last edited by: Waz,
Yuuta, In order to create the names dynamically use Dialogue Manager:
SET HOLDLIST=PRINTONLY
TABLE FILE XYZ
BY NAME
ON TABLE SAVE
END
-RUN
-SET &MAXNAMES=&LINES;
DEFINE FILE XYZ
-REPEAT #NAMES FOR &I FROM 1 TO &MAXNAMES;
-READ SAVE,&NAME
NAME&I / format_of_qty = IF NAME EQ '&NAME' THEN QTY ELSE 0;
-#NAMES
END
GRAPH FILE XYZ
SUM
-REPEAT #COLS FOR &I FROM 1 TO &MAXNAMES;
NAME&I
-#COLS
ACROSS DATE
....
END
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
I think all you should need to do to your original code is add BY NAME (before the ACROSS) and add ON GRAPH SET GRMERGE ON in your ON GRAPH statements.
Pat WF 7.6.8, AIX, AS400, NT AS400 FOCUS, AIX FOCUS, Oracle, DB2, JDE, Lotus Notes
Posts: 755 | Location: TX | Registered: September 25, 2007