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] $ in piechart hover

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] $ in piechart hover
 Login/Join
 
Silver Member
posted
I have created a piechart that shows series label and percentage. The hover shows label and amount. I would like the amount (when I hover) to include the $. Currently it is showing with commas and decimal point which I want to keep. How can I add the dollar sign in front of this amount in the hover?

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


WebFOCUS developer studio version 7.6.11
Windows
all formats
 
Posts: 36 | Registered: February 12, 2009Report This Post
Expert
posted Hide Post
setTextFormatPattern(getDataText(),"$#,###,###,###.##");


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Silver Member
posted Hide Post
Thank you. This worked beautifully.


WebFOCUS developer studio version 7.6.11
Windows
all formats
 
Posts: 36 | Registered: February 12, 2009Report This Post
Silver Member
posted Hide Post
Tom,

One question........when I have a value of 123.40 it is showing up as $123.4 instead of $123.40. How can I correct this to display dollars and cents even if the final number is a zero?


WebFOCUS developer studio version 7.6.11
Windows
all formats
 
Posts: 36 | Registered: February 12, 2009Report This Post
Expert
posted Hide Post
Mark,

Try these at the top of the fex; I don't know the format of your field:

SET CENT-ZERO = ON, NODATA = .00

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Silver Member
posted Hide Post
it's defined as P11.2 I tried adding your suggestion to the code but it didn't help. Any other ideas?


WebFOCUS developer studio version 7.6.11
Windows
all formats
 
Posts: 36 | Registered: February 12, 2009Report This Post
Expert
posted Hide Post
Mark,

Post your code within the RED code tags, upper-right on the toolbar...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Silver Member
posted Hide Post
 -* p150g

-INCLUDE app/p150data.fex
-INCLUDE commondm/app/copyright.fex

SET CENT-ZERO = ON, NODATA = .00

