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     Legend for Second BY Field

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Legend for Second BY Field
 Login/Join
 
Member
posted
All,
Please see the example CAR Graph file code pasted below. There are 2 BY fields in the Graph code and i have set GMERGE=ON. My requirement is to sort the legend descending by RETAIL_COST but display the CAR names in the legend. But ,currently i am getting the RETAIL_COST values getting displayed in the legend. Any help is much appreciated.


GRAPH FILE CAR
SUM
COMPUTE MTRC/D12 = SALES;
BY HIGHEST RETAIL_COST AS '' NOPRINT
BY CAR
ACROSS COUNTRY AS ''
FOOTING
""
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO ON
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET HAXIS 950
ON GRAPH SET VAXIS 250
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET GRMERGE ON
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBIDefault.txt");
setTransparentBorderColor(getChartBackground(),false);
-*setTransparentBorderColor(getChartBackground(),true);
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setTransparentBorderColor(getSeries(2),true);
setTransparentBorderColor(getSeries(3),true);
setTransparentBorderColor(getSeries(4),true);
setTransparentBorderColor(getSeries(5),true);
setTransparentBorderColor(getSeries(6),true);
setTransparentBorderColor(getSeries(7),true);
setTransparentBorderColor(getSeries(8),true);
setTransparentBorderColor(getSeries(9),true);
setTransparentBorderColor(getSeries(10),true);
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDepthRadius(0);
setPlace(true);
setDisplay(getY1Label(),true);
setTextString(getO1Title(),"");
setTextString(getY1Title(),"");
setDisplay(getTitle(),true);
setFontSizeAbsolute(getTitle(),true);
setFontSizeInPoints(getTitle(),10);
setPlaceResize(getTitle(),0);
setDisplay(getO1MajorGrid(),true);
setDisplay(getO1MinorGrid(),false);
setLineWidth(getY1MajorGrid(),0);
setLineBasicStrokeType(getY1MajorGrid(),0);
setMajorGridDrawEveryCount(getY1MajorGrid(),1);
setGridStyle(getY1MajorGrid(),0);
setDisplay(getY1MinorGrid(),false);
setDisplay(getO1Label(),true);
setDisplay(getLegendArea(),true);
setFontSizeInPoints(getDataText(0),30);
setPlaceResize(getDataText(0),0);
setFontSizeAbsolute(getDataText(0),false);
setFontSizeAbsolute(getO1Label(),true);
setFontSizeInPoints(getO1Label(),8);
setPlaceResize(getO1Label(),0);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeInPoints(getY1Label(),8);
setPlaceResize(getY1Label(),0);
setTextFormatPattern(getY1Label()," 0000");
setFontSizeAbsolute(getLegendText(),true);
setFontSizeInPoints(getLegendText(),8);
setPlaceResize(getLegendText(),0);
setDataLineThickness(5);
setTextRotation(getO1Label(),0);
setLegendDisplay(getSeries(1),true);

-* determines angle of X axis labels
setTextRotation(getO1Label(),3);
-*******************************************
-* Legend commands
setFontSizeAbsolute(getLegendText(),true);
setFontSizeInPoints(getLegendText(),8);
setLegendPosition(2);
setPlaceResize(getLegendText(),0);
setRect(getLegendArea(), new Rectangle(0, 0, 2000, 16000));
-* synchs the series marker shapes (setMarkerSize) with the legend
-*setUseSeriesShapes(true);

ENDSTYLE
END


Webfocus 7702
Unix
All outputs
 
Posts: 11 | Registered: October 28, 2011Report This Post
<Kathryn Henning>
posted
Hi Sivashankari,

I'd like to recommend opening a case on InfoResponse Online to work through this issue.

Regards,

Kathryn
 
Report This Post
Gold member
posted Hide Post
Hi,

while I could not find a "complete" solution to your problem, maybe the following work-around will help while waiting for an answer from IBI-support:

 
TABLE FILE CAR
SUM
  SALES
  COMPUTE ROW_NUM/I4 = LAST ROW_NUM + 1;
  COMPUTE NUMERATED_CAR/A60 = FTOA(ROW_NUM, '(D4c)', 'A4') || ' ' | CAR;
BY HIGHEST RETAIL_COST
BY CAR 
BY COUNTRY
ON TABLE HOLD AS HTMP FORMAT FOCUS
END

GRAPH FILE HTMP
SUM
COMPUTE MTRC/D12 = SALES;
-* BY HIGHEST RETAIL_COST AS '' NOPRINT
BY NUMERATED_CAR
ACROSS COUNTRY AS ''
....


The drawback: you will not get the actual "CAR" as string but "1 MASERATI", "2 BMW"... but at least you can generate the desired ordering + have the CAR (string) you want included in the legend.

Cheers Linne


WebFOCUS 7.7.03
 
Posts: 67 | Registered: January 05, 2011Report This Post
Member
posted Hide Post
Thanks for the comments Linnex and Kathryn


Webfocus 7702
Unix
All outputs
 
Posts: 11 | Registered: October 28, 2011Report 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     Legend for Second BY Field

Copyright © 1996-2020 Information Builders