<!-- 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.PointLabels"></a>$.jqplot.<wbr>PointLabels</div><divclass=CBody><p>Plugin for putting labels at the data points.</p><p>To use this plugin, include the js file in your source:</p><blockquote><pre><script type="text/javascript" src="plugins/jqplot.pointLabels.js"></script></pre></blockquote><p>By default, the last value in the data ponit array in the data series is used for the label. For most series renderers, extra data can be added to the data point arrays and the last value will be used as the label.</p><p>For instance, this series:</p><blockquote><pre>[[1,4], [3,5], [7,2]]</pre></blockquote><p>Would, by default, use the y values in the labels. Extra data can be added to the series like so:</p><blockquote><pre>[[1,4,'mid'], [3 5,'hi'], [7,2,'low']]</pre></blockquote><p>And now the point labels would be ‘mid’, ‘low’, and ‘hi’.</p><p>Options to the point labels and a custom labels array can be passed into the “pointLabels” option on the series option like so:</p><blockquote><pre>series:[{pointLabels:{
labels:['mid', 'hi', 'low'],
location:'se',
ypadding: 12
}
}]</pre></blockquote><p>A custom labels array in the options takes precendence over any labels in the series data. If you have a custom labels array in the options, but still want to use values from the series array as labels, set the “labelsFromSeries” option to true.</p><p>By default, html entities (<, >, etc.) are escaped in point labels. If you want to include actual html markup in the labels, set the “escapeHTML” option to false.</p><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#$.jqplot.PointLabels">$.jqplot.<wbr>PointLabels</a></td><tdclass=SDescription>Plugin for putting labels at the data points.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#$.jqplot.PointLabels.Properties">Properties</a></td><tdclass=SDescription></td></tr><trclass="SProperty SIndent2 SMarked"><tdclass=SEntry><ahref="#$.jqplot.PointLabels.show"id=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">show</a></td><tdclass=SDescription>show the labels or not.</td></tr><trclass="SProperty SIndent2"><tdclass=SEntry><ahref="#$.jqplot.PointLabels.location"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">location</a></td><tdclass=SDescription>compass location where to position the label around the point. </td></tr><trclass="SProperty SIndent2 SMarked"><tdclass=SEntry><ahref="#$.jqplot.PointLabels.labelsFromSeries"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">labelsFromSeries</a></td><tdclass=SDescription>true to use labels within data point arrays.</td></tr><trclass="SProperty SIndent2"><tdclass=SEntry><ahref="#$.jqplot.PointLabels.seriesLabelIndex"id=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">seriesLabelIndex</a></td><tdclass=SDescription>array index for location of labels within data point arrays. </td></tr><trclass="SProperty SIndent2 SMarked"><tdclass=SEntry><ahref="#$.jqplot.PointLabels.labels"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">labels</a></td><tdclass=SDescription>array of arrays of labels, one array for each series.</td></tr><trclass="SProperty SIndent2"><tdclass=SEntry><ahref="#$.jqplot.PointLabels.stackedValue"id=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">stackedValue</a></td><tdclass=SDescription>true to display value as stacked in a stacked plot. </td></tr><trclass="SProperty SIndent2 SMarked"><tdclass=SEntry><ahref="#$.jqplot.PointLabels.ypadding"id=link7onMouseOver="ShowTip(event, 'tt7', 'link7')"onMouseOut="HideTip('tt7')">ypadding</a></td><tdclass=SDescription>vertical padding in pixels between point and label</td></tr><trclass="SProperty SIndent2"><tdclass=SEntry><ahref="#$.jqplot.PointLabels.xpadding"id=link8onMouseOver="ShowTip(event, 'tt8', 'link8')"onMouseOut="HideTip('tt8')">xpadding</a></td><tdclass=SDescription>horizontal padding in pixels between point and label</td></tr><trclass="SProperty SIndent2 SMarked"><tdclass=SEntry><ahref="#$.jqplot.PointLabels.escapeHTML"id=link9onMouseOver="ShowTip(event, 'tt9', 'link9')"onMouseOut="HideTip('tt9')">escapeHTML</a></td><tdclass=SDescription>true to escape html entities in the labels. </td></tr><trclass="SProperty SIndent2"><tdclass=SEntry><ahref="#$.jqplot.PointLabels.edgeTolerance"id=link10onMouseOver="ShowTip(event, 'tt10', 'link10')"onMouseOut="HideTip('tt10')">edgeTolerance</a></td><tdclass=SDescription>Number of pixels that the label must be away from an axis boundary in order to be drawn. </td></tr><trclass="SProperty SIndent2 SMarked"><tdclass=SEntry><ahref="#$.jqplot.PointLabels.formatter"id=link11onMouseOver="ShowTip(event, 'tt11', 'link11')"onMouseOut="HideTip('tt11')">formatter</a></td><tdclass=SDescription>A class of a formatter for the tick text. </td></tr><trclass="SProperty SIndent2"><tdc
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.PointLabels.show"></a>show</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.show = $.jqplot.config.enablePlugins</td></tr></table></blockquote><p>show the labels or not.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.PointLabels.location"></a>location</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.location = 'n'</td></tr></table></blockquote><p>compass location where to position the label around the point. ‘n’, ‘ne’, ‘e’, ‘se’, ‘s’, ‘sw’, ‘w’, ‘nw’</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.PointLabels.labelsFromSeries"></a>labelsFromSeries</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.labelsFromSeries = false</td></tr></table></blockquote><p>true to use labels within data point arrays.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.PointLabels.seriesLabelIndex"></a>seriesLabelIndex</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.seriesLabelIndex = null</td></tr></table></blockquote><p>array index for location of labels within data point arrays. if null, will use the last element of the data point array.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.PointLabels.labels"></a>labels</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.labels = []</td></tr></table></blockquote><p>array of arrays of labels, one array for each series.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.PointLabels.stackedValue"></a>stackedValue</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.stackedValue = false</td></tr></table></blockquote><p>true to display value as stacked in a stacked plot. no effect if labels is specified.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.PointLabels.ypadding"></a>ypadding</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.ypadding = 6</td></tr></table></blockquote><p>vertical padding in pixels between point and label</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.PointLabels.xpadding"></a>xpadding</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.xpadding = 6</td></tr></table></blockquote><p>horizontal padding in pixels between point and label</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.PointLabels.escapeHTML"></a>escapeHTML</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.escapeHTML = true</td></tr></table></blockquote><p>true to escape html entities in the labels. If you want to include markup in the labels, set to false.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.PointLabels.edgeTolerance"></a>edgeTolerance</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.edgeTolerance = -5</td></tr></table></blockquote><p>Number of pixels that the label must be away from an axis boundary in order to be drawn. Negative values will allow overlap with the grid boundaries.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.PointLabels.formatter"></a>formatter</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.formatter = $.jqplot.DefaultTickFormatter</td></tr></table></blockquote><p>A class of a formatter for the tick text. sprintf by default.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.PointLabels.formatString"></a>formatString</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.formatString = ''</td></tr></table></blockquote><p>string passed to the formatter.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.PointLabels.hideZeros"></a>hideZeros</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.hideZeros = false</td></tr></table></blockquote><p>true to not show a label for a value which is 0.</p></div></div></div>
<divclass=CToolTipid="tt1"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.show = $.jqplot.config.enablePlugins</td></tr></table></blockquote>show the labels or not.</div></div><divclass=CToolTipid="tt2"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.location = 'n'</td></tr></table></blockquote>compass location where to position the label around the point. </div></div><divclass=CToolTipid="tt3"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.labelsFromSeries = false</td></tr></table></blockquote>true to use labels within data point arrays.</div></div><divclass=CToolTipid="tt4"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.seriesLabelIndex = null</td></tr></table></blockquote>array index for location of labels within data point arrays. </div></div><divclass=CToolTipid="tt5"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.labels = []</td></tr></table></blockquote>array of arrays of labels, one array for each series.</div></div><divclass=CToolTipid="tt6"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.stackedValue = false</td></tr></table></blockquote>true to display value as stacked in a stacked plot. </div></div><divclass=CToolTipid="tt7"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.ypadding = 6</td></tr></table></blockquote>vertical padding in pixels between point and label</div></div><divclass=CToolTipid="tt8"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.xpadding = 6</td></tr></table></blockquote>horizontal padding in pixels between point and label</div></div><divclass=CToolTipid="tt9"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.escapeHTML = true</td></tr></table></blockquote>true to escape html entities in the labels. </div></div><divclass=CToolTipid="tt10"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.edgeTolerance = -5</td></tr></table></blockquote>Number of pixels that the label must be away from an axis boundary in order to be drawn. </div></div><divclass=CToolTipid="tt11"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.formatter = $.jqplot.DefaultTickFormatter</td></tr></table></blockquote>A class of a formatter for the tick text. </div></div><divclass=CToolTipid="tt12"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.formatString = ''</td></tr></table></blockquote>string passed to the formatter.</div></div><divclass=CToolTipid="tt13"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.hideZeros = false</td></tr></table></blockquote>true to not show a label for a value which is 0.</div></div><!--END_ND_TOOLTIPS-->