-DEFAULT &FINL_SHOW='Y';
-SET &DESCR_Q=STRREP(&SUBTITLE2.LENGTH, &SUBTITLE2, &SUBTITLE2.LENGTH, '''''', 40, '''', 40, 'A40');
-SET &SRC_DESCR_LOC=TRUNCATE(&DESCR_Q);
-*-SET &BEGINMONTH= DECODE &BEGINM(01 'Jan' 02 'Feb' 03 'Mar' 04 'Apr' 05 'May' 06 'Jun' 07 'Jul' 08 'Aug' 09 'Sep' 10 'Oct' 11 'Nov' 12 'Dec');
-*-SET &ENDMONTH= DECODE &ENDM(01 'Jan' 02 'Feb' 03 'Mar' 04 'Apr' 05 'May' 06 'Jun' 07 'Jul' 08 'Aug' 09 'Sep' 10 'Oct' 11 'Nov' 12 'Dec');
-*
-*
-SET &SUBTITLE1 = &SUBTITLE.QUOTEDSTRING | ' \n' | &SRC_DESCR_LOC.QUOTEDSTRING | ' \n Date Range: ' | &BEGINDATE | ' - ' | &ENDDATE;
-*-SET &SUBTITLE1 = &SUBTITLE.QUOTEDSTRING | ' \n' | &SRC_DESCR_LOC.QUOTEDSTRING | ' \n Date Range: ' | &BEGINMONTH | ' ' | &BEGINY | ' - ' | &ENDMONTH | ' ' | &ENDY;

DEFINE FILE REPT_FULL
DESCR/A26='Cash';
DESCR1/A26='Cash';
Quantity/I11C=CASH_ORD_APPLIED_QTY;
Amount/P11.2=CASH_ORD_VAL_AMT;
END

TABLE FILE REPT_FULL
SUM
	Quantity
	Amount
BY DESCR
BY DESCR1
WHERE REC_CODE EQ 'Y';
ON TABLE HOLD AS P150G_CASH FORMAT FOCUS
END


DEFINE FILE REPT_FULL
DESCR/A26='Credit';
DESCR1/A26='Credit';
Quantity/I11C=CREDIT_ORD_APPLIED_QTY;
Amount/P11.2=CREDIT_ORD_VAL_AMT;
END

TABLE FILE REPT_FULL
SUM
	Quantity
	Amount
BY DESCR
BY DESCR1
WHERE REC_CODE EQ 'Y';
ON TABLE HOLD AS P150G_CRED FORMAT FOCUS
END


DEFINE FILE REPT_FULL
DESCR/A26='Credit Card';
DESCR1/A26='Credit Card';
Quantity/I11C=CC_ORD_APPLIED_QTY;
Amount/P11.2=CC_ORD_VAL_AMT;
END

TABLE FILE REPT_FULL
SUM
	Quantity
	Amount
BY DESCR
BY DESCR1
WHERE REC_CODE EQ 'Y';
ON TABLE HOLD AS P150G_CC FORMAT FOCUS
END


DEFINE FILE REPT_FULL
DESCR/A26='Adjustment';
DESCR1/A26='Adjustment';
Quantity/I11C=ADJ_ORD_APPLIED_QTY;
Amount/P11.2=ADJ_ORD_VAL_AMT;
END

TABLE FILE REPT_FULL
SUM
	Quantity
	Amount
BY DESCR
BY DESCR1
WHERE REC_CODE EQ 'Y';
ON TABLE HOLD AS P150G_ADJ FORMAT FOCUS
END

USE
P150G_CASH AS P150G_CASH
P150G_CRED AS P150G_CASH
P150G_CC AS P150G_CASH
P150G_ADJ AS P150G_CASH
END

DEFINE FILE P150G_CASH
QUANT/I11C=Quantity;
VALUE/P11.2=Amount;
END

GRAPH FILE P150G_CASH
SUM
	QUANT AS ' '
BY DESCR AS 'Orders Applied'
ON GRAPH HOLD AS GRAPH1 FORMAT HTMTABLE
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET HAXIS 475
ON GRAPH SET VAXIS 400
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH PIESINGL
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMERGE ON
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
-*ON GRAPH SET 3D OFF
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBICylinderOnGrey.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setFillType(getSeries(2),2);
setTextString(getSubtitle(),"&SUBTITLE1");
setDisplay(getSubtitle(),true);
setDepthRadius(0);
setTransparentFillColor(getLegendArea(),false);
setTransparentBorderColor(getLegendArea(),false);
setDisplay(getBeveledLegend(),false);
setFontSizeAbsolute(getO1Label(), true);
setFontSizeInPoints(getO1Label(), 9);
setTextRotation(getO1Label(),1);

setPlaceResize(getO1Label(), 0);

setUseSeriesShapes(true);
setTextString(getTitle(),"P150 Orders Applied");
setDisplay(getTitle(),true);
setShadowDisplay(getTitle(),false);
setMarkerSizeDefault(50);
setTransparentBorderColor(getChartBackground(),false);
setPlace(true);
setGridStyle(getY1MajorGrid(),0);
setDisplay(getDataText(0),true);
setFontStyle(getTitle(),2);
setFontSizeInPoints(getTitle(),12);
setPlaceResize(getTitle(),0);
setFontSizeAbsolute(getTitle(),true);
setTextUnderlineType(getTitle(),2);
setTextString(getFootnote(),"&CPY");
setDisplay(getFootnote(),true);
setFontStyle(getFootnote(),0);
setPlaceAlign(getFootnote(),0);
setTextJustHoriz(getFootnote(),0);
setFontSizeAbsolute(getFootnote(),true);
setFontSizeInPoints(getFootnote(),6);
setPlaceResize(getFootnote(),0);
setAxisSide(getO1Axis(),0);
setDisplay(getReferenceLineO1(0),false);
setDisplay(getY1Label(),true);
setTextFormatPreset(getY1Label(),0);
setDisplay(getReferenceLineY1(0),false);
setDisplay(getAnnotation(0),true);
setTextString(getAnnotation(0),"");
setFillColor(getTitle(),new Color(0,0,0));
setAxisSide(getY1Axis(),2);
setY1TitleString("Orders");
setSeriesType(getSeries(1),0;
setDisplay(getDataText(1),false);
setDisplay(getDataText(),false);
setDisplay(getY1Title(),true);

setLegendPosition(1);
setTextFormatPreset(getPieSliceLabel(),4);
setPieLabelDisplay(3);
setPiesPerRow(1);
setDisplay(getPieLabel(),true);
setPieTilt(10);
setPieDepth(45);
setFillColor(getSeries(0),new Color(122,184,0));
setFillColor(getSeries(1),new Color(252,212,80));
setFillColor(getSeries(2),new Color(0,56,166));
setFillColor(getSeries(3),new Color(220,72,20));
setFillColor(getSeries(4),new Color(128,128,255));
ENDSTYLE
END
-RUN

DEFINE FILE P150G_CASH
QUANT/I11C=Quantity;
VALUE/P11.2=Amount;
END

GRAPH FILE P150G_CASH
SUM
	VALUE AS ' '
BY DESCR1 AS 'Orders Applied'
ON GRAPH HOLD AS GRAPH2 FORMAT HTMTABLE
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET HAXIS 475
ON GRAPH SET VAXIS 400
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH PIESINGL
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMERGE ON
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
-*ON GRAPH SET 3D OFF
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBICylinderOnGrey.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setTextString(getSubtitle(),"&SUBTITLE1");
setDisplay(getSubtitle(),true);
setDepthRadius(0);
setTransparentFillColor(getLegendArea(),false);
setTransparentBorderColor(getLegendArea(),false);
setDisplay(getBeveledLegend(),false);
setFontSizeAbsolute(getO1Label(), true);
setFontSizeInPoints(getO1Label(), 9);
setTextRotation(getO1Label(),1);

setPlaceResize(getO1Label(), 0);

setUseSeriesShapes(true);
setTextString(getTitle(),"P150 Orders Applied Revenue");
setDisplay(getTitle(),true);
setShadowDisplay(getTitle(),false);
setMarkerSizeDefault(50);
setTransparentBorderColor(getChartBackground(),false);
setPlace(true);
setGridStyle(getY1MajorGrid(),0);
setDisplay(getDataText(0),true);
setFontStyle(getTitle(),2);
setFontSizeInPoints(getTitle(),12);
setPlaceResize(getTitle(),0);
setFontSizeAbsolute(getTitle(),true);
setTextUnderlineType(getTitle(),2);
setTextString(getFootnote(),"&CPY");
setDisplay(getFootnote(),true);
setFontStyle(getFootnote(),0);
setPlaceAlign(getFootnote(),0);
setTextJustHoriz(getFootnote(),0);
setFontSizeAbsolute(getFootnote(),true);
setFontSizeInPoints(getFootnote(),6);
setPlaceResize(getFootnote(),0);
setAxisSide(getO1Axis(),0);
setDisplay(getReferenceLineO1(0),false);
setDisplay(getY1Label(),true);
setTextFormatPreset(getY1Label(),0);
setDisplay(getReferenceLineY1(0),false);
setDisplay(getAnnotation(0),true);
setTextString(getAnnotation(0),"");
setFillColor(getTitle(),new Color(0,0,0));
setAxisSide(getY1Axis(),2);
setY1TitleString("Orders");
setDisplay(getDataText(1),false);
setDisplay(getDataText(),false);
setDisplay(getY1Title(),true);

setLegendPosition(1);
setTextFormatPreset(getPieSliceLabel(),4);
setPieLabelDisplay(3);
setPiesPerRow(1);
setTextFormatPattern(getDataText(),"$###,###,###.##");
setDisplay(getPieLabel(),true);
setPieTilt(10);
setPieDepth(45);
setFillColor(getSeries(0),new Color(122,184,0));
setFillColor(getSeries(1),new Color(252,212,80));
setFillColor(getSeries(2),new Color(0,56,166));
setFillColor(getSeries(3),new Color(220,72,20));
setFillColor(getSeries(4),new Color(128,128,255));
ENDSTYLE
END
-RUN

-HTMLFORM BEGIN
<HTML>
<BODY>
<FORM>
  <table width="100%">
    <tr>
      <td width="50%">!IBI.FIL.GRAPH1;</td>
      <td width="50%">!IBI.FIL.GRAPH2;</td>
    </tr>
  </table>
</FORM>
</BODY>
</HTML>
-HTMLFORM END
 


WebFOCUS developer studio version 7.6.11
Windows
all formats
 
Posts: 36 | Registered: February 12, 2009Report This Post
Silver Member
posted Hide Post
Tom,

This program generates two pie charts that are side by side. The first piechart displays quantity (integers) and the second piechart display $ amounts (decimal). The code we are working with is near the bottom (2nd piechart).
Thanks.


WebFOCUS developer studio version 7.6.11
Windows
all formats
 
Posts: 36 | Registered: February 12, 2009Report This Post
Expert
posted Hide Post
Mark,

Change

setTextFormatPattern(getDataText(),"$###,###,###.##");

to

setTextFormatPattern(getDataText(),"$#,###,###.00");


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Silver Member
posted Hide Post
Yes, this works. Thank you very much.....I appreciate the time and patience you had with me on this !!!


WebFOCUS developer studio version 7.6.11
Windows
all formats
 
Posts: 36 | Registered: February 12, 2009Report This Post
Expert
posted Hide Post
No worries, glad it worked for you...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Silver Member
posted Hide Post
Don't know what the best way would be to better learn graphing and graph techniques....any ideas? I am needing to do more and more with graphs but the way I am programming I can never get into the painter and use the Physical View to create graphs and must rely on text view programming......which causes much frustration since so much of the API code is positional and I am not yet familiar with it. Any suggestions?


WebFOCUS developer studio version 7.6.11
Windows
all formats
 
Posts: 36 | Registered: February 12, 2009Report This Post
Expert
posted Hide Post
Hi Mark,

Well, I learned by code, also. I do use the GUI to see how the graphics work, using the CAR file, bold something, save, exit, then go into the text to see what was generated. WebFOCUS uses the 3DGraphics package, here.

Also, at the top right, is the Technical Documentation Library; click on that, type in Graphics, and, lots of documentation.

If you have a Tech Support ID(which you should), here is the link for the WebFOCUS Graphics manual that I keep on my desktop.


hth

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Silver Member
posted Hide Post
[solved] thank you for all your help.


WebFOCUS developer studio version 7.6.11
Windows
all formats
 
Posts: 36 | Registered: February 12, 2009Report 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] $ in piechart hover

Copyright © 1996-2020 Information Builders