Focal Point
Center Graph Title

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

July 26, 2006, 12:30 PM
Prarie
Center Graph Title
Anyone know how to center a Graph Title?

setTitleString("Hourly Call Volume");
setTextJustHoriz(gettitle(),0);
setFontSize(getTitle(),18);
setFontSizeAbsolute(getTitle(),true);

Something to add to this?


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
Prarie,

Haven't used graphs in a while, but I pulled this snippit from a fex:

-* ---------- Graph Styling -----------
ON GRAPH SET GRAPHSTYLE *

-* Graph title
setTitleString("&TITLE");

-* Center the title
setTextJustHoriz(getTitle(),1);


Hope it's what you're looking for.

Regards,
Sean


------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
That was it! Thanks so much. Smiler


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
I need to set title in three lines
setTitleString("&HDR_LN1");
setTextJustHoriz(getTitle(),1);
setTitleString("&HDR_LN2");
setTextJustHoriz(getTitle(),2);
setTitleString("&HDR_LN3");
setTextJustHoriz(getTitle(),3);

Average Number of HealthChoice Medicaid Eligibles Per Month
Ordered by Age Group
Fiscal Year 2007-2011
Does any one know how to center them at the top of the graph?


7.7.03, Windows
Try using "HEADING CENTER" or use the Graph Assistant or as stated above...
I have tried with heading center...it does not really work with 16X9 monitor...my client will like to see heading to be center to any type of monitor..I have found the previous code is very good for my first two lines...I mean text sting title and subtitle...however, I need to add third line..for which I don't know which code to use


7.7.03, Windows
You can only have 1 title string.

It's java.

-SET   &TITLE = 'Title line 1 \n Title Line 2 \n Title line 3';
-* Graph title
setTitleString("&TITLE");
-* Center the title
setTextJustHoriz(getTitle(),1);


You can not justify individual lines.
Thank you so much. This code really work.
-SET &HDR_LN1 = 'Average Number of ' | &HDR1 | ' Medicaid Eligibles Per Month';
-SET &DTE_LNE = &CFY_TTL | ' ' | &HDR_DTE ;
-*
-SET &HDR_LN3 = IF &TOTFLG EQ '1' THEN ' ' ELSE &DTE_LNE ;
-*
-SET &HDR_LN2 = IF &TOTFLG EQ '1' THEN &DTE_LNE
- ELSE ('Ordered by ' | &HDRV );
-SET &TITLE = '&HDR_LN1.EVAL \n &HDR_LN2.EVAL \n &HDR_LN3.EVAL';



setTitleString("&TITLE");

setTextJustHoriz(getTitle(),1);


7.7.03, Windows