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] setTextWrap Not working as expected

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] setTextWrap Not working as expected
 Login/Join
 
Platinum Member
posted
Hi All,

I have a bar graph in PDF format. The bar graph has three series in the vertical measure.
The X-axis labels are of length 25.Client requires the x-axis to be displayed horizontal(no staggering and angles) below each x-axis item.
So i use
 setTextWrap  
to wrap the x-axis labels.
For some reason the x-axis labels are not wrapping even though i have the setTextWrap set.
Here is the code that i use.
  
setFontSizeAbsolute(getO1Label(), true);
setFontSizeInPoints(getO1Label(), 8);
setTextWrap(getO1Label(),true);
setPlaceResize(getO1Label(), 0);
setFontName(getO1Label(),"CALIBRI");
setDisplay(getO1Label(),true);


Also in the output ,only alternate x-axis labels are displaying. I believe it is because the wrapping is not happening.

I have seen a similar post , but i don't see a solution for the issue in there.

Here is a sample code with CAR file.
  
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
GRAPH FILE car
-* Created by Info Assist for Graph
SUM CAR.BODY.SALES
RETAIL_COST
DEALER_COST
BY CAR.COMP.CAR
ON GRAPH PCHOLD FORMAT PDF
ON GRAPH SET VZERO OFF
ON GRAPH SET UNITS INCHES
ON GRAPH SET HAXIS 8
ON GRAPH SET VAXIS 4
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);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, PAGESIZE=LETTER, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);

setTextWrap(getO1Label(),true);
setFontSizeAbsolute(getO1Label(), true);
setFontSizeInPoints(getO1Label(), 6);
setPlaceResize(getO1Label(), 0);
setFontName(getO1Label(),"CALIBRI");
setDisplay(getO1Label(),true);

setResizeBarMode(false);
setRiserWidth(10);
setDepthRadius(0);
setRiserBarGroupSpacing(20);

*END
ENDSTYLE
END


Any of you encountered the same issue?

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


WF8206,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 229 | Location: MI | Registered: September 13, 2017Report This Post
Platinum Member
posted Hide Post
Hi All,

I got some clue into why this is happening.
A per the documentation of setTextWrap, the wrapping occurs when a space character is encountered as quoted below.
quote:

setTextWrap()
This method enables/disables line wrapping for a text object. When text wrapping is enabled, the graphing engine will look for space characters in the text string and draw the text on multiple lines at space character boundaries. When text wrapping is disabled, the text string will always be drawn on a single line.


In the my data, I have 10 x-axis labels and all labels except one starts with 'DemoText, Hello'.
This is the pattern i have in my label. There is a string followed by a comma and a space.
In the bar graph output, the wrapping occurs after the comma when it encounters a space. So the output looks like below,
DemoText,
 Hello  


One particular label is not following the pattern of other labels.
It has 'SomeText anothertext'.Even though there is a space , it is not being used to wrap or it is not wrapping in the first space that it encounters. When i remove this particular entry from the data , all labels wraps perfectly.
I don't understand why it happens that way.

Appreciate any insight into why this is happening.


WF8206,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 229 | Location: MI | Registered: September 13, 2017Report 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] setTextWrap Not working as expected

Copyright © 1996-2020 Information Builders