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     [CLOSED] PDF Horizontal Bar Chart Data labels Custom Format

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] PDF Horizontal Bar Chart Data labels Custom Format
 Login/Join
 
Platinum Member
posted
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
 
Posts: 106 | Registered: June 26, 2018Report This Post
Platinum Member
posted Hide Post
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.


Webfocus 8105/8202
Windows
All Outputs
 
Posts: 106 | Registered: June 26, 2018Report 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     [CLOSED] PDF Horizontal Bar Chart Data labels Custom Format

Copyright © 1996-2020 Information Builders