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] Getting Wrong Legends

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Getting Wrong Legends
 Login/Join
 
Gold member
posted
Hello everyone,

Below is a part of my code in which I want LEVEL_2 as the legend names but instead of that I'm getting Tkt_counts as legend names which I have set as NOPRINT. Any suggestions??
 
GRAPH FILE RX_CALL_DRIVER
-* Created by Info Assist for Graph
SUM 
    RX_CALL_DRIVER.SEG01.T_TKT_CT/I11C AS ''
BY HIGHEST 10 TOTAL RX_CALL_DRIVER.SEG01.T_TKT_CT NOPRINT
BY RX_CALL_DRIVER.SEG01.LEVEL_2
ACROSS RX_CALL_DRIVER.SEG01.MONTHYEAR
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET GRMERGE ON
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 2
 


Thanks & Regards,
Gaurav Tyagi

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8.1.05
Windows, All Outputs
 
Posts: 58 | Registered: November 19, 2014Report This Post
Guru
posted Hide Post
Hi

This is a friendly follow-up regarding your graph question - getting wrong legends.


Based on your profile here are a few links for WebFOCUS 7.6 version for the Graph Tools:

Creating Charts with Graph Tools

Page: 29 - Graph components

Browse through the document and there should be examples similar to what you are trying to achieve.


The following is a link to Graph API - WebFOCUS Graphics Version 7 Release 6


You will need to logon to the IBI TechSupport Site


Hopefully, the above documentation will provide some assistance.


Thank you for participating in the Focal Point Forum.

Kindest regards,
Tamra Colangelo
Focal Point Moderator
Information Builders Inc.


WebFOCUS 8x - BI Portal, Developer Studio, App Studio, Excel, PDF, Active Formats and HTML5
 
Posts: 487 | Location: Toronto | Registered: June 23, 2009Report This Post
<nick z>
posted
Hi,
You can try the following:

GRAPH FILE RX_CALL_DRIVER
-* Created by Info Assist for Graph
SUM 
    RX_CALL_DRIVER.SEG01.T_TKT_CT/I11C AS ''
BY HIGHEST 10 TOTAL RX_CALL_DRIVER.SEG01.T_TKT_CT NOPRINT
BY RX_CALL_DRIVER.SEG01.LEVEL_2
ACROSS RX_CALL_DRIVER.SEG01.MONTHYEAR
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET GRMERGE ON
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 2
ON GRAPH SET GRXAXIS 1



Basically, you are sorting on a Legend field and therefore you need GRLEGEND 2.
Your X axis field(ACROSS) does not change so it has to remain as 1. Every Sort field has to be accounted for.
Please keep in mind that you will not be able to do this in InfoAssist and therefore you will not be able to reopen IA after making this manual change.

Hope this helps.
Thanks.
Nick.
 
Report This Post
Gold member
posted Hide Post
Thanks for your repoly Nick. I tried your code but I'm still getting Numbers on the legends.

Thanks & Regards,
Gaurav Tyagi


WebFOCUS 8.1.05
Windows, All Outputs
 
Posts: 58 | Registered: November 19, 2014Report This Post
Expert
posted Hide Post
Try -
ON GRAPH SET GRMERGE ADVANCED


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
Gold member
posted Hide Post
Hi Tony,

Thanks for the reply. I got the legends right using your method but now I am getting ten differnet sets of month for each line. Somehow grouping of Across is not working. Please help me out.

Thanks & Regards,
Gaurav Tyagi


WebFOCUS 8.1.05
Windows, All Outputs
 
Posts: 58 | Registered: November 19, 2014Report This Post
Expert
posted Hide Post
What are you trying to achieve? Top 10 overall in the year or top 10 per month?

It might be a suggestion to pre-extract the data to negate the need for the BY HIGHEST 10 TOTAL fieldname within your chart.


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
Expert
posted Hide Post
Something like this -

SET HOLDLIST = PRINTONLY
DEFINE FILE GGSALES
  MONTHYEAR/MYY = DATE;
