Focal Point
[CLOSED] Prefix $ symbol on legend values

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

January 31, 2020, 12:03 AM
BI Dev
[CLOSED] Prefix $ symbol on legend values
Good morning,

I have created a heat map which will show revenue by product category and sub category.Is there a way I can prefix $ symbol to the values on legend scale like $232.9M? Please let me know if you have any inputs on this and below is the sample code.



ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
-DEFAULTH &WF_HTMLENCODE=OFF;
SET HTMLENCODE=&WF_HTMLENCODE

SET ARGRAPHENGINE=JSCHART
-DEFAULTH &WF_EMPTYREPORT=ON;
SET EMPTYREPORT=&WF_EMPTYREPORT

SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';

-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE wf_retail
SUM WF_RETAIL.WF_RETAIL_SALES.REVENUE_US
BY WF_RETAIL.WF_RETAIL_PRODUCT.PRODUCT_CATEGORY
BY WF_RETAIL.WF_RETAIL_PRODUCT.PRODUCT_SUBCATEG
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET LOOKGRAPH HEATMAP
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT

setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setDataTextPosition(4);

*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=DATA, COLUMN=N1, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N3, BUCKET=color, $
*GRAPH_SCRIPT

setReportParsingErrors(false);
setSelectionEnableMove(false);
*GRAPH_JS_FINAL
"pieProperties": {
"holeSize": "0%"
},
"agnosticSettings": {
"chartTypeFullName": "Special_Spectral_Mapped"
}

*END
ENDSTYLE
END

-RUN


This message has been edited. Last edited by: FP Mod Chuck,


Webfocus 8105/8202
Windows
All Outputs
January 31, 2020, 09:32 AM
MartinY
This could be an option
SUM WF_RETAIL.WF_RETAIL_SALES.REVENUE_US AS 'Revenue $'


Please always use the code tag when posting sample code/layout/data
Last icon on the ribbon that looks like the below
</>



WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
January 31, 2020, 05:20 PM
BI Dev
Hi Martin,

Sorry for missing code tags.I am looking for $ prefix on the legend scale.Below code will generate a heatmap with a legend.On the legend scale , lowest value which is represented in red color is 0.6M and highest value which is represented in green color is 232.9M. Is there a way we can show legend with values like $232.9M?

This message has been edited. Last edited by: BI Dev,


Webfocus 8105/8202
Windows
All Outputs
February 03, 2020, 07:15 AM
MartinY
I did not find any, but it doesn't mean that there is none. So many ways to do one thing in WF...

But having the $ sign displayed in the legend header it's a good option that I found better than repeating the $ sign on each and every rows.
It makes the result lighter to look at which we normally trying to do in BI


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007