Focal Point
setting font size of x-axis label

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

January 17, 2006, 01:55 AM
Sridevi
setting font size of x-axis label
Hi,

I have a problem in setting the font size of x-axis label in my graph.The value for the lable is bit long (about 40-50 chars).

When I try to change the font size using the following api

setFontSizeAbsolute(getO1Label(),true);
setFontSize(getO1Label(),20);

there is no effect when I increase the font size greater than 9.

please find the sample code for testing

DEFINE FILE CAR
DESC/A100 = MODEL ||'-'||MODEL
END


SET GRAPHEDIT=SERVER
SET GRMERGE=ON
SET VZERO = OFF
GRAPH FILE CAR
ON GRAPH SET 3D OFF
ON GRAPH SET GRID ON
ON GRAPH SET LOOKGRAPH VBAR

SUM DEALER_COST ACROSS DESC


ON GRAPH SET GRAPHSTYLE *
setFillMissingData(0);
setMarkerDisplay(true);
setConnectLineMarkers(true);
setConnectScatterMarkers(true);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(false);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setAxisAssignment(1,1);
setSeriesType(1,3);
-*setX1LabelRotate(2);
setTextRotation(getO1Label(0),1);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setRiserWidth(20);
setFontSizeAbsolute(getO1Label(),true);
setFontSize(getO1Label(),20);
setPlace(true);
ENDSTYLE
END

one more thing I found was, the font size increases when i set setPlace to false. but that places the legends disorder.

Is there a way to incerase the font size with setPlace to be true.


Thanks & Regards,
Sridevi
Webfocus 7.6.5 | Windows |
HTML
January 17, 2006, 04:02 AM
Tony A
Sridevi,

setPlace(true); is enabling the automatic graph layout manager and therefore most automatic placements, restrictions etc. including whether the O1Labels can exceed the limits of the label area, so that explains why your fontsize will only go to a certain level and not beyond.

You could use setO1LabelWrap(true); but that will only wrap the labels and not allow you to exceed the limitations with setPlace(true);.

One thing you will quickly find using graphs is that your result normally requires a combination of settings and that there is, often, no one setting that will magically sort your problem for you.

If you have not already done so, then download the graph manual from the IBI Tech Support site and search through the myriad of settings to find the combination of settings that you will require. It is a good manual to keep close to you when you are creating graphs.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
January 17, 2006, 10:36 AM
Kamesh
setFontSizeVC(getO1Label(),&FSIZE);
setAutofit(getO1Label(), true );

Try the above methods. It seems working.


WFConsultant

WF 8105M on Win7/Tomcat
January 18, 2006, 01:11 AM
Sridevi
Kamesh, I dont find the methods working.
Please let me know if I should enable some other property for this method to work.


Thanks & Regards,
Sridevi
Webfocus 7.6.5 | Windows |
HTML
January 25, 2006, 01:34 PM
Kerry
Hi Sridevi,

Has this issue regarding font size of X-axis label been resolved?

I ran a quick search on Information Builders' online documents and came across the following topics which may be of interest:

How to change the X axis Label font size on a graph?
http://techsupport.informationbuilders.com/sps/62831025.html

TROUBLESHOOTING
Unable to change the font size on the X-axis label
http://techsupport.informationbuilders.com/sps/12922085.html

How to change the Y axis Label font size on a graph?
http://techsupport.informationbuilders.com/sps/62841036.html

Hope this helps. Big Grin

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
January 25, 2006, 04:00 PM
Kamesh
Try using this function along with those

setDisplay (getDataText(), true)


WFConsultant

WF 8105M on Win7/Tomcat