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     ROWS..OVER.. With Graphs

Read-Only Read-Only Topic
Go
Search
Notify
Tools
ROWS..OVER.. With Graphs
 Login/Join
 
Platinum Member
posted
Is it possible to use the ROWS OVER Method within a graph form.

I have tried, but it turns my legend into numerical values instead of keeping the proper values for the column:

Example with some formatting code stripped out:
  GRAPH FILE CAR
SUM CNT.COUNTRY AS ''
BY CAR ROWS 'BMW' OVER 'DATSUN' OVER 'JAGUAR'
ACROSS COUNTRY
ON GRAPH SET LOOKGRAPH VBRSTK1
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 VAXIS 4.500
ON GRAPH SET HAXIS 10.000
ON GRAPH SET UNITS INCHES
ON GRAPH SET GRMERGE ON
ON GRAPH PCHOLD FORMAT SVG
ON GRAPH SET GRAPHSTYLE *
END


WebFOCUS 8201M/Windows Platform
 
Posts: 109 | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
ROWS OVER is a TABLE command, not graph. There are other ways of dealing with legends on a graph. Maybe you can describe in more detail what you are expecting out of this graph. When I run your code without the ROWS OVER, I get alphanumeric legend values.

Maybe you could explain in more detail what you are looking for.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Platinum Member
posted Hide Post
I have a graph with an x and a y that both need to display income brackets. Problem is that they both want to display in an alpha numeric fashion instead of numeric. So for example my brackets are:

'$0-4999'
'$5000 - 9999'
'$10000 - 14999'

Which in the graph would be displayed
'$0-4999'
'$10000 - 14999'
'$5000 - 9999'

Now using the ACROSS COLUMNS statement I can alter my across values...Just not sure how to handle the BY


WebFOCUS 8201M/Windows Platform
 
Posts: 109 | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
Perform a sort by the range value first (numeric) with a NOPRINT and then by the textual value -
DEFINE FILE GGSALES
  BASE_RANGE/P6 = IF UNITS FROM    0 TO  199 THEN  199
             ELSE IF UNITS FROM  200 TO  399 THEN  399
             ELSE IF UNITS FROM  400 TO  599 THEN  599
             ELSE IF UNITS FROM  600 TO  799 THEN  799
             ELSE IF UNITS FROM  800 TO  999 THEN  999
             ELSE IF UNITS FROM 1000 TO 1199 THEN 1199
             ELSE IF UNITS FROM 1200 TO 1399 THEN 1399
             ELSE IF UNITS GE   1400         THEN 1599;
  RANGE_TXT/A50 = DECODE BASE_RANGE(199   '0 to 199'  399   '200 to 399'  599   '400 to 599'  799   '600 to 799'
                                    999 '800 to 999' 1199 '1000 to 1199' 1399 '1200 to 1399' 1599 '1400 to ~'
                                    ELSE '????');
END

GRAPH FILE GGSALES
SUM CNT.REGION
BY BASE_RANGE NOPRINT
BY RANGE_TXT
ON GRAPH SET GRMERGE ON
END
-RUN

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
Using ROWS ... OVER in GRAPH, you indeed get strange results in your legend.
This can by remedied by first storing the result os the ROWS ... OVER request in a hold f ile and use this hold file as input for the GRAPH.
See following:
[CODE]
TABLE FILE CAR
SUM SALES
BY CAR ROWS 'BMW' OVER 'DATSUN' OVER 'JAGUAR'
BY COUNTRY
ON TABLE HOLD FORMAT ALPHA
END

GRAPH FILE HOLD
SUM SALES
ACROSS COUNTRY
BY E01 AS CAR
HEADING
"Sales per car per country"
ON GRAPH SET LOOKGRAPH 3D_BAR
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D ON
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH SET GRMERGE ON
ON GRAPH PCHOLD FORMAT PNG
END
[/CODE}
In the GRAPH you reference E01 in stead of CAR because the BY ROWS causes the car field to be stored in the master file as a field without a name.
If this is also useable for your problem .... Hope so.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
I tested this out, and the problem is that the ROWS Command may sort within the original table but the subsequent GRAPH command seems to again resort by alpha values...

EX:
 
TABLE FILE CAR
SUM SALES
BY CAR ROWS 'JAGUAR' OVER 'BMW' OVER 'DATSUN'
BY COUNTRY
ON TABLE HOLD FORMAT ALPHA
END
 


The desired output would be Jaguar, BMW, Datsun the actual output in graph form is BMW, Datsun, Jaguar...


WebFOCUS 8201M/Windows Platform
 
Posts: 109 | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
Tony,

Your method works until you add an Across clause, once you add an across, it seems as though the original noprint is ignored...


WebFOCUS 8201M/Windows Platform
 
Posts: 109 | Registered: October 31, 2006Report This Post
Master
posted Hide Post
Try making your values:
$ 0-4999
$ 5000-9999
and $10000-14999


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
Kind of a hack but it works like a charm...

I have implemented it like this until/if I find a better solution.

Thanks


WebFOCUS 8201M/Windows Platform
 
Posts: 109 | Registered: October 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     ROWS..OVER.. With Graphs

Copyright © 1996-2020 Information Builders