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] Can I remove the () from Pie Chart labels?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Can I remove the () from Pie Chart labels?
 Login/Join
 
Member
posted
I need to remove the () from around the percentage (17.64%) labels on the pie chart. Is there a graph_script that does this for me?

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


7703
 
Posts: 3 | Registered: May 24, 2012Report This Post
Gold member
posted Hide Post
quote:
Originally posted by Angela Atkinson:
I need to remove the () from around the percentage (17.64%) labels on the pie chart. Is there a graph_script that does this for me?


Hi Angela,

Welcome to Focal Point!

It's always easier for anyone to help you out if you replicate your problem using any of the sample databases that come with Dev Studio. The most used one is the CAR table.


WebFOCUS App Studio 8103
Windows7
All outputs
 
Posts: 58 | Location: London, UK | Registered: May 09, 2011Report This Post
Expert
posted Hide Post
Hi Angela,
If you have brackets around a percentage, I will guess that your calculation has a format of something like PROFIT/P9.2BC, which means, the result, if negative, is bracketed.

Is this correct?
Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Member
posted Hide Post
Correct Tom. But these are not negative numbers nor does my calculation produce negative numbers


7703
 
Posts: 3 | Registered: May 24, 2012Report This Post
Expert
posted Hide Post
Hi Angela,

Well "IF" they are not suppose to be negative, then:
  
COMPUTE NEW_VAL/P7.2% = IF YOUR_COLUMN_NAME LT 0 THEN YOUR_COLUMN_NAME * (-1) ELSE YOUR_COLUMN_NAME;

hth


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Member
posted Hide Post
Thanks but I think it has something to do with the setting setPieLabelDisplay(). If I put it as setPieLabelDisplay(0) then it gives me 17.64% but I need more to the label. I need "Trails: 17.64%" which setPieLabelDisplay(4) gives me that but it also adds the () to the percent. I may have to customize my label in the hold file and use it.


7703
 
Posts: 3 | Registered: May 24, 2012Report This Post
Expert
posted Hide Post
Hi Angela,
Well I don't see 4 as a value, but, very good that you are trying things on your own before coming here for answers!!! KUDOS...

Anyway, here is the link that to the guide that IBI uses in their Graph interface...

Perspective for Java Guide

hth


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Master
posted Hide Post
When you set the PieLabelDisplay property to '3', you will see the series label and then the percent value set off parenthetically:
 APP PREPENDPATH IBISAMP
-RUN
DEFINE FILE CAR
PROFIT/D10.2 = RCOST - DCOST;
END
-*
GRAPH FILE CAR
SUM PROFIT AS ''
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 GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 0
ON GRAPH SET LOOKGRAPH PIE
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
 INCLUDE=ENgradient_combine.sty,$
-* API methods.
*GRAPH_SCRIPT
 setLegendDisplay(false);
 setPieFeelerTextDisplay(1);
 setPieLabelDisplay(3);
*END
ENDSTYLE
END 


If you want to customize the label, try creating a COMPUTEd field:
 APP PREPENDPATH IBISAMP
-RUN
DEFINE FILE CAR
PROFIT/D10.2 = RCOST - DCOST;
END
-*
TABLE FILE CAR
 SUM PROFIT
 COMPUTE PPERCENT/D10 = PROFIT / TOT.PROFIT * 100;
 COMPUTE CSORT/A50 = 'Country: ' | COUNTRY | 'Percentage: ' | (LJUST(15,(FTOA(PPERCENT,'(D10)','A15')),'A15')) ||
                     '%';
 BY COUNTRY
ON TABLE HOLD AS HLDIT
END
-RUN
-*
GRAPH FILE HLDIT
SUM PROFIT AS ''
BY  CSORT
ON GRAPH PCHOLD FORMAT JSCHART
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 0
ON GRAPH SET LOOKGRAPH PIE
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
 INCLUDE=ENgradient_combine.sty,$
-* API methods.
*GRAPH_SCRIPT
setLegendDisplay(false);
setPieFeelerTextDisplay(1);
setPieLabelDisplay(2);
*END
ENDSTYLE
END 





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
  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] Can I remove the () from Pie Chart labels?

Copyright © 1996-2020 Information Builders