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     [SOLVED]Pie graph sorting

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Pie graph sorting
 Login/Join
 
Gold member
posted
I have a pie graph which needs to be sorted by one field and display a different field as legend.
HDSTAT1 is defined as;
   
 dataStatusID                      E01           I11         MISSING = ON
 dataStatusName                    E02           A100        MISSING = ON
 statusCount                       E03           I11         MISSING = ON
 sortOrder                         E04           I11


I need to sort the graph by sortOrder, but display the corresponding dataStatusName as legend.
I have looked at all realted Focal Point posts. Some suggests to concatenate % value before the legend item name which we are already doing in other graphs.
In this case we do not want to show the sort order, just use it to sort the graph. I tried through AGA tool as well as manually changing the code. I think this may be an enhancement request for IBI. Really appreciate if you could suggest any other solution.
Thank you.

 
GRAPH FILE HDSTAT1
-* Created by Advanced Graph Assistant
SUM HDSTAT1.HDSTAT1.statusCount
BY HDSTAT1.HDSTAT1.dataStatusName
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH PIESINGL
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 0
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBISouthWestern.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDepthRadius(5);
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setTransparentBorderColor(getSeries(2),true);
setTransparentBorderColor(getSeries(3),true);
setTransparentBorderColor(getSeries(4),true);
setTransparentBorderColor(getSeries(5),true);
setTransparentBorderColor(getSeries(6),true);
setTransparentBorderColor(getSeries(7),true);
setTransparentBorderColor(getSeries(8),true);
setTransparentBorderColor(getSeries(9),true);
setTransparentBorderColor(getSeries(10),true);
setPieDepth(10);
setTransparentBorderColor(getChartBackground(),true);
setPlace(true);
setPieFeelerTextDisplay(0);
ENDSTYLE
END
-RUN

  
  

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


7.6.9, XP
 
Posts: 60 | Location: Cary, NC | Registered: February 19, 2008Report This Post
<JG>
posted
 
Report This Post
Gold member
posted Hide Post
Hello,

Try adding a BY NOPRINT field that you want to sort the graph by, but no show on the legend.

I would suggest the following:

GRAPH FILE HDSTAT1
-* Created by Advanced Graph Assistant
SUM HDSTAT1.HDSTAT1.statusCount
BY SortOrder NOPRINT
BY HDSTAT1.HDSTAT1.dataStatusName
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH PIEMULTI
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBISouthWestern.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDepthRadius(5);
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setTransparentBorderColor(getSeries(2),true);
setTransparentBorderColor(getSeries(3),true);
setTransparentBorderColor(getSeries(4),true);
setTransparentBorderColor(getSeries(5),true);
setTransparentBorderColor(getSeries(6),true);
setTransparentBorderColor(getSeries(7),true);
setTransparentBorderColor(getSeries(8),true);
setTransparentBorderColor(getSeries(9),true);
setTransparentBorderColor(getSeries(10),true);
setPieDepth(10);
setTransparentBorderColor(getChartBackground(),true);
setPlace(true);
setPieFeelerTextDisplay(0);
ENDSTYLE
END
-RUN
 
Posts: 52 | Registered: January 19, 2007Report This Post
Gold member
posted Hide Post
JG and VLozovsky,
your solution works for other graph types, but not for pie graphs. I tried thru Advanced graph tool as well adding additional BY field with NOPRINT thru code. The tool doesn't doesn't let you have two BY fields. If you manually change the code, you get an error, (FOC32466) MERGE DIMENSIONS EXCEED THE NUMBER OF SORT FIELDS.
Thanks.


7.6.9, XP
 
Posts: 60 | Location: Cary, NC | Registered: February 19, 2008Report This Post
Expert
posted Hide Post
? 32466
-EXIT

Self-explanatory...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Gold member
posted Hide Post
Tom,
Thank you so much. I fixed the graph as suggested in the message and it works great! I really appreciate that. Also, you showed me a way to get description for errors
quote:
? 32466

Thanks again.


7.6.9, XP
 
Posts: 60 | Location: Cary, NC | Registered: February 19, 2008Report This Post
Expert
posted Hide Post
CT,

You're welcome. Some messages are great, some, not so much.

Have Fun! Smiler


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 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     [SOLVED]Pie graph sorting

Copyright © 1996-2020 Information Builders