Focal Point
Charts - Ordering by a field that is not displayed?

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

January 13, 2006, 02:30 PM
Moogle
Charts - Ordering by a field that is not displayed?
Hi team,

I have a line chart that displays the weeks of the year (1 - 52) on the x-axis. The problem is, the data starts at week 18 (year 2005), gets to 52 and then starts over at week 1 (year 2006).

When this is graphed, the x-axis shows 1, 2, 18, 19, ect.

When I do display this data in a report, I add the Year field before the Week field, and set it to NOPRINT. This way it starts at 18, goes to 52 and then shows weeks 1 and 2.

Is there a way to do this with charts?

Cheers,

Joey


-WebFOCUS 8.2.01 on Windows
January 25, 2006, 09:46 AM
Kerry
Hi Joey,

Has this issue been resolved?

Here is what I heard from our product division people:

Unfortunately, there is currently no way to do BY NOPRINT in Charts. This is planned to be supported in the future as there is a New Feature Request already submitted.

To make some kind of workaround, we need to know which Date format you are using and if there is any way to create a Define field that would have correct year attached to it so that Chart will be plotted in chronological order.

Hope this helps. Smiler

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
January 25, 2006, 12:27 PM
jodye
Hi Moogle

The fact that you cannot use noprint in graphs has been driving me crazy for a long time. eg Jan - Dec will not display in the proper order.

You can work around it by hard coding the values. For example, with ACROSS you can use this...

ACROSS MYCOL NOPRINT COLUMNS JAN and FEB and MAR and APR and MAY and JUN etc etc

Will work. This assumes that the actual values for the across do not change. If they are dynamic then start by sticking all of the possible values into ampers and then build the string dynamically in a loop. We do this all the time. You end up with this

ACROSS MYCOL NOPRINT COLUMNS &COLORDER

HTH


WF 8.0.0.5M
January 30, 2006, 01:24 PM
Moogle
Thanks for the replies! The hard-coded column order is good, but not quite applicable for my case, due to dynamic values. I ended up concatenating YEAR+Month Number (IE 2006 01).

Cheers,

Joey


-WebFOCUS 8.2.01 on Windows
January 30, 2006, 05:21 PM
mgrackin
I got into this discussion late but here is a way to create a dynamic sort order. As usual it uses the CAR file. The example creates a graph to show CARS in a graph sorted low to high based on SALES.

-SET &ECHO=ALL;
APP FI SORTORDR DISK SORTORDR.FEX
-RUN
TABLE FILE CAR
SUM SALES
BY TOTAL SALES NOPRINT
BY COUNTRY
BY CAR
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS THEDATA
END
-RUN
DEFINE FILE THEDATA
SORTWORD/A8=
IF (LAST SORTWORD NE 'COLUMNS' OR 'AND')
THEN 'COLUMNS' ELSE 'AND';
SORTVALU/A30='''' | CAR || '''';
END
TABLE FILE THEDATA
PRINT SORTWORD SORTVALU
ON TABLE SAVE AS SORTORDR
END
-RUN
GRAPH FILE THEDATA
SUM SALES
ACROSS CAR
-INCLUDE SORTORDR
END


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
January 30, 2006, 09:44 PM
susannah
i totally second Mickey's suggestion and i use it, just as he taught it to me, all over the place in my graphs, and they're all dynamic column lists. works great. very clever.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID