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.
I am new to creating graphs in WebFOCUS. I am trying to create a bar graph that shows usage by month. When I do the following : SUM ITEM_COUNT AS '# of Items' BY MONTH AS 'Month'
The months are listed as 'April,February,..' I want it to list as 'January, February,..'
Can somebody show me how to do that ?
Thanks, BabuThis message has been edited. Last edited by: Kerry,
Try converting the month to a number then do something like as follows: I used CENTORD as month was numeric. Creating the Mtr as the display makes it show the alpa (looked it up under date formats to be correct) SET LOOKGRAPH=BAR SET GRAPHEDIT=SERVER SET GRID=ON SET BARNUM=OFF SET 3D=OFF SET VZERO=ON DEFINE FILE CENTORD MONTHA/Mtr = MONTH; END GRAPH FILE CENTORD SUM QUANTITY -*ACROSS MONTH ACROSS MONTHA WHERE YEAR EQ '2001' ON GRAPH SET GRAPHSTYLE * setLegendDisplay(true); setLegendMarkerPosition(0); setMarkerDisplay(true); setConnectLineMarkers(false); setConnectScatterMarkers(false); setO1LabelDisplay(true); setO1AxisSide(0); setO1MajorGridDisplay(true); setO1MajorGridStyle(0); setO1MinorGridDisplay(false); setSeriesType(0,1); setY1LabelDisplay(true); setY1AxisSide(0); setTextFormatPreset(getY1Label(),1); setY1MajorGridDisplay(true); setY1MajorGridStyle(0); setY1MinorGridDisplay(false); setPieFeelerTextDisplay(1); setTextFormatPreset(getPieSliceLabel(),1); setPieLabelDisplay(0); ENDSTYLE ON GRAPH SET STYLE * ENDSTYLE END
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
An alternative to defining a dummy is to use the ACROSS COLUMNS method
SUM ITEM_COUNT AS '# of Items' ACROSS MONTH AS 'Month' COLUMNS 'january' and 'february' and 'march' .....etc.
The quoted column names are case senitive. It has the advantage that if working with fixed sorts such a state etc you. can arrange them in any order you like.
bch, Is your MONTH an Alpha field? If so focus assumes the order to be simply alphabetical.. April, December, February, July, June,May,... You need to convert it to a DATE field, so that FOCUS will know the order. So whatever numeric field you generated your MONTH name from, can you go back to it and make it a smartdate? If not, then JG's way is easiest i think.
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
same issue. same answer. you need to tell focus the order you want, if the labels aren't in the order you need. in your case you'll have to determine the order dynamically, based on the values, build a file of the column names in the order you'll need, then read that file following the COLUMNS command. SEE JG'S POST ON PAGE 2 OF THIS THREAD
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
would that it were true, but the NOPRINT doesn't work in GRAPH (3rd party software). JG taught me that, and the work around, COLUMNS. Boy that would simplify our lives, if it worked.
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
I said "may". I've been through that before, but I don't think it's a documented disability, so it could be miraculously cured in any release.
I'd lay the blame on the 2nd party, not the 3rd. Focus takes your GRAPH FILE syntax, and hands the graph package an ordered set of (x,y) points and labels plus formatting instructions. The desired output (using the BY ... NOPRINT to order the data, and the additional BY to supply the labels) is unambiguously clear, and s/b no great challenge to handle that way and generate the graph-package directives. -- It's the Focus reporting engine that needs improvement here, not the graph package.
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Page 673 Creating Reports With WebFOCUS Language Version 5 Release 2
quote:
To temporarily hide the display of a Y-axis field, add the NOPRINT command to the field. Although the NOPRINT command applies to both verb objects and sort fields in a TABLE request, it only applies to verb objects in a GRAPH request.
Actually as of 7.1 both COMPUTE and NOPRINT are supported for Graph
The key here in this thread of discusssion is the need for NOPRINT to work with a BY (or ACROSS) phrase in GRAPH FILE. I asked Larry Eiss about this via email before Summit (sorry Larry) and he indicated that using NOPRINT with a BY phrase seemed to work for him. He wasn't sure which version of WF it got into but definitely not before 5.3. I am still using 5.2.3 and 5.2.5 so I can't check for it in 5.3. Does anyone have this version (or later) so they can verify if support for NOPRINT with a BY phrase works after 5.3?
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
SET ASNAMES = ON TABLE FILE CAR SUM CNT.CAR.COMP.CAR AS 'XCAR' BY CAR.ORIGIN.COUNTRY AS 'XCOUN'
ON TABLE SET PAGE-NUM NOLEAD ON TABLE NOTOTAL ON TABLE HOLD AS CARTEST ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * INCLUDE = endeflt, $ TYPE=REPORT, LINES-PER-PAGE=20, REPORT-VIEW=CHART, CHART-TYPE=BAR, $ ENDSTYLE END
TABLE FILE CARTEST PRINT CARTEST.CARTEST.XCOUN CARTEST.CARTEST.XCAR BY HIGHEST 2 CARTEST.CARTEST.XCAR NOPRINT ON TABLE SET PAGE-NUM NOLEAD ON TABLE NOTOTAL ON TABLE HOLD AS CARTEST1 ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * INCLUDE = endeflt, $ TYPE=REPORT, LINES-PER-PAGE=20, $ TYPE=REPORT, COLUMN=N3, SEQUENCE=2, $ TYPE=REPORT, COLUMN=N2, SEQUENCE=1, $ ENDSTYLE END
GRAPH FILE CARTEST1 SUM CARTEST1.CARTEST1.XCAR ACROSS CARTEST1.CARTEST1.XCOUN ON GRAPH SET LOOKGRAPH VBAR 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); setY1LabelDisplay(true); setY1AxisSide(0); setY1MajorGridDisplay(true); setY1MajorGridStyle(0); setY1MinorGridDisplay(false); setTextFormatPreset(getY1Label(),-1); setTextFormatPattern(getY1Label(),"#.##"); 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 * $ ENDSTYLE END