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] Total on across label

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Total on across label
 Login/Join
 
Member
posted
Hi,

I'm kind of a noob in WF and i'm trying to create a graph report that is presented using a % stacked bar (VBRSTKPC)but I want to show the total value on each bar label.

Something like this:

GRAPH FILE CAR
SUM CAR.BODY.DEALER_COST
CAR.BODY.SALES
CAR.BODY.RETAIL_COST
ACROSS CAR.ORIGIN.COUNTRY
ON GRAPH SET LOOKGRAPH VBRSTKPC
ON GRAPH SET GRAPHSTYLE *
setDisplay(getDataTextStackedTotalOnTop(), true);
setFillColor(getDataTextStackedTotalOnTop(),new Color(0,0,255));
setDataTextPosition(0);
setTextRotation(getDataTextStackedTotalOnTop(), 0);
setO1LabelRotate(0);
setPlace(true);
END
-EXIT


SO, I want the real value on the labels (like 'FRANCE 100k')

Thanks in advance!

Pedro

This message has been edited. Last edited by: pferreira,


WF 8.0.02 @ Linux environment
 
Posts: 12 | Registered: May 15, 2012Report This Post
Expert
posted Hide Post
edit your profile to say what version you are in.
No way using the tool, but there is a way using alot of custom code. you would first create an extract file with the country names and values, read them out into &variables, and then use the ANNOTATION feature in the tool, which basically puts strings of text anywhere you want them.
But since you're a newby, use the regular tool for a while, then come to Summit, and you'll be ready for advanced coolness.
also, LEGEND and LABEL are different concepts, so make sure you know which one you want. Since you say 'FRANCE....' , you're probably referring to LEGEND




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Member
posted Hide Post
Well, first of all, it's weird that my signature doesn't show my full profile since it is complete with all information os sw versions, perhaps there is something that I have to enable.. i'll check it.

Anyway WF & WFDTools 7702.

I managed to find a way to do it (I almost never use the building tool), I just imagined that there might be a better way, but here it is:


-*#### SUM EVERYTHING
DEFINE FILE CAR
ALLSUM/D20 = CAR.BODY.DEALER_COST + CAR.BODY.SALES + CAR.BODY.RETAIL_COST;
END

-*#### CREATE LABELS
TABLE FILE CAR
SUM ALLSUM NOPRINT
COMPUTE XLABEL/A60 = CAR.ORIGIN.COUNTRY | '\n'|'$'| EDIT(FTOA(ALLSUM, '(D6)','A8'),'999$999$99');
BY CAR.ORIGIN.COUNTRY NOPRINT
-*ON TABLE PCHOLD FORMAT HTML
ON TABLE HOLD AS LABELS FORMAT COM
END
-RUN

GRAPH FILE CAR
SUM CAR.BODY.DEALER_COST
CAR.BODY.SALES
CAR.BODY.RETAIL_COST
ACROSS CAR.ORIGIN.COUNTRY
ON GRAPH SET LOOKGRAPH VBRSTKPC
ON GRAPH SET GRAPHSTYLE *
setLegendDisplay(true);
setLegendPosition(5);
setO1LabelRotate(0);
setFontSizeAbsolute(getO1Label(),true);
setPlace(true);
setO1LabelWrap(true);

-*#### SHOW LABELS
setGroupLabelArray(
-INCLUDE LABELS
);
END
-EXIT


Thanks anyway Wink
Pedro


WF 8.0.02 @ Linux environment
 
Posts: 12 | Registered: May 15, 2012Report This Post
Expert
posted Hide Post
way to go, Pedro!
btw, use FPRINT instead of FTOA




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report 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] Total on across label

Copyright © 1996-2020 Information Builders