Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2
<HTML>
3
<HEAD>
4
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1">
5
<LINK REL="Start" HREF="index.html">
6
<LINK REL="Contents" HREF="toc.html">
7
<LINK REL="Prev" HREF="812Addingarbitrarytextstringstothegraph.html">
8
<LINK REL="Next" HREF="814Addingatabtitle.html">
9
<STYLE TYPE="text/css"><!--
10
BODY { font-family: serif }
11
H1 { font-family: sans-serif }
12
H2 { font-family: sans-serif }
13
H3 { font-family: sans-serif }
14
H4 { font-family: sans-serif }
15
H5 { font-family: sans-serif }
16
H6 { font-family: sans-serif }
17
SUB { font-size: smaller }
18
SUP { font-size: smaller }
19
PRE { font-family: monospace }
20
A { text-decoration: none }
21
--></STYLE>
22
</HEAD>
23
<BODY>
24
<A HREF="toc.html">Contents</A>
25
<A HREF="812Addingarbitrarytextstringstothegraph.html">Previous</A>
26
<A HREF="814Addingatabtitle.html">Next</A>
27
<HR NOSHADE>
28
<H2><A NAME="8_13">8.13 Adding titles and footers to the Graph</A></H2>
29
<P> Each graph can have up to three different titles accessed by the
30
 three properties</P>
31
<OL>
32
<LI> title</LI>
33
<LI> subtitle</LI>
34
<LI> subsubtitle</LI>
35
</OL>
36
<P> All of these three properties is a standard text object which means
37
 that you can have individual font, colors, margins and sizes of these
38
 tree titles.</P>
39
<P> The only thing you need to think of is that you probably want to add
40
 some extra margin to make room for the titles (using <A href="../ref/Graph.html#_GRAPH_SETMARGIN">
41
 Graph::SetMargin()</A> )</P>
42
<P> The individual positioning of these titles are done automatically
43
 and will adjust to the font size being used.</P>
44
<P> If you for, esthetic reasons, would like increase the distance from
45
 the top where the title is positioned (or the intra distance between
46
 title and sub title) you can use the <A href="../ref/Text.html#_TEXT_SETMARGIN">
47
 Text::SetMargin()</A> method. For example the line</P>
48
<P><DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB">
49
&nbsp;$graph</FONT><FONT color="#007700">-&gt;</FONT><FONT color="#0000BB">title</FONT><FONT
50
color="#007700">-&gt;</FONT><FONT color="#0000BB">SetMargin</FONT><FONT color="#007700">
51
(</FONT><FONT color="#0000BB">20</FONT><FONT color="#007700">);</FONT><FONT
52
color="#0000BB"></FONT></FONT></CODE></DIV></P>
53
<P>will set the distance between the top of the title string and the top
54
 of the graph to 20 pixels. If you instead call the SetMargin() method
55
 for the subtitle it will adjust the distance between the top of the
56
 subtitle and the bottom of the title.</P>
57
<P> The titles will be positioned at the top and be centered in the
58
 graph. Each of these titles may have multiple lines each separated by a
59
 &quot;\n&quot; (newline) character. By default the paragraph alignment for each
60
 title is centered but may of course be changed (using the
61
 ParagraphAlign()) method.</P>
62
<P> Each graph can also have a footer. This footer is actually three
63
 footers. Left, center and right. The 'left' footer is aligned to the
64
 left, the 'center' at the bottom center and the right to the right.</P>
65
<P> Each of these three positions is a standard Text object which means
66
 you can change color, font and size as you please individually on each
67
 of these footer positions.</P>
68
<P> You access the footer through the Graph::footer property as the
69
 following example shows</P>
70
<P><DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB">
71
&nbsp;$graph</FONT><FONT color="#007700">-&gt;</FONT><FONT color="#0000BB">
72
footer</FONT><FONT color="#007700">-&gt;</FONT><FONT color="#0000BB">left</FONT><FONT
73
color="#007700">-&gt;</FONT><FONT color="#0000BB">Set</FONT><FONT color="#007700">
74
(</FONT><FONT color="#DD0000">&quot;(C)&nbsp;2002&nbsp;KXY&quot;</FONT><FONT color="#007700">
75
);
76
<BR></FONT><FONT color="#0000BB">$graph</FONT><FONT color="#007700">-&gt;</FONT><FONT
77
color="#0000BB">footer</FONT><FONT color="#007700">-&gt;</FONT><FONT color="#0000BB">
78
center</FONT><FONT color="#007700">-&gt;</FONT><FONT color="#0000BB">Set</FONT><FONT
79
color="#007700">(</FONT><FONT color="#DD0000">&quot;CONFIDENTIAL&quot;</FONT><FONT color="#007700">
80
);
81
<BR></FONT><FONT color="#0000BB">$graph</FONT><FONT color="#007700">-&gt;</FONT><FONT
82
color="#0000BB">footer</FONT><FONT color="#007700">-&gt;</FONT><FONT color="#0000BB">
83
center</FONT><FONT color="#007700">-&gt;</FONT><FONT color="#0000BB">
84
SetColor</FONT><FONT color="#007700">(</FONT><FONT color="#DD0000">&quot;red&quot;</FONT><FONT
85
color="#007700">);
86
<BR></FONT><FONT color="#0000BB">$graph</FONT><FONT color="#007700">-&gt;</FONT><FONT
87
color="#0000BB">footer</FONT><FONT color="#007700">-&gt;</FONT><FONT color="#0000BB">
88
center</FONT><FONT color="#007700">-&gt;</FONT><FONT color="#0000BB">
89
SetFont</FONT><FONT color="#007700">(</FONT><FONT color="#0000BB">
90
FF_FONT2</FONT><FONT color="#007700">,</FONT><FONT color="#0000BB">
91
FS_BOLD</FONT><FONT color="#007700">);
92
<BR></FONT><FONT color="#0000BB">$graph</FONT><FONT color="#007700">-&gt;</FONT><FONT
93
color="#0000BB">footer</FONT><FONT color="#007700">-&gt;</FONT><FONT color="#0000BB">
94
right</FONT><FONT color="#007700">-&gt;</FONT><FONT color="#0000BB">Set</FONT><FONT
95
color="#007700">(</FONT><FONT color="#DD0000">&quot;19&nbsp;Aug&nbsp;2002&quot;</FONT><FONT color="#007700">
96
);</FONT><FONT color="#0000BB"></FONT></FONT></CODE></DIV></P>
97
<P><DIV class="note"><B>Note:</B> If you enable the brand timing
98
 argument you should leave the left footer empty.</DIV></P>
99
<HR NOSHADE>
100
<A HREF="toc.html">Contents</A>
101
<A HREF="812Addingarbitrarytextstringstothegraph.html">Previous</A>
102
<A HREF="814Addingatabtitle.html">Next</A>
103
</BODY>
104
</HTML>