<!-- saved from url=(0026)http://www.naturaldocs.org -->
<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><divclass="CTitle logo"><divclass="nav"><aclass="nav"href="../../../index.php"><span>></span>Home</a><aclass="nav"href="../../../tests/"><span>></span>Examples</a><aclass="nav"href="../../../docs/"><span>></span>Docs</a><aclass="nav"href="http://bitbucket.org/cleonello/jqplot/downloads/"><span>></span>Download</a><aclass="nav"href="../../../info.php"><span>></span>Info</a><aclass="nav"href="../../../donate.php"><span>></span>Donate</a></div><aname="$.jqplot.DateAxisRenderer"></a>$.jqplot.<wbr>DateAxisRenderer</div><divclass=CBody><p>A plugin for a jqPlot to render an axis as a series of date values. This renderer has no options beyond those supplied by the <ahref="../jqplot-core-js.html#Axis"class=LClassid=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">Axis</a> class. It supplies its own tick formatter, so the tickOptions.formatter option should not be overridden.</p><p>Thanks to Ken Synder for his enhanced Date instance methods which are included with this code <ahref="http://kendsnyder.com/sandbox/date/"class=LURLtarget=_top>http://kendsnyder.com/sandbox/date/</a>.</p><p>To use this renderer, include the plugin in your source</p><blockquote><pre><script type="text/javascript" language="javascript" src="plugins/jqplot.dateAxisRenderer.js"></script></pre></blockquote><p>and supply the appropriate options to your plot</p><blockquote><pre>{axes:{xaxis:{renderer:$.jqplot.DateAxisRenderer}}}</pre></blockquote><p>Dates can be passed into the axis in almost any recognizable value and will be parsed. They will be rendered on the axis in the format specified by tickOptions.formatString. e.g. tickOptions.formatString = ‘%Y-%m-%d’.</p><p>Accecptable format codes are:</p><blockquote><pre>Code Result Description
== Years ==
%Y 2008 Four-digit year
%y 08 Two-digit year
== Months ==
%m 09 Two-digit month
%#m 9 One or two-digit month
%B September Full month name
%b Sep Abbreviated month name
== Days ==
%d 05 Two-digit day of month
%#d 5 One or two-digit day of month
%e 5 One or two-digit day of month
%A Sunday Full name of the day of the week
%a Sun Abbreviated name of the day of the week
%w 0 Number of the day of the week (0 = Sunday, 6 = Saturday)
%o th The ordinal suffix string following the day of the month
== Hours ==
%H 23 Hours in 24-hour format (two digits)
%#H 3 Hours in 24-hour integer format (one or two digits)
%I 11 Hours in 12-hour format (two digits)
%#I 3 Hours in 12-hour integer format (one or two digits)
%p PM AM or PM
== Minutes ==
%M 09 Minutes (two digits)
%#M 9 Minutes (one or two digits)
== Seconds ==
%S 02 Seconds (two digits)
%#S 2 Seconds (one or two digits)
%s 1206567625723 Unix timestamp (Seconds past 1970-01-01 00:00:00)
== Milliseconds ==
%N 008 Milliseconds (three digits)
%#N 8 Milliseconds (one to three digits)
== Timezone ==
%O 360 difference in minutes between local time and GMT
%Z Mountain Standard Time Name of timezone as reported by browser
%G -06:00 Hours and minutes between GMT
== Shortcuts ==
%F 2008-03-26 %Y-%m-%d
%T 05:06:30 %H:%M:%S
%X 05:06:30 %H:%M:%S
%x 03/26/08 %m/%d/%y
%D 03/26/08 %m/%d/%y
%#c Wed Mar 26 15:31:00 2008 %a %b %e %H:%M:%S %Y
%v 3-Sep-2008 %e-%b-%Y
%R 15:31 %H:%M
%r 3:31:00 PM %I:%M:%S %p
== Characters ==
%n \n Newline
%t \t Tab
%% % Percent Symbol</pre></blockquote><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#$.jqplot.DateAxisRenderer">$.jqplot.<wbr>DateAxisRenderer</a></td><tdclass=SDescription>A plugin for a jqPlot to render an axis as a series of date values. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#$.jqplot.DateAxisRenderer.Properties">Properties</a></td><tdclass=SDescription></td></tr><trclass="SProperty SIndent2 SMarked"><tdclass=SEntry><ahref="#$.jqplot.DateAxisRenderer.tickRenderer">tickRenderer</a></td><tdclass=SDescription>A class of a rendering engine for creating the ticks labels displayed on the plot, See <ahref="../jqplot-axisTickRenderer-js.html#$.jqplot.AxisTickRenderer"class=LClassid=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">$.jqplot.AxisTickRenderer</a>. </td></tr><trclass="SProperty SIndent2"><tdclass=SEntry><ahref="#$.jqplot.DateAxisRenderer.tickInset"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">tickInset</a></td><tdclass=SDescription>Controls the amount to inset the first and last ticks from the edges of the grid, in multiples of the tick interval. </td></tr><trclass="SProperty SIndent2 SMarked"><tdclass=SEntry><ahref="#$.jqplot.DateAxisRenderer.drawBaseline"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">drawBaseline</a></td><tdclass=SDescription>True to draw the axis baseline.</td></tr><trclass="SProperty SIndent2"><tdclass=SEntry><ahref="#$.jqplot.DateAxisRenderer.baselineWidth"id=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">baselineWidth</a></td><tdclass=SDescription>width of the baseline in pixels.</td></tr><trclass="SProperty SIndent2 SMarked"><tdclass=SEntry><ahref="#$.jqplot.DateAxisRenderer.baselineColor"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">baselineColor</a></td><tdclass=SDescription>CSS color spec for the baseline.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.DateAxisRenderer.tickRenderer"></a>tickRenderer</h3><divclass=CBody><p>A class of a rendering engine for creating the ticks labels displayed on the plot, See <ahref="../jqplot-axisTickRenderer-js.html#$.jqplot.AxisTickRenderer"class=LClassid=link7onMouseOver="ShowTip(event, 'tt1', 'link7')"onMouseOut="HideTip('tt1')">$.jqplot.AxisTickRenderer</a>. this.tickRenderer = $.jqplot.AxisTickRenderer; this.labelRenderer = $.jqplot.AxisLabelRenderer;</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.DateAxisRenderer.tickInset"></a>tickInset</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.tickInset = 0</td></tr></table></blockquote><p>Controls the amount to inset the first and last ticks from the edges of the grid, in multiples of the tick interval. 0 is no inset, 0.5 is one half a tick interval, 1 is a full tick interval, etc.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.DateAxisRenderer.drawBaseline"></a>drawBaseline</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.drawBaseline = true</td></tr></table></blockquote><p>True to draw the axis baseline.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.DateAxisRenderer.baselineWidth"></a>baselineWidth</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.baselineWidth = null</td></tr></table></blockquote><p>width of the baseline in pixels.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.DateAxisRenderer.baselineColor"></a>baselineColor</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.baselineColor = null</td></tr></table></blockquote><p>CSS color spec for the baseline.</p></div></div></div>
<divclass=CToolTipid="tt1"><divclass=CClass>A “tick” object showing the value of a tick/gridline on the plot.</div></div><divclass=CToolTipid="tt2"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.tickInset = 0</td></tr></table></blockquote>Controls the amount to inset the first and last ticks from the edges of the grid, in multiples of the tick interval. </div></div><divclass=CToolTipid="tt3"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.drawBaseline = true</td></tr></table></blockquote>True to draw the axis baseline.</div></div><divclass=CToolTipid="tt4"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.baselineWidth = null</td></tr></table></blockquote>width of the baseline in pixels.</div></div><divclass=CToolTipid="tt5"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.baselineColor = null</td></tr></table></blockquote>CSS color spec for the baseline.</div></div><divclass=CToolTipid="tt6"><divclass=CClass>An individual axis object. </div></div><!--END_ND_TOOLTIPS-->