END
TABLE FILE GGSALES
SUM DOLLARS/I11c
BY HIGHEST 10 TOTAL DOLLARS NOPRINT
BY REGION
BY MONTHYEAR
WHERE MONTHYEAR FROM '01/1996' TO '12/1996'
ON TABLE HOLD AS TEMPDAT1
END
-RUN
GRAPH FILE TEMPDAT1
SUM DOLLARS
BY REGION
ACROSS MONTHYEAR
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 1
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
Gold member
posted Hide Post
Thanks for the reply Tony. But I have tried this approach. If you take a close look here are two codes

CODE 1

 

SET HOLDLIST = PRINTONLY
DEFINE FILE GGSALES
  MONTHYEAR/MYY = DATE;
END
TABLE FILE GGSALES
SUM 
     DOLLARS/I11c
BY TOTAL HIGHEST 10 DOLLARS NOPRINT 
BY  ST
BY  MONTHYEAR
WHERE MONTHYEAR FROM '01/1996' TO '12/1996';
ON TABLE NOTOTAL
ON TABLE HOLD AS TEMPDAT1
END
-RUN
 


CODE 2

 

SET HOLDLIST = PRINTONLY
DEFINE FILE GGSALES
  MONTHYEAR/MYY = DATE;
END
TABLE FILE GGSALES
SUM 
     DOLLARS/I11c
BY TOTAL HIGHEST 10 DOLLARS NOPRINT 
BY  ST
ACROSS MONTHYEAR
WHERE MONTHYEAR FROM '01/1996' TO '12/1996';
ON TABLE NOTOTAL
ON TABLE HOLD AS TEMPDAT1
END
-RUN
 


CODE 1 is the code which you suggested which gives top 10 records from the dataset created but the CODE 2 gives top ten states for each month. CODE 2 required for my graph but if I use it in a temp table then graph doesn't read the month field on top.

I have achived it by using this code

CODE 3

 

SET HOLDLIST = PRINTONLY
DEFINE FILE GGSALES
  MONTHYEAR/MYY = DATE;
END
TABLE FILE GGSALES
SUM 
     DOLLARS/I11c NOPRINT
BY TOTAL HIGHEST 10 DOLLARS NOPRINT 
BY  ST
ACROSS MONTHYEAR NOPRINT
WHERE MONTHYEAR FROM '01/1996' TO '12/1996';
ON TABLE NOTOTAL
ON TABLE HOLD AS TEMPDAT1
END

THEN JOINING THESE STATES with the original table.
-RUN


But I'm still looking out for smaller solution.

Thanks again,
Gaurav Tyagi


WebFOCUS 8.1.05
Windows, All Outputs
 
Posts: 58 | Registered: November 19, 2014Report This Post
Expert
posted Hide Post
quote:
What are you trying to achieve? Top 10 overall in the year or top 10 per month?

Hence my original question.

If you think about your requirement - top 10 values within the month, then the code should reflect that and your ACROSS becomes the first BY :
SET HOLDLIST = PRINTONLY
DEFINE FILE GGSALES
  MONTHYEAR/MYY = DATE;
END
TABLE FILE GGSALES
SUM DOLLARS/I11c
BY MONTHYEAR
BY HIGHEST 10 TOTAL DOLLARS NOPRINT
BY ST
WHERE MONTHYEAR FROM '01/1996' TO '12/1996'
ON TABLE HOLD AS TEMPDAT1
END
-RUN
GRAPH FILE TEMPDAT1
SUM DOLLARS
BY ST
ACROSS MONTHYEAR
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 1
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
Gold member
posted Hide Post
Hi Tony,

I ran your code and it is giving me 11 States not 10.

Thanks & Regards,
Gaurav Tyagi


WebFOCUS 8.1.05
Windows, All Outputs
 
Posts: 58 | Registered: November 19, 2014Report 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] Getting Wrong Legends

Copyright © 1996-2020 Information Builders