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.
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>,
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, 2011
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.
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.
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