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] Multiple Pie Charts In One GRAPH FILE Command.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Multiple Pie Charts In One GRAPH FILE Command.
 Login/Join
 
Master
posted
I am creating a Vertical Stacked Bar Chart with the following GRAPH FILE command:
GRAPH FILE CAR
SUM    DEALER_COST
       RETAIL_COST
BY     COUNTRY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET GRMERGE OFF
ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET AUTOFIT ON
END  

I see each country as one single bar, and each bar is divided into Dealer and Retail Cost.

I would now like to see each bar/country as a single Pie Chart.

Here is the code I have so far:
GRAPH FILE CAR
SUM    DEALER_COST
       RETAIL_COST
BY     COUNTRY
ACROSS COUNTRY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 1
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH PIEMULTR
ON GRAPH SET AUTOFIT ON
END  

This seems to work for the first country 'ENGLAND', but for the 2nd COUNTRY I see two pie charts (one being an empty pie), and for the third COUNTRY I see three charts (two being empty pies)...

How do I only see one chart per country?

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




Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
 
Posts: 822 | Registered: April 23, 2003Report This Post
Expert
posted Hide Post
Check out GRMERGE.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Master
posted Hide Post
quote:
Originally posted by Doug:
Check out GRMERGE.
Thanks Doug, I did review GRMERGE, but am not able to descern how to set, in order to get the results I am looking for.

My current GRMERGE settings, are giving me instances for each COUNTRY, but only 'ENGLAND' has the one pie I am looking for.
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 1
ON GRAPH SET GRLEGEND 0 
ON GRAPH SET GRXAXIS 1 
 
Posts: 822 | Registered: April 23, 2003Report This Post
Expert
posted Hide Post
Hi David,

Does this give you what you are after?
ON GRAPH SET GRMERGE ON

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
Master
posted Hide Post
I used the MacGyver technique to create a new field: COST_TYPE. Once I did that the GRAPH FILE command seemed easier to write, so I'd get one pie chart for each COUNTRY:
FILEDEF FSEQ DISK common/fseq.txt
-RUN
JOIN CLEAR *
JOIN BLANK WITH DEALER_COST IN CAR TO BLANK IN FSEQ AS J1
DEFINE FILE CAR
 BLANK/A1 WITH DEALER_COST = ' ';
 COST_TYPE/A10 = IF COUNTER EQ 1 THEN 'DEALER' ELSE 'RETAIL';
 COST/D12.2 = IF COUNTER EQ 1 THEN DEALER_COST ELSE RETAIL_COST;
END
TABLE FILE CAR
SUM   COST
BY    COUNTRY
BY    COST_TYPE
IF COUNTER LE 2
ON TABLE HOLD AS FOCCACHE/HLDCOST
END
-RUN
ENGINE INT CACHE SET ON
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='205.0';
-DEFAULTH &WF_STYLE_WIDTH='350.0';
GRAPH FILE HLDCOST
SUM HLDCOST.HLDCOST.COST
BY HLDCOST.HLDCOST.COUNTRY
BY HLDCOST.HLDCOST.COST_TYPE
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 GRWIDTH 2
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 1
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH PIERING
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setPieFeelerTextDisplay(1);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT='WebFOCUS Report', $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*END
ENDSTYLE
END  
 
Posts: 822 | Registered: April 23, 2003Report 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] Multiple Pie Charts In One GRAPH FILE Command.

Copyright © 1996-2020 Information Builders