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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
pie chart - legend
 Login/Join
 
Platinum Member
posted
I have a pie chart that I'm creating. The business wants it sorted by the major and minor class code but they want to see the minor description in the legend instead of the code. I combined the major and minor code into one field and I'm sorting the report by that field so the graph is sorted correctly, but how do I get the description to appear in the legend instead of the codes? Thanks.

SET PAGE-NUM=NOPAGE
SET PRINTPLUS=ON
SET COMPOUND=OPEN

SET LOOKGRAPH=PIE
SET 3D=OFF
GRAPH FILE HOLD220
SUM PCT.MKT_VL AS ""
BY MAJMINCLASS AS ""
WHERE MKT_VL IS-NOT MISSING AND MKT_VL GT 0
ON GRAPH SET VAXIS 4
ON GRAPH SET HAXIS 6
ON GRAPH SET GRAPHSTYLE *
setFillColor(getSeries(0),new Color(0,0,255)); blue
setFillColor(getSeries(1),new Color(0 255 0)); lime green
setFillColor(getSeries(2),new Color(255,0,255)); fuscia
setFillColor(getSeries(3),new Color(255,255,0)); yellow
setFillColor(getSeries(4),new Color(0,255,255)); aqua
setFillColor(getSeries(5),new Color(50,153,204)); sky blue
setFillColor(getSeries(6),new Color(255,0,0)); red
setFillColor(getSeries(7),new Color(0,0,128)); navy
setFillColor(getSeries(8),new Color(0,128,128)); teal
setFillColor(getSeries(9),new Color(128,0,0)); maroon
setFillColor(getSeries(10),new Color(192,192,192)); silver
setFillColor(getSeries(11),new Color(128,0,128)); purple
setFillColor(getSeries(12),new Color(0,128,0)); green
setFillColor(getSeries(13),new Color(127,255,0)); medium spring green
setRect(getFrame(),new Rectangle(-12000,-8000,21000,18000));
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(false);
setUseSeriesBorderDefaults(true);
setFillMissingData(0);
setLegendPosition(2);
setPlace(true);
ENDSTYLE
ON GRAPH SAVE AS ALLOCGR FORMAT SVG
END


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
 
Posts: 179 | Registered: November 10, 2004Report This Post
<JG>
posted
Pam, Everything in WebFocus is a variation on a theme.

This is a variation on a previous post on using the API to control display text.

What you put where is totally up to you. (almost).

SET HOLDLIST = PRINTONLY
TABLE FILE CAR
SUM
COMPUTE COUNTER/I2=LAST COUNTER + 1; NOPRINT
COMPUTE LEGENDTEXT/A20=DECODE COUNTER(1 'Everything'
2 'is a'
3 'variation'
4 'on a'
ELSE 'theme'); NOPRINT
COMPUTE GVALUES/A50='"' || LEGENDTEXT || '",';

BY COUNTRY NOPRINT
ON TABLE SAVE
END
-RUN

GRAPH FILE CAR
"Every thing is a variation on a theme"
SUM DEALER_COST
ACROSS COUNTRY
ON GRAPH SET LOOKGRAPH PIEMULTI
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH SET GRAPHSTYLE *
setSeriesLabelArray(
-INCLUDE SAVE
);
setMarkerDisplay(false);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(false);
setO1AxisSide(0);
setO1MajorGridDisplay(false);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setY1LabelDisplay(false);
setY1AxisSide(0);
setY1MajorGridDisplay(false);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(0);
setPieLabelDisplay(2);
setTextFormatPreset(getPieSliceLabel(),2);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
PAGESIZE='Letter',
LEFTMARGIN=0.250000,
RIGHTMARGIN=0.250000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
BACKCOLOR='NONE',
STYLE=NORMAL,
$
ENDSTYLE
END
 
Report This Post
Platinum Member
posted Hide Post
this worked perfectly! Thanks.


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
 
Posts: 179 | Registered: November 10, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders