Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Sort in Bar Graphs
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Sort in Bar Graphs
 Login/Join
 
Silver Member
posted
Hi All,

I am having problems in sorting Across.

GRAPH FILE CAR
SUM SALES
ACROSS COUNTRY
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 *
ENDSTYLE
ON GRAPH SET STYLE *
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
$
ENDSTYLE
END

I want to sort the graph based on sales values instead of country name.


Thanks,
SG.

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


Webfocus 7.6.8
PDF,HTML & EXCEL
 
Posts: 32 | Location: memphis,tn | Registered: January 25, 2007Reply With QuoteReport This Post
Virtuoso
posted Hide Post
If you want to sort across sales, then do so.
Only thing (in this example at least) is that a certain sales value is present more than once, so the graph is not exactly what you want if you just do an across sales.
Solution in this case is to do the sum and hold it, and then do the graph on the hold file.
TABLE FILE CAR
SUM SALES 
BY SALES
ON TABLE HOLD
END

GRAPH FILE HOLD
SUM SALES 
ACROSS SALES
....  

Hope this helps ...


GamP

- Using AS 8.2.01 on Windows 7 - IE11.
in Focus since 1988
 
Posts: 1960 | Location: Netherlands | Registered: September 25, 2007Reply With QuoteReport This Post
Virtuoso
posted Hide Post
SG,

If I understand you correctly, you want to sum sales by country but display sorted by ascending values of the summed sales.
Here is a possible solution:
  
-* File SG2.fex
SET HOLDLIST=PRINTONLY
TABLE FILE CAR
SUM CAR.BODY.SALES
RANKED BY TOTAL SALES
BY CAR.ORIGIN.COUNTRY
ON TABLE HOLD
END
DEFINE FILE HOLD
RK/I5=RANK - 1;
GRLABEL/A70 = 'setGroupLabel(' | EDIT(RK) | ', "' | COUNTRY | '");'
END
FILEDEF LABS DISK LABS.FEX
TABLE FILE HOLD
PRINT GRLABEL
BY RK NOPRINT
ON TABLE SAVE AS LABS
END
-RUN
GRAPH FILE HOLD
SUM SALES
BY RK AS Country
ON GRAPH PCHOLD AS HOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRAPHSTYLE *
setReportParsingErrors(false);
setSelectionEnableMove(false);
setSeriesAreRows(true);
setDisplay(getO1Title(),true);
-INCLUDE LABS
ENDSTYLE
ON GRAPH SET STYLE *
ENDSTYLE
END

This message has been edited. Last edited by: Danny-SRL,


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1934 | Location: Tel Aviv, Israel | Registered: March 23, 2006Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Sort in Bar Graphs

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.