Focal Point
[CLOSED] Chart Label Formatting

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5537033196

May 28, 2019, 01:17 PM
Doug
[CLOSED] Chart Label Formatting
Is there a format to show Currency in Billions that's similar to the Millions show below?

"16" shows the "Number with thousands separators, two decimal places." Sample: 1,234 displays as 1.23K
I'm looking for the ## to display $#.##M:
"##" shows the Number with Millions separators, two decimal places and a floating currency symbol. Sample: $1,234,567.98 displays as $1.23M

Thanks in Advance, Doug

PS: Extra bonus. How, if possible is this done in InfoAssist?

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




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
May 28, 2019, 01:47 PM
Don Garland
I'm not sure what InfoAssist has to control this. You can control the Column Text using Graph Script with the following;


-*********************************************************************************************************** Column Text Format
-*
-* 0 = integer Ex: 1
-* 1 = integer Ex: 1
-* 2 = integer Ex: 100%
-* 3 = decimal 1 Ex: 100.0%
-* 4 = decimal 2 Ex: 100.00%
-* 5 = decimal 2 Ex: $1.00
-* 6 = integer Ex: $1
-* 7 = integer Ex: 1K
-* 8 = integer Ex: $1K
-* 9 = integer Ex: 1M
-* 10 = integer Ex: $1M
-* 11 = integer Ex: 1B
-* 12 = integer Ex: $1B
-* 13 = integer Ex: 1T
-* 14 = integer Ex: $1T

setTextFormatPreset(getY1Label(),6);

More Detail Here...


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
May 28, 2019, 01:50 PM
Tom Flynn
Hi Doug,
Will this work?
  
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_STYLE_UNITS='INCHES';
-DEFAULTH &WF_STYLE_HEIGHT='4.21875';
-DEFAULTH &WF_STYLE_WIDTH='8.020833';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE ggsales
-* Created by Info Assist for Graph
SUM COMPUTE DOLLAR_M/D12.2= GGSALES.SALES01.DOLLARS /10000000;
BY GGSALES.SALES01.PRODUCT
ON GRAPH PCHOLD FORMAT PDF
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setPlace(true);
setCurveFitEquationDisplay(false);
*END
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getDataText(0), true);
setDataTextDisplay(true);
setTextFormatPreset(getDataText(),-1);
setTextFormatPattern(getDataText(),"$ #.## B");
setTextFormatPreset(getY1Label(),6);
*END
ENDSTYLE
END



Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
May 28, 2019, 02:16 PM
Doug
Bummer on both counts... The "10" Should Work... But doesn't. it shows as '$15M'.

The Pattern
  setTextFormatPreset(getDataText(),-1);
  setTextFormatPattern(getDataText(),"$ #.## B");

isn't acceptable to the users in this application.

I need it to display as "$#.##M", the way the the '10' option Should Display it.
And in some HTML format, such as : ON GRAPH PCHOLD FORMAT JSCHART

This message has been edited. Last edited by: Doug,
May 29, 2019, 06:19 AM
Tony A
Doug,

"10" is working as documented - no decimal places.

I think the closest that you'll get (without custom formatting) is "16" but that is without currency symbol.

Less than a week to Summit

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 
May 30, 2019, 09:01 AM
Doug
Less than a week to Summit... Looking forward to it...

Let's see if there's new information on this in the Expert Room... Not that You're not an Expert... I'll just have to rattle their cages on this... This may be something to add to your session?
May 30, 2019, 10:48 AM
Tony A
quote:
This may be something to add to your session?

I doubt that you'll get any other response Doug, new or otherwise!

There are 16 presets covering (as much as possible) those most likely to be used. If one of those doesn't cover the requirement then there is an alternative with more options - and that is using the pattern that you posted above.

As for adding it to my session - not something that I'm covering I am afraid.

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 
May 30, 2019, 06:49 PM
Doug
Thanks Tony, I've survived worse... Smiler




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206