Focal Point
changing the fontsize of X-AXIS labels in Graph
October 19, 2005, 11:24 PM
buddychanging the fontsize of X-AXIS labels in Graph
hai folks,
product: wf developer studio 5.3.2
Here i would like to change the font size of X-AXIS labels in my graph but i cannt and i can change the fontname,fontstyle of X-AXIS labels ,
the code which i used to change the fontsize is mentioned below,
setPlace(true);
setO1LabelDisplay(true);
setO1LabelRotate(1);
-*setFontName(getO1Label(),"ARIAL NARROW");
-*setFontStyle(getO1Label(),2);
-*setFontSizeAbsolute(getO1Label(), true);
-*setFontSizeInPoints(getO1Label(),55.0);
setFontSize(getO1Label(),12);
and I could change the font size of X-AXIS Labels with changing my graph width&hight sizes but I want same size.
if anyone could help me to solve this problem i do appreciate that
thank you.
October 20, 2005, 12:05 PM
susannahBuddy,
setFontSize(getO1Label(),11);
setFontSizeAbsolute(getO1Label(),true);
works for me.
October 20, 2005, 12:33 PM
mgrackinYou may also want to try turning off the AUTOFIT for the X-AXIS Labels:
setO1LabelAutofit(false);
October 20, 2005, 01:00 PM
buddyhai mickey and susannah
i tried both ur solutions but its not working
thank u anyway
if u have got any idea could help me plz
October 20, 2005, 01:40 PM
mgrackinNot sure if this will help but here are the API commands I have in a number of my graph requests. I use the VC setting to control the size of the labels.
I also have noticed that there are problems with various API graph commands from version to version. I have a few cases open with IBI due to Justification API commands not working with Y & X axis TITLES. You may be bumping into an issue as well since you are on 5.3.2.
***************************************
setTextJustHoriz(getO1Label(),1);
setO1LabelAutofit(false);
setFontSizeVC(getO1Label(),960);
setFontStyle(getO1Label(),0);
setFillColor(getO1Label(),new Color(0,0,0));
setTextRotation(getO1Label(),0);
setO1LabelStagger(false);
setO1LabelWrap(true);
***************************************
October 20, 2005, 01:51 PM
mgrackinBuddy, I did a little testing and it looks like the setPlace(true); is causing your Font setting to be ignored. Try setPlace(false); and run your request again. Of course you will need to add additional commands to size and position each element due to setPlace(false); but it should work.
October 21, 2005, 08:15 PM
buddyhai micky,
I put the ticket to IBI to solve that problem but they told me that we r researching on your ticket,it means that could be bug,
anyway thank u mickey for spending your time on me.
November 02, 2005, 03:13 PM
KerryFYI,
This is not a bug. Below is the Symptom-Problem-Solution document for this case.
Question: Unable to change the font size in X-axis label
http://techsupport.informationbuilders.com/sps/12922085.html Glad to know the issue is resolved.
Cheers,
Kerry
November 02, 2005, 04:08 PM
mgrackinARGH!
Which one to use, Which one to use!!
setAutofit(getO1Label(), false);
OR
setO1LabelAutofit(false);
I would ask IBI about this.
November 02, 2005, 06:49 PM
mgrackinWhat tis the difference between these two commands?
setO1LabelAutofit(false); is found on page 4-171 of the WebFOCUS Graphics 5.3 Manual.
Page 5-146 of the same manual discusses setAutofit().
The funny thing here is that the notes on that page say:
"You may also use one of the object-specific properties to set the automatic fitting of an object (for example, FootnoteAutofit(), LegendTextAutofit(), O1LabelAutofit(), and so on)."
Notice it says you may use setO1LabelAutofit(false); instead.
I would consider this a bug if using setO1LabelAutofit(false); does not work.
November 19, 2005, 09:16 AM
Larry EissMickey,
I would consider it a bug if setO1LabelAutofit(false); does not work also, but I believe it does work.
In any event, there are simply two APIs here that are capable of accomplishing the same thing. Ideally the API would be fully rationalized and polymorphic, but this is how it was built for whatever reasons, so this is how it will remain.
When we release the Betty project and everyone has a wonderful GUI editor, such concerns will fade into insignificance.
On the other point you made to Buddy about setPlace(true); preventing him from changing the font size. You are correct that changing the argument to 'false' will do the trick, but the Automatic Placement Engine can be finessed in a more granular fashion. There are several 'setPlace...' calls. One of them is setPlaceResize(). THis can be used to disallow the engine from resizing any object you wish to control manually. In Buddy's example, you'd use setPlaceResize(getO1Label(),0);
Hang in there everyone... Betty's coming!
Oh, I'm a Windows guy, but since I am in support, I interact with all versions and platforms.