98 |
- |
1 |
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
|
|
|
2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><title>SetPieAutoSize</title><link rel="stylesheet" type="text/css" href="phplotdoc.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /><link rel="home" href="index.html" title="PHPlot Reference Manual" /><link rel="up" href="reference.html" title="PHPlot Function Reference" /><link rel="prev" href="SetOutputFile.html" title="SetOutputFile" /><link rel="next" href="SetPieBorderColor.html" title="SetPieBorderColor" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SetPieAutoSize</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="SetOutputFile.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="SetPieBorderColor.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="SetPieAutoSize"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">SetPieAutoSize</span></h2><p>SetPieAutoSize — Enable or disable automatic pie chart size calculation</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot->SetPieAutoSize(<em class="parameter"><code>$enable</code></em>)</pre></div><div class="refsect1"><a id="idp1378446612"></a><h2>Description</h2><p>
|
|
|
3 |
<code class="function">SetPieAutoSize</code> controls the automatic pie chart size
|
|
|
4 |
calculation. When this is enabled, PHPlot calculates the size of the pie
|
|
|
5 |
by taking the label sizes into account.
|
|
|
6 |
</p></div><div class="refsect1"><a id="idp1378447724"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>$enable</code></em></span></dt><dd><p>
|
|
|
7 |
<code class="literal">True</code> to enable automatic size calculation,
|
|
|
8 |
or <code class="literal">False</code> to use the maximum area.
|
|
|
9 |
</p></dd></dl></div></div><div class="refsect1"><a id="idp1378449948"></a><h2>Notes</h2><p>
|
|
|
10 |
By default, automatic pie chart sizing is enabled.
|
|
|
11 |
</p><p>
|
|
|
12 |
If automatic pie chart sizing is disabled, PHPlot will make the pie as
|
|
|
13 |
large as possible to fit within the plot area (see
|
|
|
14 |
<a class="xref" href="SetPlotAreaPixels.html" title="SetPlotAreaPixels"><span class="refentrytitle">SetPlotAreaPixels</span></a>), minus a small 5-pixel margin on each
|
|
|
15 |
side. The center of the pie is always at the center of the plot area.
|
|
|
16 |
</p><p>
|
|
|
17 |
If automatic pie chart sizing is enabled, PHPlot will leave additional room
|
|
|
18 |
within the plot area for the pie chart labels. It will calculate the maximum
|
|
|
19 |
width and height of the labels, and use these to increase the margins. Note
|
|
|
20 |
that it does not take into account where each label is displayed. For
|
|
|
21 |
example, if there is a very wide label displayed only at the top of the pie,
|
|
|
22 |
this will still result in a decrease in overall pie width.
|
|
|
23 |
</p><p>
|
|
|
24 |
If pie labels are either disabled or positioned inside the pie
|
|
|
25 |
(using <a class="xref" href="SetLabelScalePosition.html" title="SetLabelScalePosition"><span class="refentrytitle">SetLabelScalePosition</span></a>),
|
|
|
26 |
then <code class="function">SetPieAutoSize()</code> has no effect.
|
|
|
27 |
Whether automatic sizing is on or off, the pie chart will use the maximum
|
|
|
28 |
size in this case, since no additional space is needed for labels.
|
|
|
29 |
</p><p>
|
|
|
30 |
With automatic pie chart sizing enabled, PHPlot prevents overly long labels
|
|
|
31 |
from resulting in a pie chart which is too small. It does this by limiting
|
|
|
32 |
the minimum pie size to one half of the plot width or height, even if this
|
|
|
33 |
causes labels to run off the edge.
|
|
|
34 |
This behavior can be adjusted - see <a class="xref" href="adv-tuning.html#adv-tuning-pie" title="4.7.5. Tuning Pie Charts">Section 4.7.5, “Tuning Pie Charts”</a> for more.
|
|
|
35 |
</p></div><div class="refsect1"><a id="idp1378454068"></a><h2>History</h2><p>
|
|
|
36 |
This function was added in PHPlot-5.6.0. In earlier releases, PHPlot never
|
|
|
37 |
took label sizes into account when calculating the pie size. Note that the
|
|
|
38 |
default <code class="literal">True</code> is not backward compatible.
|
|
|
39 |
However, there were additional changes made to pie chart sizing and label
|
|
|
40 |
positioning in PHPlot-5.6.0, such that neither enabling nor disabling
|
|
|
41 |
automatic sizing will produce identical results compared to previous releases.
|
|
|
42 |
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="SetOutputFile.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="SetPieBorderColor.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SetOutputFile </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> SetPieBorderColor</td></tr></table></div></body></html>
|