Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Graph in Adv grapg assistnt

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Graph in Adv grapg assistnt
 Login/Join
 
Master
posted
Hai all

I am developing a graph in advanced graph assistant. I haven't done much with graphs before.
My x- axis has 2 field state/city and my y-axis has population of each city. How can I show top 5 cities with high population?
I am trying to sort and limit values but could not get top 5. Can someone help me?

Thanks

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


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Virtuoso
posted Hide Post
Maybe you're looking for this?:
BY HIGHEST 5 population


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Master
posted Hide Post
I tried that but it doesnt give me top 5 cities. It gives 5 sorted by city name.
This is my code


TABLE FILE TEMP1
SUM
	POP
BY STATE
BY CITY
ON TABLE HOLD AS TEMP2 FORMAT FOCUS
END

TABLE FILE TEMP2
PRINT TEMP2.SEG01.POP AS 'Population'
BY TOTAL HIGHEST 5 TEMP2.SEG01.REG_QTY NOPRINT
ACROSS TEMP2.SEG01.STATE AS 'State'
ACROSS TEMP2.SEG01.CITY AS 'City'
ON GRAPH PCHOLD FORMAT PNG
END



Can you correct the code for me please? thankss


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Platinum Member
posted Hide Post
quote:
TABLE FILE TEMP1 SUM POP BY TOTAL HIGHEST 5 POP NOPRINT BY STATE BY CITY ON TABLE HOLD AS TEMP2 FORMAT FOCUS END


Brian Suter
VP WebFOCUS Product Development
 
Posts: 200 | Location: NYC | Registered: January 02, 2007Report This Post
Master
posted Hide Post
This looks good. thanks brian.
But when I do the graph I get the bars sorted by city. How can I show bars starting from high populated city to lowest (descending)? thanks


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Master
posted Hide Post
Can someone help on this plz?


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Expert
posted Hide Post
Fairly simple process...

  
APP PREPENDPATH IBISAMP
-RUN
DEFINE FILE GGSALES
  CITY_ST/A25 = CITY || (', ' | ST);
END
TABLE FILE GGSALES
SUM
   UNITS
  BY CITY_ST
 ON TABLE HOLD AS HOLD1
END
-RUN
TABLE FILE HOLD1
SUM
   UNITS
 ACROSS HIGHEST 10 UNITS NOPRINT
 ACROSS CITY_ST
END
-EXIT


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Master
posted Hide Post
thanks tom..it works but even on X-axis it shows population instead of city name..?!!


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Expert
posted Hide Post
Show the Graph code within the </> tags. Not going to keep guessing...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Master
posted Hide Post
This is the code

 

TABLE FILE TEMP1
SUM
	POP
BY TOTAL HIGHEST 5 POP NOPRINT
BY STATE
BY CITY
ON TABLE HOLD AS TEMP2 FORMAT FOCUS
END

GRAPH FILE TEMP2
PRINT POP AS 'Registered Quantity' 
ACROSS HIGHEST POP NOPRINT
ACROSS TEMP2.STATE
ACROSS TEMP2.CITY
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB ON
ON GRAPH SET 3D ON
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH SET VAXIS 405.000
ON GRAPH SET HAXIS 770.000
ON GRAPH SET UNITS PIXELS
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);
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 *
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
ENDSTYLE
END


 


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Expert
posted Hide Post
Do not know of another way w/WF:

  
APP PREPENDPATH IBISAMP
-RUN
DEFINE FILE GGSALES
  CITY_ST/A25 = CITY || (', ' | ST);
END
TABLE FILE GGSALES
SUM
   UNITS
  BY HIGHEST 5 UNITS
  BY CITY_ST
WHERE UNITS NE 0;
 ON TABLE HOLD AS HOLD1
END
-RUN
GRAPH FILE HOLD1
PRINT
     UNITS 
  BY HIGHEST UNITS AS ''
  BY CITY_ST AS ''
ON GRAPH PCHOLD FORMAT PNG
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 SET GRMERGE ON
ON GRAPH SET GRAPHSTYLE *
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
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 *
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
$
ENDSTYLE
END


-EXIT

This message has been edited. Last edited by: Tom Flynn,


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Graph in Adv grapg assistnt

Copyright © 1996-2020 Information Builders