Subversion Repositories cheapmusic

Rev

Blame | Last modification | View Log | RSS feed

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!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>SetYTimeFormat</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="SetYTickPos.html" title="SetYTickPos" /><link rel="next" href="SetYTitle.html" title="SetYTitle" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SetYTimeFormat</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="SetYTickPos.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="SetYTitle.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="SetYTimeFormat"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">SetYTimeFormat</span></h2><p>SetYTimeFormat &#8212; Set date/time formatting string for Y labels</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot-&gt;SetYTimeFormat(<em class="parameter"><code>$ytf</code></em>)</pre></div><div class="refsect1"><a id="idp1379298860"></a><h2>Description</h2><p>
<code class="function">SetYTimeFormat</code> sets the formatting string for Y tick
and data labels when 'time' formatting mode for Y labels is in effect.
(Y data labels are only available with bar charts and stacked bar charts.)
Use <a class="xref" href="SetYLabelType.html" title="SetYLabelType"><span class="refentrytitle">SetYLabelType</span></a> to select the formatting mode for labels.
The formatting string is used with the PHP <code class="function">strftime</code>
to format labels as date/time strings.
    </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
This function is retained for compatibility, but use of
<a class="xref" href="SetYLabelType.html" title="SetYLabelType"><span class="refentrytitle">SetYLabelType</span></a> is preferred.
      </p></div></div><div class="refsect1"><a id="idp1379301676"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>$ytf</code></em></span></dt><dd><p>
Formatting string for Y labels, used with <code class="function">strftime()</code>.
For example, if the label value is 1104534000 (which is the
<code class="literal">time_t</code> representation of 6:00 PM on the last day of 2004),
'%Y-%m-%d.%H:%M:%S' results in '2004-12-31.18:00:00',
and '%d %b %Y' results in '31 Dec 2004'.
          </p></dd></dl></div></div><div class="refsect1"><a id="idp1379304092"></a><h2>Notes</h2><p>
This applies to Y tick labels, and also to Y data labels unless overridden
by <a class="xref" href="SetYDataLabelType.html" title="SetYDataLabelType"><span class="refentrytitle">SetYDataLabelType</span></a>.
    </p><p>
To use date/time formatting, the label values must be Unix time_t
values (number of seconds since Unix epoch).
    </p><p>
Unlike <a class="xref" href="SetPrecisionY.html" title="SetPrecisionY"><span class="refentrytitle">SetPrecisionY</span></a>, SetYTimeFormat does not
automatically enable the correct label formatting mode. You
must call <code class="literal">SetYLabelType('time')</code> to use date/time
formatting of labels.
    </p><p>
The default time format is '%H:%M:%S', showing hours, minutes, and seconds
(and ignoring any date information).
    </p></div><div class="refsect1"><a id="idp1379306828"></a><h2>History</h2><p>
Starting with PHPlot-5.0.6, the time format can be set with
<a class="xref" href="SetYLabelType.html" title="SetYLabelType"><span class="refentrytitle">SetYLabelType</span></a> instead.
    </p><p>
The default time format was undefined prior to PHPlot-5.0rc3.
    </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="SetYTickPos.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="SetYTitle.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SetYTickPos </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> SetYTitle</td></tr></table></div></body></html>