Focal Point
Order of bars in a graph

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2271004202

December 20, 2006, 09:47 AM
Spence
Order of bars in a graph
I need the order of the bars to be from lowest retail_cost to highest retail_cost and not sorted by country name. The graph is needed in the same format just a diffenent sort order.

GRAPH FILE CAR
SUM RETAIL_COST
ACROSS COUNTRY
END


WF 8 version 8.2.04. Windows.
In focus since 1990.
December 20, 2006, 09:49 AM
susannah
quote:
GRAPH FILE CAR
SUM RETAIL_COST
ACROSS COUNTRY
COLUMNS 'ENGLAND' AND 'FRANCE' AND 'ITALY' AND 'BURKINA FASO'
END





In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
December 20, 2006, 10:01 AM
Spence
susannah,

that works for the car file but i will not know what columns will be showing on my real report. the real report is the top 10 customers base on sales $.


WF 8 version 8.2.04. Windows.
In focus since 1990.
December 20, 2006, 07:44 PM
susannah
then you gotta do a little work to earn your paycheck.
figure out the top 10 in a fex paragraph BEFORE the GRAPH FILE paragraph, and write your COLUMNS line dynamically.
TABLE FILE CAR
BY HIGHEST TOTAL SALES NOPRINT BY COUNTRY ON TABLE SAVE AS MYCOUNTRY
END
-RUN
-SET &HOWMANY = &LINES;
-SET &KOUNTER = 0 ;
GRAPH FILE CAR
SUM RETAIL_COST ACROSS COUNTRY
COLUMNS
-REPEAT end.loop &HOWMANY TIMES
-SET &KOUNTER = &KOUNTER +1 ;
-READ MYCOUNTRY NOCLOSE &COUNTRY.A10
-SET &THING = IF &KOUNTER NE &HOWMANY THEN '''' | &COUNTRY || '''' | ' AND '
- ELSE '''' | &COUNTRY | '''' ;
&THING.EVAL
-end.loop
END
-* make SURE you put a space after the word COLUMNS
I think, if i recall correctly, that NOPRINT won't work in GRAPH FILE
so ACROSS someSalesRank NOPRINT ACROSS COUNTRY
won't work although it would seem the obvious thing for TABLE FILE. so that's why you have to jump thru this hoop. but its easy enough. I think T taught me this, or Francis, some years ago when i had the same issue.

Merry Christmas...i'm so outa here!

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




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
December 21, 2006, 10:17 AM
Spence
thank you susannah.


WF 8 version 8.2.04. Windows.
In focus since 1990.
September 20, 2013, 02:15 PM
neuro
I thank the Susannah from this date:
quote:
December 20, 2006 06:44 PM
It just helped me on 9/20/2013... LOL In regards to how to sort by the columns. Your example worked like a charm with my graph!


Currenly working @ Learning Circle Education Services
Previously worked @ Nationwide Insurance
Prod: WebFOCUS 7.6.11


Test: WebFOCUS 7.6.11


Dev: WebFOCUS 7.6.11