| 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="92Pieplots.html">
|
|
|
8 |
<LINK REL="Next" HREF="922Creating3Dpieplots.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="92Pieplots.html">Previous</A>
|
|
|
26 |
<A HREF="922Creating3Dpieplots.html">Next</A>
|
|
|
27 |
<HR NOSHADE>
|
|
|
28 |
<H3><A NAME="9_2_1">9.2.1 Adding guide lines to Pie Plots</A></H3>
|
|
|
29 |
<P> For very busy Pie plots it can become too little space for the
|
|
|
30 |
labels to be printed just beside the pie slice. For this purpose it is
|
|
|
31 |
possible to use guide lines for the labels. The library will then draw
|
|
|
32 |
a line from the center edge of the slices to the label which will be
|
|
|
33 |
positioned further out from the Pie Plot.</P>
|
|
|
34 |
<P> There is one method that is primarily used to handle this,<I>
|
|
|
35 |
PiePlot::SetGuideLines()</I> the simplest usage of this would be<DIV class="phpscript">
|
|
|
36 |
<CODE><FONT color="#000000"> <FONT color="#0000BB"> $pieplot</FONT><FONT color="#007700">
|
|
|
37 |
-></FONT><FONT color="#0000BB">SetGuideLines</FONT><FONT color="#007700">
|
|
|
38 |
();</FONT><FONT color="#0000BB"></FONT></FONT></CODE></DIV></P>
|
|
|
39 |
<P> An example of this could then be<DIV class="example">
|
|
|
40 |
<BR> <A href="exframes/frame_pielabelsex1.html" target="blank"><IMG border="0"
|
|
|
41 |
HEIGHT="350" src="img/pielabelsex1.png" WIDTH="300"></A>
|
|
|
42 |
<BR><B>Figure 120:</B> Using guide lines for PiePlots <A href="exframes/frame_pielabelsex1.html"
|
|
|
43 |
target="blank">[src]</A>
|
|
|
44 |
<P></P>
|
|
|
45 |
</DIV></P>
|
|
|
46 |
<P> The above example will give guide lines very similar as what is
|
|
|
47 |
produced by other programs, e.g. Excel. In addition to the above
|
|
|
48 |
variant it is also possible to instruct the library to line up the
|
|
|
49 |
labels vertically in a way that we think is easier to read. This is
|
|
|
50 |
achieved by specifying the second parameter to the SetGuideLines() to<I>
|
|
|
51 |
'false'</I> as in<DIV class="phpscript"><CODE><FONT color="#000000"> <FONT
|
|
|
52 |
color="#0000BB"> $pieplot</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">
|
|
|
53 |
SetGuideLines</FONT><FONT color="#007700">(</FONT><FONT color="#0000BB">
|
|
|
54 |
true</FONT><FONT color="#007700">,</FONT><FONT color="#0000BB">false</FONT><FONT
|
|
|
55 |
color="#007700">);</FONT><FONT color="#0000BB"></FONT></FONT></CODE></DIV>
|
|
|
56 |
</P>
|
|
|
57 |
<P> The first parameter is to enable/disable the guide-lines. With the
|
|
|
58 |
same example as above this would then produce the image<DIV class="example">
|
|
|
59 |
<BR> <A href="exframes/frame_pielabelsex2.html" target="blank"><IMG border="0"
|
|
|
60 |
HEIGHT="350" src="img/pielabelsex2.png" WIDTH="300"></A>
|
|
|
61 |
<BR><B>Figure 121:</B> Using guide lines for PiePlots with vertically
|
|
|
62 |
lined up labels. <A href="exframes/frame_pielabelsex2.html" target="blank">
|
|
|
63 |
[src]</A>
|
|
|
64 |
<P></P>
|
|
|
65 |
</DIV></P>
|
|
|
66 |
<P> It is also possible to configure the vertical distance between the
|
|
|
67 |
labels. By default the distance between the labels is roughly 40% of
|
|
|
68 |
the labels font height. By using the method<I>
|
|
|
69 |
PiePlot::SetGuideLinesAdjust()</I> it is possible to specify a
|
|
|
70 |
fractional value which is interpretated as the distance between the
|
|
|
71 |
bottom of one label to the bottom of the next. This means that
|
|
|
72 |
specifying a value of '1.0' the labels will have no space between them
|
|
|
73 |
and the bottom of one label will touch the top of another label. By
|
|
|
74 |
default this value is 1.4.</P>
|
|
|
75 |
<P> By increasing or decreasing this value it is possible to make the
|
|
|
76 |
labels become positioned more or less compact. Below we have taken the
|
|
|
77 |
above example and reduced the distance to '1.1' and as can be seen this
|
|
|
78 |
yields much more compact labeling.<DIV class="example">
|
|
|
79 |
<BR> <A href="exframes/frame_pielabelsex4.html" target="blank"><IMG border="0"
|
|
|
80 |
HEIGHT="350" src="img/pielabelsex4.png" WIDTH="300"></A>
|
|
|
81 |
<BR><B>Figure 122:</B> Adjusting to a smaller vertical distance between
|
|
|
82 |
the labels <A href="exframes/frame_pielabelsex4.html" target="blank">
|
|
|
83 |
[src]</A>
|
|
|
84 |
<P></P>
|
|
|
85 |
</DIV></P>
|
|
|
86 |
<P></P>
|
|
|
87 |
<P><B> Note:</B> Guide lines is only available in 2D Pie plots.</P>
|
|
|
88 |
<HR NOSHADE>
|
|
|
89 |
<A HREF="toc.html">Contents</A>
|
|
|
90 |
<A HREF="92Pieplots.html">Previous</A>
|
|
|
91 |
<A HREF="922Creating3Dpieplots.html">Next</A>
|
|
|
92 |
</BODY>
|
|
|
93 |
</HTML>
|