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] Charts - Data Text - Formating

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Charts - Data Text - Formating
 Login/Join
 
Master
posted
When I build a report I can use /F7.2M on my money columns and it will display a "$" at the beginning of each data display. When I do the same on a graph, I only get the number without the "$". Can someone tell me how to add the "$" for a graph?

Example Report (Works with $ in the data):
TABLE FILE CAR
SUM		CAR.BODY.SALES/F10.2M
BY		CAR.COMP.CAR
WHERE CAR.BODY.SALES GT 0;
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,$
ENDSTYLE
END


Example Graph (Doesn't have $ in the data):
GRAPH FILE CAR
SUM		CAR.BODY.SALES/F10.2M
BY		CAR.COMP.CAR
WHERE CAR.BODY.SALES GT 0;
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
*GRAPH_SCRIPT
setDisplay(getDataText(0), true);
*END
ENDSTYLE
END

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



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Expert
posted Hide Post
Hi Gavin,

Look at using "setTextFormatPattern(.....,mask);" where "mask" is one of a myriad of options - see link

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Master
posted Hide Post
That seems to work for only X and Y Axis values, but not for the data text..

Iv'e done this and only the getY1Label() version works..
setTextFormatPattern(getDataText(0),"$##");
setTextFormatPattern(getY1Label(),"$##");



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Master
posted Hide Post
I copied and pasted their full example, which isn't using setTextFormatPattern, but the following and it still didn't do it. I'm using 8.0.09, but that example there also didn't help.

Here

GRAPH FILE CAR
SUM		CAR.BODY.SALES/F10.2M
BY		CAR.COMP.CAR
WHERE CAR.BODY.SALES GT 0;
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
*GRAPH_SCRIPT
-*setCustomDataText(getSeries(0), true);
-*setDisplay(getDataText(0), true);
-*setTextFormatPattern(getDataText(0),"$##");
-*setTextFormatPattern(getY1Label(),"$##");
setDepthAngle (0);
setDepthRadius (0);
setGraphType (41);
setCustomDataText (getSeries (2), true);
setCustomDataText (getSeries (1), true);
setCustomDataText (getSeries (0), true);
setTextFormatPreset(getDataText (2), 5);
setTextFormatPreset(getDataText (1), 6);
setTextFormatPreset(getDataText (0), 5);
setDataTextDisplay (true);
setViewableSeries (3);
setFontName(getDataText(2), "Comic Sans MS");
setFontName(getDataText(0), "Garamond");
setFontSizeAbsolute(getDataText(1), true);
setFontSize(getDataText(1), 14);        
setTextJustHoriz(getDataText(1),1);
setShadowDisplay(getDataText(1), true);
*END
ENDSTYLE
END



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Master
posted Hide Post
I got something working, so I'm closer, but now it changed 10B to $10,000,000,000, which I need to the B back, just wanted the $ on the front.

GRAPH FILE CAR
SUM		CAR.BODY.SALES/F10.2M
BY		CAR.COMP.CAR
WHERE CAR.BODY.SALES GT 0;
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
*GRAPH_SCRIPT
setDataTextDisplay(true);
setTextFormatPreset(getDataText(),-1);  
setTextFormatPattern(getDataText(),"$##");
setTextFormatPattern(getY1Label(),"$##");
*END
ENDSTYLE
END



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Master
posted Hide Post
Solution:

setDataTextDisplay(true);
setTextFormatPreset(getDataText(), 8);

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



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report 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] Charts - Data Text - Formating

Copyright © 1996-2020 Information Builders