[CLOSED] PDF Horizontal Bar Chart Data labels Custom Format
Hello,
I hope everyone is safe and healthy, I am trying to customize a bar chart labels to display in the specific format. I am trying to suffix values that are more than 1000 with K denomination and more than 1000000 with M etc. I have customized it to an extent where it will display the denomination correct, but not in the format I need exactly. I trying to do the following
1)display $12576.34 as $12.6K on the data labels and $760 as $760(which is less than 1000) 2) display data labels with same distance on all bars, not close not far. I tried using this to get that, but, no luck-setDataTextRadiusDefault(60); I have posted my code below and the output is PDF, Please provide if you have any inputs to do this.
GRAPH FILE wf_retail_tiny
-* Created by Info Assist for Graph
SUM
WF_RETAIL_TINY.WF_RETAIL_SALES.REVENUE_US
-*COMPUTE REVENUE/D12.2= WF_RETAIL_TINY.WF_RETAIL_SALES.REVENUE_US /1000000; AS 'Revenue'
BY WF_RETAIL_TINY.WF_RETAIL_PRODUCT.PRODUCT_SUBCATEG
WHERE WF_RETAIL_TINY.WF_RETAIL_TIME_SALES.TIME_DATE EQ '20160101';
WHERE WF_RETAIL_TINY.WF_RETAIL_GEOGRAPHY_CUSTOMER.COUNTRY_NAME EQ 'United States';
ON GRAPH PCHOLD FORMAT PDF
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 GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH HBAR
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getDataText(),true);
setDataTextDisplay(true);
setPieFeelerTextDisplay(1);
setDataTextRadiusDefault(60);
[B]setTextFormatPreset(getDataText(),-1);[/B]
[B]setTextFormatPattern(getDataText(),"$ #.# K");[/B]
[B]setTextFormatPreset(getY1Label(),7);[/B]
*GRAPH_JS_FINAL
"pieProperties": {
"holeSize": "0%"
},
"blaProperties": {
"orientation": "horizontal"
},
"agnosticSettings": {
"chartTypeFullName": "Bar_Clustered_Horizontal"
}
*END
ENDSTYLE
END
-RUN
This message has been edited. Last edited by: FP Mod Chuck,
Webfocus 8105/8202 Windows All Outputs
November 04, 2020, 10:00 AM
BI Dev
I was able to fix the 1st issue, Does anybody have information on how to put the data labels same distance from the bars in the above code. I tried using this setDataTextRadiusDefault, but, it did not move the labels. Please provide your inputs if you have any. Thank you.