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 to display data next to its legend

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]pie graph to display data next to its legend
 Login/Join
 
Member
posted
Hi All,
I'm new in webfocus. I have this code below to create a pie chart. But I don't know how display the value(group value) next to its legend. do have any Idea? Please help... thanks.

GRAPH FILE MYTABLE
SUM SHIPMENTCOUNT
BY ROUTECOUNTRYNAME
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRWIDTH 0
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH PIE
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);
setDisplay(getLegendArea(),true);
setPieFeelerTextDisplay(0);
setDisplay(getPieLabel(),false);
setPieLabelDisplay(0);
setLegendPosition(2);

*END
ENDSTYLE
END

This message has been edited. Last edited by: <Emily McAllister>,


WebFOCUS 8
Windows, All Outputs
 
Posts: 5 | Registered: October 05, 2015Report This Post
Master
posted Hide Post
Welcome to WF..

First of all, when posting examples, I would suggest trying to reproduce your issue using the CAR or SALES file, so that people can take your code change it, then repost to get the response your looking for. Make it easier on us to help you and not try to translate what you have into a CAR for ourselves to help.

To your issue. By altering the legend, your going to automatically alter the tool tip. This is because the legend comes from the same column that part of your tooltip comes from. So you will need to modify the tooltip so the total doesn't show up twice.

This is how I would do it:

DEFINE FILE CAR
CARSALES/A11=FTOA(CAR.BODY.SALES,'(D9)','A11');
NEWCAR/A255=CAR.COMP.CAR || ' ( ' || CARSALES || ' )';
END

GRAPH FILE CAR
SUM CAR.BODY.SALES
BY NEWCAR
WHERE CAR.BODY.SALES GT 0
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 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 0
ON GRAPH SET LOOKGRAPH PIEMULTI
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=&WF_TITLE.QUOTEDSTRING, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setPieFeelerTextDisplay(3);
setLegendPosition(2);
*END
*GRAPH_JS
series: [
	{
		'series': 'reset',
		tooltip: function(d,s,g){ return this.getSeries(s).label; }
	},
],
*END
ENDSTYLE
END
-RUN


Hope that helps



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Member
posted Hide Post
Thanks a lot. Smiler


WebFOCUS 8
Windows, All Outputs
 
Posts: 5 | Registered: October 05, 2015Report 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 to display data next to its legend

Copyright © 1996-2020 Information Builders