<!-- 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.Cursor"></a>$.jqplot.<wbr>Cursor</div><divclass=CBody><p>Plugin class representing the cursor as displayed on the plot.</p><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#$.jqplot.Cursor">$.jqplot.<wbr>Cursor</a></td><tdclass=SDescription>Plugin class representing the cursor as displayed on the plot.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#$.jqplot.Cursor.Properties">Properties</a></td><tdclass=SDescription></td></tr><trclass="SProperty SIndent2 SMarked"><tdclass=SEntry><ahref="#$.jqplot.Cursor.style"id=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">style</a></td><tdclass=SDescription>CSS spec for cursor style</td></tr><trclass="SProperty SIndent2"><tdclass=SEntry><ahref="#$.jqplot.Cursor.show"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">show</a></td><tdclass=SDescription>whether to show the cursor or not.</td></tr><trclass="SProperty SIndent2 SMarked"><tdclass=SEntry><ahref="#$.jqplot.Cursor.showTooltip"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">showTooltip</a></td><tdclass=SDescription>show a cursor position tooltip. </td></tr><trclass="SProperty SIndent2"><tdclass=SEntry><ahref="#$.jqplot.Cursor.followMouse"id=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">followMouse</a></td><tdclass=SDescription>Tooltip follows the mouse, it is not at a fixed location. </td></tr><trclass="SProperty SIndent2 SMarked"><tdclass=SEntry><ahref="#$.jqplot.Cursor.tooltipLocation"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">tooltipLocation</a></td><tdclass=SDescription>Where to position tooltip. </td></tr><trclass="SProperty SIndent2"><tdclass=SEntry><ahref="#$.jqplot.Cursor.tooltipOffset"id=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">tooltipOffset</a></td><tdclass=SDescription>Pixel offset of tooltip from the grid boudaries or cursor center.</td></tr><trclass="SProperty SIndent2 SMarked"><tdclass=SEntry><ahref="#$.jqplot.Cursor.showTooltipGridPosition"id=link7onMouseOver="ShowTip(event, 'tt7', 'link7')"onMouseOut="HideTip('tt7')">showTooltipGridPosition</a></td><tdclass=SDescription>show the grid pixel coordinates of the mouse.</td></tr><trclass="SProperty SIndent2"><tdclass=SEntry><ahref="#$.jqplot.Cursor.showTooltipUnitPosition"id=link8onMouseOver="ShowTip(event, 'tt8', 'link8')"onMouseOut="HideTip('tt8')">showTooltipUnitPosition</a></td><tdclass=SDescription>show the unit (data) coordinates of the mouse.</td></tr><trclass="SProperty SIndent2 SMarked"><tdclass=SEntry><ahref="#$.jqplot.Cursor.showTooltipDataPosition"id=link9onMouseOver="ShowTip(event, 'tt9', 'link9')"onMouseOut="HideTip('tt9')">showTooltipDataPosition</a></td><tdclass=SDescription>Used with showVerticalLine to show intersecting data points in the tooltip.</td></tr><trclass="SProperty SIndent2"><tdclass=SEntry><ahref="#$.jqplot.Cursor.tooltipFormatString"id=link10onMouseOver="ShowTip(event, 'tt10', 'link10')"onMouseOut="HideTip('tt10')">tooltipFormatString</a></td><tdclass=SDescription>sprintf format string for the tooltip. </td></tr><trclass="SProperty SIndent2 SMarked"><tdclass=SEntry><ahref="#$.jqplot.Cursor.useAxesFormatters"id=link11onMouseOver="ShowTip(event,'tt11','l
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.style"></a>style</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.style = 'crosshair'</td></tr></table></blockquote><p>CSS spec for cursor style</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.show"></a>show</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.show = $.jqplot.config.enablePlugins</td></tr></table></blockquote><p>whether to show the cursor or not.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.showTooltip"></a>showTooltip</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.showTooltip = true</td></tr></table></blockquote><p>show a cursor position tooltip. Location of the tooltip will be controlled by followMouse and tooltipLocation.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.followMouse"></a>followMouse</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.followMouse = false</td></tr></table></blockquote><p>Tooltip follows the mouse, it is not at a fixed location. Tooltip will show on the grid at the location given by tooltipLocation, offset from the grid edge by tooltipOffset.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.tooltipLocation"></a>tooltipLocation</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.tooltipLocation = 'se'</td></tr></table></blockquote><p>Where to position tooltip. If followMouse is true, this is relative to the cursor, otherwise, it is relative to the grid. One of ‘n’, ‘ne’, ‘e’, ‘se’, ‘s’, ‘sw’, ‘w’, ‘nw’</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.tooltipOffset"></a>tooltipOffset</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.tooltipOffset = 6</td></tr></table></blockquote><p>Pixel offset of tooltip from the grid boudaries or cursor center.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.showTooltipGridPosition"></a>showTooltipGridPosition</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.showTooltipGridPosition = false</td></tr></table></blockquote><p>show the grid pixel coordinates of the mouse.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.showTooltipUnitPosition"></a>showTooltipUnitPosition</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.showTooltipUnitPosition = true</td></tr></table></blockquote><p>show the unit (data) coordinates of the mouse.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.showTooltipDataPosition"></a>showTooltipDataPosition</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.showTooltipDataPosition = false</td></tr></table></blockquote><p>Used with showVerticalLine to show intersecting data points in the tooltip.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.tooltipFormatString"></a>tooltipFormatString</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.tooltipFormatString = '%.4P, %.4P'</td></tr></table></blockquote><p>sprintf format string for the tooltip. Uses Ash Searle’s javascript sprintf implementation found here: <ahref="http://hexmen.com/blog/2007/03/printf-sprintf/"class=LURLtarget=_top>http://hexmen.com/blog/2007/03/printf-sprintf/</a> See <ahref="http://perldoc.perl.org/functions/sprintf.html"class=LURLtarget=_top>http://perldoc.perl.org/functions/sprintf.html</a> for reference Note, if showTooltipDataPosition is true, the default tooltipFormatString will be set to the cursorLegendFormatString, not the default given here.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.useAxesFormatters"></a>useAxesFormatters</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.useAxesFormatters = true</td></tr></table></blockquote><p>Use the x and y axes formatters to format the text in the tooltip.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.tooltipAxisGroups"></a>tooltipAxisGroups</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.tooltipAxisGroups = []</td></tr></table></blockquote><p>Show position for the specified axes. This is an array like [[‘xaxis’, ‘yaxis’], [‘xaxis’, ‘y2axis’]] Default is to compute automatically for all visible axes.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.looseZoom"></a>looseZoom</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.looseZoom = true</td></tr></table></blockquote><p>Will expand zoom range to provide more rounded tick values. Works only with linear, log and date axes.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.clickReset"></a>clickReset</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.clickReset = false</td></tr></table></blockquote><p>Will reset plot zoom if single click on plot without drag.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.dblClickReset"></a>dblClickReset</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.dblClickReset = true</td></tr></table></blockquote><p>Will reset plot zoom if double click on plot without drag.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.showVerticalLine"></a>showVerticalLine</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.showVerticalLine = false</td></tr></table></blockquote><p>draw a vertical line across the plot which follows the cursor. When the line is near a data point, a special legend and/or tooltip can be updated with the data values.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.showHorizontalLine"></a>showHorizontalLine</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.showHorizontalLine = false</td></tr></table></blockquote><p>draw a horizontal line across the plot which follows the cursor.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.constrainZoomTo"></a>constrainZoomTo</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.constrainZoomTo = 'none'</td></tr></table></blockquote><p>’none’, ‘x’ or ‘y’</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.intersectionThreshold"></a>intersectionThreshold</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.intersectionThreshold = 2</td></tr></table></blockquote><p>pixel distance from data point or marker to consider cursor lines intersecting with point. If data point markers are not shown, this should be >= 1 or will often miss point intersections.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.showCursorLegend"></a>showCursorLegend</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.showCursorLegend = false</td></tr></table></blockquote><p>Replace the plot legend with an enhanced legend displaying intersection information.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.cursorLegendFormatString"></a>cursorLegendFormatString</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.cursorLegendFormatString = $.jqplot.Cursor.cursorLegendFormatString</td></tr></table></blockquote><p>Format string used in the cursor legend. If showTooltipDataPosition is true, this will also be the default format string used by tooltipFormatString.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.constrainOutsideZoom"></a>constrainOutsideZoom</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.constrainOutsideZoom = true</td></tr></table></blockquote><p>True to limit actual zoom area to edges of grid, even when zooming outside of plot area. That is, can’t zoom out by mousing outside plot.</p></div></div></div>
<divclass="CProperty"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.showTooltipOutsideZoom"></a>showTooltipOutsideZoom</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.showTooltipOutsideZoom = false</td></tr></table></blockquote><p>True will keep updating the tooltip when zooming of the grid.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="$.jqplot.Cursor.$.jqplot.Cursor.zoomProxy"></a>$.jqplot.<wbr>Cursor.<wbr>zoomProxy</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>$.jqplot.Cursor.zoomProxy = function(</td><tdclass=PParameternowrap>targetPlot,</td></tr><tr><td></td><tdclass=PParameternowrap>controllerPlot</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>links targetPlot to controllerPlot so that plot zooming of targetPlot will be controlled by zooming on the controllerPlot. controllerPlot will not actually zoom, but acts as an overview plot. Note, the zoom options must be set to true for zoomProxy to work.</p></div></div></div>
<divclass=CToolTipid="tt1"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.style = 'crosshair'</td></tr></table></blockquote>CSS spec for cursor style</div></div><divclass=CToolTipid="tt2"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.show = $.jqplot.config.enablePlugins</td></tr></table></blockquote>whether to show the cursor or not.</div></div><divclass=CToolTipid="tt3"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.showTooltip = true</td></tr></table></blockquote>show a cursor position tooltip. </div></div><divclass=CToolTipid="tt4"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.followMouse = false</td></tr></table></blockquote>Tooltip follows the mouse, it is not at a fixed location. </div></div><divclass=CToolTipid="tt5"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.tooltipLocation = 'se'</td></tr></table></blockquote>Where to position tooltip. </div></div><divclass=CToolTipid="tt6"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.tooltipOffset = 6</td></tr></table></blockquote>Pixel offset of tooltip from the grid boudaries or cursor center.</div></div><divclass=CToolTipid="tt7"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.showTooltipGridPosition = false</td></tr></table></blockquote>show the grid pixel coordinates of the mouse.</div></div><divclass=CToolTipid="tt8"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.showTooltipUnitPosition = true</td></tr></table></blockquote>show the unit (data) coordinates of the mouse.</div></div><divclass=CToolTipid="tt9"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.showTooltipDataPosition = false</td></tr></table></blockquote>Used with showVerticalLine to show intersecting data points in the tooltip.</div></div><divclass=CToolTipid="tt10"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.tooltipFormatString = '%.4P, %.4P'</td></tr></table></blockquote>sprintf format string for the tooltip. </div></div><divclass=CToolTipid="tt11"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.useAxesFormatters = true</td></tr></table></blockquote>Use the x and y axes formatters to format the text in the tooltip.</div></div><divclass=CToolTipid="tt12"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.tooltipAxisGroups = []</td></tr></table></blockquote>Show position for the specified axes. </div></div><divclass=CToolTipid="tt13"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.zoom = false</td></tr></table></blockquote>Enable plot zooming.</div></div><divclass=CToolTipid="tt14"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.looseZoom = true</td></tr></table></blockquote>Will expand zoom range to provide more rounded tick values. </div></div><divclass=CToolTipid="tt15"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.clickReset = false</td></tr></table></blockquote>Will reset plot zoom if single click on plot without drag.</div></div><divclass=CToolTipid="tt16"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>this.dblClickReset = true</td></tr></table></blockquote>Will reset plot zoom if double click on plot without drag.</div></div><divclass=CToolTipid="tt17"><divclass=CProperty><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><t