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     Pie Graph display problem

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Pie Graph display problem
 Login/Join
 
Member
posted
I'm trying to display a 3D pie graph with a legend. This graph will appear in a pdf to the right of a grid laid out something like this

------------+-------
AssetType | % Par
============+=======
HYL | 76.03
------------+-------
HYB | 10.07
------------+-------
REV | 9.42
------------+-------
SWAP CLN | 1.72
------------+-------
IGL | 0.85
------------+-------
CASH | 0.15
------------+-------[/code]I can get the pie with feeler labels showing the percentages, but the colored legend to the right only shows "-- ------" for a label.

How can I get the AssetType column to appear as a legend?

Data Code:
[code]FILEDEF ASSETGR DISK &ASSETGRPATH
SET GRAPHSERVURL=http://IMWFPR01/ibi_apps/IBIGraphServlet
IBIGraphServlet
SET LOOKGRAPH=PIE
SET GRAPHEDIT=SERVER
SET 3D=ON
GRAPH FILE ATHOLD
HEADING CENTER
"Aggregate Investments By Asset Type"
-IF '&Type.EVAL' EQ 'ALL' THEN GOTO PRINT_AT;
"As Of: &DisplayDate"
-PRINT_AT
PRINT
AssetTypeID
GRA_PctPar AS '% Par'

ON GRAPH SET GRAPHSTYLE *
setAutofit(getLegendText(),true);
setAutoshading(true);
setLegendTextAutofit(true);
setLegendDisplay(true);
setLegendAutomatic(true);
setTitleString("Aggregate Investments by Asset Type");
setTextJustHoriz(getTitle(),1);
setPieTilt(45);
setPieDepth(80);
setFontSize(getTitle(),12);
We're on 5.2.4

Thanks in advance!

This message has been edited. Last edited by: <Mabel>,
 
Posts: 21 | Location: Springfield, MA | Registered: August 17, 2004Report This Post
Guru
posted Hide Post
Shouldn't "AssetTypeID" be a BY field?
 
Posts: 391 | Location: California | Registered: April 14, 2003Report This Post
Member
posted Hide Post
You're right - should be a BY field!

Code now reads:

FILEDEF ASSETGR DISK &ASSETGRPATHSET
GRAPHSERVURL=http://IMWFPR01/ibi_apps/IBIGraphServletIBIGraphServlet
SET LOOKGRAPH=PIE
SET GRAPHEDIT=SERVER
SET 3D=ON
GRAPH FILE ATHOLD
HEADING CENTER"Aggregate Investments By Asset Type"
-IF '&Type.EVAL' EQ 'ALL' THEN GOTO PRINT_AT;
"As Of: &DisplayDate"
-PRINT_AT
PRINT
GRA_PctPar AS '% Par'
BY AssetTypeID
ON GRAPH SET GRAPHSTYLE *
setAutofit(getLegendText(),true);
setAutoshading(true);
setLegendTextAutofit(true);
setLegendDisplay(true);
setLegendAutomatic(true);
setTitleString("Aggregate Investments by Asset Type");
setTextJustHoriz(getTitle(),1);
setPieTilt(45);
setPieDepth(80);
setFontSize(getTitle(),12);

ENDSTYLE
ON GRAPH HOLD AS ASSETGR FORMAT GIF

END[/code]Same result, though ....

This message has been edited. Last edited by: <Mabel>,
 
Posts: 21 | Location: Springfield, MA | Registered: August 17, 2004Report This Post
Guru
posted Hide Post
I've tried your code on another pie chart and gotten labels on the legend. There may be something different about your data?
 
Posts: 391 | Location: California | Registered: April 14, 2003Report This Post
Member
posted Hide Post
Thanks for bearing with me.

I've isolated my graphing code out of the main procedure so that it just displays the graph (without the accompanying grid).

Now I see zeros in the Legend text area! As a matter of fact, now that the chart loads as a java applet (as opposed to being embedded as a GIF), I can run the mouse over each pie slice and get a tooltip showing 0 (DataText) on the top, followed by the '% Par' , followed by the actual data value.

Looking at the underlying source reveals something interesting, though.





The generated java applet settings are in plain site and I notice that the setSeriesLableArray method initializes the AssetType labels that I expect to see as zeros! Hmm... The DataSeries array looks OK.

How do I get the AssetTypeID strings to print here without having to hardcode them?

This message has been edited. Last edited by: <Mabel>,
 
Posts: 21 | Location: Springfield, MA | Registered: August 17, 2004Report This Post
Member
posted Hide Post
Shouldn't the values of the BY clause show as legend text??
 
Posts: 21 | Location: Springfield, MA | Registered: August 17, 2004Report This Post
Member
posted Hide Post
Got it! (kinda silly, too)

Again, Nicola, you hit it right on your second reply about data. I had to do a join to get data together to perform the ratio calculation. The "joined" column name for AssetTypeID ended up as E02.

I just DEFINEd a new column (AssetType) as /A8 and used the AssetTypeID column from the joined table (ATHOLD). The BY clause refers to the new AssetType field and prints out like a charm.

I'm surprised that the AssetTypeID column could not be used naturally from the joined table. At least in the SQL world there is no guess work like this.

Thanks for your help!
 
Posts: 21 | Location: Springfield, MA | Registered: August 17, 2004Report 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     Pie Graph display problem

Copyright © 1996-2020 Information Builders