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     pareto x-axis question...

Read-Only Read-Only Topic
Go
Search
Notify
Tools
pareto x-axis question...
 Login/Join
 
<Shane>
posted
I'm developing a pareto graph that we're sorting by value via a hold file. The graph is presenting the value of the bar and the name of the car like in the following example:

TABLE FILE CAR
SUM
     SALES
BY HIGHEST SALES NOPRINT
BY CAR
ON TABLE NOTOTAL
ON TABLE HOLD
END
GRAPH FILE HOLD
SUM SALES AS ''
BY HIGHEST SALES AS ''
BY CAR
WHERE SALES NE 0;
ON GRAPH SET LOOKGRAPH PARETO
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 600
ON GRAPH SET HAXIS 800
ON GRAPH SET UNITS PIXELS
ON GRAPH SET GRMERGE ON
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getY2Label(),false);
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setY1LabelDisplay(true);
setY2LabelDisplay(false);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY2MajorGridDisplay(false);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setTemplateFile("/images/tdg/template/IBISouthWestern.txt");
setPlace(true);
-***************************************
-*Sets border around graph to transparent
setTransparentBorderColor(getChartBackground(), true);
ENDSTYLE
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET STYLE *
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
ENDSTYLE
END


Does anyone know how to get only the car to display on the x-axis?

Shane
 
Report This Post
Expert
posted Hide Post
TABLE FILE CAR
SUM
     SALES
BY HIGHEST SALES NOPRINT
BY CAR
ON TABLE NOTOTAL
ON TABLE HOLD
END
GRAPH FILE HOLD
PRINT SALES AS ''
-*BY HIGHEST SALES AS ''
BY CAR
WHERE SALES NE 0;
etc.  


Your sales are already sorted by highest so all you have to do is print them in the graph request.

Does that do it for you?


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
<Shane>
posted
Ginny,

Sorry...posted the wrong code...

GRAPH FILE CAR
SUM COMPUTE SALES2 = SALES; AS ''
BY HIGHEST SALES2 AS ''
BY CAR
WHERE SALES NE 0;
ON GRAPH SET LOOKGRAPH PARETO


Shane
 
Report This Post
Expert
posted Hide Post
How 'bout this:

TABLE FILE CAR
SUM COMPUTE SALES2 = SALES; AS ''
BY HIGHEST SALES2 AS ''
BY CAR
WHERE SALES NE 0;
ON TABLE NOTOTAL
ON TABLE HOLD
END
-*-EXIT
GRAPH FILE HOLD
PRINT SALES2
-*BY HIGHEST SALES2 AS ''
BY CAR
-*WHERE SALES NE 0;
ON GRAPH SET LOOKGRAPH PARETO
END  


I have a habit of getting all the data ready to graph before I actually graph it. I do all the massaging ahead of time, hold it, and then graph.

Well?


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
<Shane>
posted
We're doing our best to not use hold files unless absolutely necessary.

Shane
 
Report This Post
Expert
posted Hide Post
I understand, but you really can't have two sorts in a graph. And in this case, by the time you get to the graph, your hold file is teeny-tiny.

Remember the baby and the bath water.

And is the result what you want?


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
Guru
posted Hide Post
Shane:
Ginny's HOLD file reduces the time to create the graph significantly on my machine.

Here's another approach:

TABLE FILE CAR
SUM COMPUTE SALES2 = SALES; AS ''
RANKED AS 'RANK' BY HIGHEST SALES2
BY CAR
WHERE SALES NE 0;
ON TABLE NOTOTAL
ON TABLE HOLD
END
-RUN
DEFINE FILE HOLD
RANK2/A1=CTRAN(1,' ',32,RANK,RANK2);
CAR2/A50V=RANK2||CAR;
END
GRAPH FILE HOLD
PRINT SALES2
BY CAR2
ON GRAPH SET LOOKGRAPH PARETO

(then finish with the rest of your code)
Greg



Greg



current client: WF 8.1.05 & 8.2 - Windows 7 64bit - Tomcat 7 - MRE / BID - IE11

local: WF 8.2 - Windows 7 64bit - Tomcat 6 - MRE / BID - FOCUS - IE11

PMF 8
 
Posts: 274 | Location: Boston/New England | Registered: February 12, 2006Report This Post
<Shane>
posted
Ginny,

This doesn't exactly get us what we need. We need the pareto to order by the highest value to the lowest value from left to right and not display the value:car on the x-axis.

Shane
 
Report This Post
<Shane>
posted
Greg,

That gets us what we want. Although when I run it, it displays a weird empty box just before the Car value...

Still wish we could do this without a hold file.

Shane
 
Report This Post
Guru
posted Hide Post
Shane:
What I did is create unprintable characters in place of the RANK. I'm not sure how to hide the boxes. Also, the unprintable characters would eventually be real characters if you had many bars to graph.

Greg



Greg



current client: WF 8.1.05 & 8.2 - Windows 7 64bit - Tomcat 7 - MRE / BID - IE11

local: WF 8.2 - Windows 7 64bit - Tomcat 6 - MRE / BID - FOCUS - IE11

PMF 8
 
Posts: 274 | Location: Boston/New England | Registered: February 12, 2006Report This Post
<Shane>
posted
Well, now we have a new problem. We can do this over the CAR file fine...however when we run this against a production file, it doesn't display the X-axis labels.

DEFINE FILE ODS_HJ_TRANSACTIONS
DEFECT_TYPE_REASON/A150 = DEFECT_TYPE || ' - ' || DEFECT_REASON;
END

TABLE FILE ODS_HJ_TRANSACTIONS
SUM COMPUTE TOT_DEFECT = DEFECT_PRODUCED + DEFECT_RETURNED + DEFECT_SORTED; AS ''
RANKED AS 'RANK' BY HIGHEST 10 TOT_DEFECT
BY DEFECT_TYPE_REASON
WHERE PLANT EQ &PLANT;
WHERE PLANT NE 'N/A';
WHERE DEPARTMENT EQ &DEPT;
WHERE DEPARTMENT NE 'N/A';
WHERE WORK_CENTER EQ &WORKCENTER;
WHERE WORK_CENTER NE 'N/A';
WHERE ( EFFECTIVE_DATE GE DT(&START_DATE.StartDate.) ) AND ( EFFECTIVE_DATE LE DT(&END_DATE.EndDate.) );
ON TABLE NOTOTAL
ON TABLE HOLD
END
-RUN

DEFINE FILE HOLD
RANK2/A1=CTRAN(1,'',32,RANK,RANK2);
BY2/A151V=RANK2||DEFECT_TYPE_REASON;
END

GRAPH FILE HOLD
PRINT TOT_DEFECT AS ''
BY BY2 AS 'Defect Type - Reason'
ON GRAPH SET LOOKGRAPH PARETO
...


We have setO1LabelDisplay(true); but it acts like it ignores it.

Shane
 
Report 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     pareto x-axis question...

Copyright © 1996-2020 Information Builders