January 17, 2006, 01:55 AM
Sridevisetting 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.
January 17, 2006, 04:02 AM
Tony ASridevi,
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
January 17, 2006, 10:36 AM
KameshsetFontSizeVC(getO1Label(),&FSIZE);
setAutofit(getO1Label(), true );
Try the above methods. It seems working.
January 18, 2006, 01:11 AM
SrideviKamesh, I dont find the methods working.
Please let me know if I should enable some other property for this method to work.
January 25, 2006, 01:34 PM
KerryHi 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.htmlTROUBLESHOOTING
Unable to change the font size on the X-axis label
http://techsupport.informationbuilders.com/sps/12922085.htmlHow to change the Y axis Label font size on a graph?
http://techsupport.informationbuilders.com/sps/62841036.htmlHope this helps.
Cheers,
Kerry
January 25, 2006, 04:00 PM
KameshTry using this function along with those
setDisplay (getDataText(), true)