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] Formating data lables on a bar chart(PDF)

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Formating data lables on a bar chart(PDF)
 Login/Join
 
Member
posted
I have created a barchart and used Millions as unit on Y axis. I want to display the data labels as $ X.XX ($ symbol and two digits after decimal point). have tried different possible options available in appstudio but couldn't get required format. Please help me.

This message has been edited. Last edited by: FP Mod Chuck,
 
Posts: 17 | Location: columbus | Registered: August 01, 2018Report This Post
Virtuoso
posted Hide Post
I've looked for this specific format but can't find one. You can either do the Millions Currency or 2 decimals. You might want to open a case with IB tech support to see if they have a suggestion and please post it here so we know.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Gold member
posted Hide Post
Hi Jarves,
have a look at the below code, hope this helps
i think setting the following API will help
setTextFormatPreset(getY1Label(),10);
 

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 GGSALES.SALES01.DOLLARS
BY GGSALES.SALES01.PRODUCT
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 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);
setTextFormatPreset(getY1Label(),10);
*END
ENDSTYLE
END
-RUN

-*IA_GRAPH_FINISH

 


WF 8.2.04
Windows/Unix
All Formats
In Focus since 2006
 
Posts: 74 | Location: UK | Registered: September 17, 2018Report This Post
Member
posted Hide Post
Hi Addy,

I have tried your suggestion and the dollar symbol is getting added on Y axis units but not on top of the bars.
I have tried below. The $ symbol is getting added to he data labels which are on top of the bars but the decimal points are more than two (e.g. $10.65242)
setTextFormatPreset(getDataText(),10);

If I use below, I'm able restrict the decimals points but not getting the $ symbol.
setTextFormatPattern(getDataText(),"#.##");
 
Posts: 17 | Location: columbus | Registered: August 01, 2018Report This Post
Gold member
posted Hide Post
Hi Jarves,
Sorry i just gave you the Y axis string and not the data label but you figured it out.
As BabakNYC said that there is no exact setting to what you are asking for and opening a case might help.
In the mean time i have written the below code as a work around hope it helps.

 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 /1000000;
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(),"$ #.## M");
setTextFormatPreset(getY1Label(),6);
*END
ENDSTYLE
END
 


WF 8.2.04
Windows/Unix
All Formats
In Focus since 2006
 
Posts: 74 | Location: UK | Registered: September 17, 2018Report This Post
Member
posted Hide Post
Hi Addy,

Thanks for the update.

The data labels are showing wrong values. instead of $20.23 M, It is getting displayed as $202345.81 M. Since I have used Millions as unit on Y-axis, the data labels are wrong. I tried to correct it but not succeeded yet.

Thanks,
Satish Narina
 
Posts: 17 | Location: columbus | Registered: August 01, 2018Report This Post
Gold member
posted Hide Post
Hi Jarves,
In the above example you can see that I have created a Compute column which brings the $ value to Millions with 2 decimals.

Then I am using the pattern to set the data lables.
As I said it is a work around.

Thanks


WF 8.2.04
Windows/Unix
All Formats
In Focus since 2006
 
Posts: 74 | Location: UK | Registered: September 17, 2018Report This Post
Member
posted Hide Post
Thanks Addy.

The computed column works.


Thanks,
Jarves
 
Posts: 17 | Location: columbus | Registered: August 01, 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] Formating data lables on a bar chart(PDF)

Copyright © 1996-2020 Information Builders