<!-- 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.CanvasAxisLabelRenderer"></a>$.jqplot.<wbr>CanvasAxisLabelRenderer</div><divclass=CBody><p>Renderer to draw axis labels with a canvas element to support advanced featrues such as rotated text. This renderer uses a separate rendering engine to draw the text on the canvas. Two modes of rendering the text are available. If the browser has native font support for canvas fonts (currently Mozila 3.5 and Safari 4), you can enable text rendering with the canvas fillText method. You do so by setting the “enableFontSupport” option to true.</p><p>Browsers lacking native font support will have the text drawn on the canvas using the Hershey font metrics. Even if the “enableFontSupport” option is true non-supporting browsers will still render with the Hershey font.</p><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#$.jqplot.CanvasAxisLabelRenderer">$.jqplot.<wbr>CanvasAxisLabelRenderer</a></td><tdclass=SDescription>Renderer to draw axis labels with a canvas element to support advanced featrues such as rotated text. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#$.jqplot.CanvasAxisLabelRenderer.Properties">Properties</a></td><tdclass=SDescription></td></tr><trclass="SProperty SIndent2 SMarked"><tdclass=SEntry><ahref="#$.jqplot.CanvasAxisLabelRenderer.angle"id=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">angle</a></td><tdclass=SDescription>angle of text, measured clockwise from x axis.</td></tr><trclass="SProperty SIndent2"><tdclass=SEntry><ahref="#$.jqplot.CanvasAxisLabelRenderer.show"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">show</a></td><tdclass=SDescription>whether or not to show the tick (mark and label).</td></tr><trclass="SProperty SIndent2 SMarked"><tdclass=SEntry><ahref="#$.jqplot.CanvasAxisLabelRenderer.showLabel"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">showLabel</a></td><tdclass=SDescription>whether or not to show the label.</td></tr><trclass="SProperty SIndent2"><tdclass=SEntry><ahref="#$.jqplot.CanvasAxisLabelRenderer.label"id=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">label</a></td><tdclass=SDescription>label for the axis.</td></tr><trclass="SProperty SIndent2 SMarked"><tdclass=SEntry><ahref="#$.jqplot.CanvasAxisLabelRenderer.fontFamily"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">fontFamily</a></td><tdclass=SDescription>CSS spec for the font-family css attribute. </td></tr><trclass="SProperty SIndent2"><tdclass=SEntry><ahref="#$.jqplot.CanvasAxisLabelRenderer.fontSize"id=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">fontSize</a></td><tdclass=SDescription>CSS spec for font size.</td></tr><trclass="SProperty SIndent2 SMarked"><tdclass=SEntry><ahref="#$.jqplot.CanvasAxisLabelRenderer.fontWeight"id=link7onMouseOver="ShowTip(event, 'tt7', 'link7')"onMouseOut="HideTip('tt7')">fontWeight</a></td><tdclass=SDescription></td></tr><trclass="SProperty SIndent2"><tdclass=SEntry><ahref="#$.jqplot.CanvasAxisLabelRenderer.fontStretch"id=link8onMouseOver="ShowTip(event, 'tt8', 'link8')"onMouseOut="HideTip('tt8')">fontStretch</a></td><tdclass=SDescription>Multiplier to condense or expand font width. </
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.CanvasAxisLabelRenderer.angle"></a>angle</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.angle = 0</td></tr></table></blockquote><p>angle of text, measured clockwise from x axis.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.CanvasAxisLabelRenderer.show"></a>show</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.show = true</td></tr></table></blockquote><p>whether or not to show the tick (mark and label).</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.CanvasAxisLabelRenderer.showLabel"></a>showLabel</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.showLabel = true</td></tr></table></blockquote><p>whether or not to show the label.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.CanvasAxisLabelRenderer.label"></a>label</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.label = ''</td></tr></table></blockquote><p>label for the axis.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.CanvasAxisLabelRenderer.fontFamily"></a>fontFamily</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.fontFamily = '"Trebuchet MS", Arial, Helvetica, sans-serif'</td></tr></table></blockquote><p>CSS spec for the font-family css attribute. Applies only to browsers supporting native font rendering in the canvas tag. Currently Mozilla 3.5 and Safari 4.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.CanvasAxisLabelRenderer.fontSize"></a>fontSize</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.fontSize = '11pt'</td></tr></table></blockquote><p>CSS spec for font size.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.CanvasAxisLabelRenderer.fontWeight"></a>fontWeight</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.fontWeight = 'normal'</td></tr></table></blockquote><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>CSS spec for fontWeight: normal, bold, bolder, lighter or a number 100</td><tdclass=CDLDescription>900</td></tr></table></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.CanvasAxisLabelRenderer.fontStretch"></a>fontStretch</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.fontStretch = 1.0</td></tr></table></blockquote><p>Multiplier to condense or expand font width. Applies only to browsers which don’t support canvas native font rendering.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.CanvasAxisLabelRenderer.textColor"></a>textColor</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.textColor = '#666666'</td></tr></table></blockquote><p>css spec for the color attribute.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.CanvasAxisLabelRenderer.enableFontSupport"></a>enableFontSupport</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.enableFontSupport = true</td></tr></table></blockquote><p>true to turn on native canvas font support in Mozilla 3.5+ and Safari 4+. If true, label will be drawn with canvas tag native support for fonts. If false, label will be drawn with Hershey font metrics.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.CanvasAxisLabelRenderer.pt2px"></a>pt2px</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.pt2px = null</td></tr></table></blockquote><p>Point to pixel scaling factor, used for computing height of bounding box around a label. The labels text renderer has a default setting of 1.4, which should be suitable for most fonts. Leave as null to use default. If tops of letters appear clipped, increase this. If bounding box seems too big, decrease. This is an issue only with the native font renderering capabilities of Mozilla 3.5 and Safari 4 since they do not provide a method to determine the font height.</p></div></div></div>
<divclass=CToolTipid="tt1"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.angle = 0</td></tr></table></blockquote>angle of text, measured clockwise from x axis.</div></div><divclass=CToolTipid="tt2"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.show = true</td></tr></table></blockquote>whether or not to show the tick (mark and label).</div></div><divclass=CToolTipid="tt3"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.showLabel = true</td></tr></table></blockquote>whether or not to show the label.</div></div><divclass=CToolTipid="tt4"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.label = ''</td></tr></table></blockquote>label for the axis.</div></div><divclass=CToolTipid="tt5"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.fontFamily = '"Trebuchet MS", Arial, Helvetica, sans-serif'</td></tr></table></blockquote>CSS spec for the font-family css attribute. </div></div><divclass=CToolTipid="tt6"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.fontSize = '11pt'</td></tr></table></blockquote>CSS spec for font size.</div></div><divclass=CToolTipid="tt7"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.fontWeight = 'normal'</td></tr></table></blockquote></div></div><divclass=CToolTipid="tt8"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.fontStretch = 1.0</td></tr></table></blockquote>Multiplier to condense or expand font width. </div></div><divclass=CToolTipid="tt9"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.textColor = '#666666'</td></tr></table></blockquote>css spec for the color attribute.</div></div><divclass=CToolTipid="tt10"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.enableFontSupport = true</td></tr></table></blockquote>true to turn on native canvas font support in Mozilla 3.5+ and Safari 4+. </div></div><divclass=CToolTipid="tt11"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.pt2px = null</td></tr></table></blockquote>Point to pixel scaling factor, used for computing height of bounding box around a label. </div></div><!--END_ND_TOOLTIPS-->