include/lib/jqplot/docs/files/plugins/jqplot-cursor-js.html

(开头部分) 35KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

<html><head><title>$.jqplot.Cursor</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script><script language=JavaScript src="../../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.4 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><div class="CTitle logo"><div class="nav"><a class="nav" href="../../../index.php"><span>&gt;</span>Home</a><a class="nav"  href="../../../tests/"><span>&gt;</span>Examples</a><a class="nav"  href="../../../docs/"><span>&gt;</span>Docs</a><a class="nav"  href="http://bitbucket.org/cleonello/jqplot/downloads/"><span>&gt;</span>Download</a><a class="nav" href="../../../info.php"><span>&gt;</span>Info</a><a class="nav"  href="../../../donate.php"><span>&gt;</span>Donate</a></div><a name="$.jqplot.Cursor"></a>$.jqplot.<wbr>Cursor</div><div class=CBody><p>Plugin class representing the cursor as displayed on the plot.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#$.jqplot.Cursor" >$.jqplot.<wbr>Cursor</a></td><td class=SDescription>Plugin class representing the cursor as displayed on the plot.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#$.jqplot.Cursor.Properties" >Properties</a></td><td class=SDescription></td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.Cursor.style" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">style</a></td><td class=SDescription>CSS spec for cursor style</td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#$.jqplot.Cursor.show" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">show</a></td><td class=SDescription>wether to show the cursor or not.</td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.Cursor.showTooltip" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">showTooltip</a></td><td class=SDescription>show a cursor position tooltip. </td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#$.jqplot.Cursor.followMouse" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">followMouse</a></td><td class=SDescription>Tooltip follows the mouse, it is not at a fixed location. </td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.Cursor.tooltipLocation" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">tooltipLocation</a></td><td class=SDescription>Where to position tooltip. </td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#$.jqplot.Cursor.tooltipOffset" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">tooltipOffset</a></td><td class=SDescription>Pixel offset of tooltip from the grid boudaries or cursor center.</td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.Cursor.showTooltipGridPosition" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">showTooltipGridPosition</a></td><td class=SDescription>show the grid pixel coordinates of the mouse.</td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#$.jqplot.Cursor.showTooltipUnitPosition" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">showTooltipUnitPosition</a></td><td class=SDescription>show the unit (data) coordinates of the mouse.</td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.Cursor.showTooltipDataPosition" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">showTooltipDataPosition</a></td><td class=SDescription>Used with showVerticalLine to show intersecting data points in the tooltip.</td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#$.jqplot.Cursor.tooltipFormatString" id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">tooltipFormatString</a></td><td class=SDescription>sprintf format string for the tooltip. </td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.Cursor.useAxesFormatters" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">useAxesFormatters</a></td><td class=SDescription>Use the x and y axes formatters to format the text in the tooltip.</td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#$.jqplot.Cursor.tooltipAxisGroups" id=link12 onMouseOver="ShowTip(event, 'tt12', 'link12')" onMouseOut="HideTip('tt12')">tooltipAxisGroups</a></td><td class=SDescription>Show position for the specified axes. </td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.Cursor.zoom" id=link13 onMouseOver="ShowTip(event, 'tt13', 'link13')" onMouseOut="HideTip('tt13')">zoom</a></td><td class=SDescription>Enable plot zooming.</td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#$.jqplot.Cursor.looseZoom" id=link14 onMouseOver="ShowTip(event, 'tt14', 'link14')" onMouseOut="HideTip('tt14')">looseZoom</a></td><td class=SDescription>Will expand zoom range to provide more rounded tick values. </td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.Cursor.clickReset" id=link15 onMouseOver="ShowTip(event, 'tt15', 'link15')" onMouseOut="HideTip('tt15')">clickReset</a></td><td class=SDescription>Will reset plot zoom if single click on plot without drag.</td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#$.jqplot.Cursor.dblClickReset" id=link16 onMouseOver="ShowTip(event, 'tt16', 'link16')" onMouseOut="HideTip('tt16')">dblClickReset</a></td><td class=SDescription>Will reset plot zoom if double click on plot without drag.</td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.Cursor.showVerticalLine" id=link17 onMouseOver="ShowTip(event, 'tt17', 'link17')" onMouseOut="HideTip('tt17')">showVerticalLine</a></td><td class=SDescription>draw a vertical line across the plot which follows the cursor. </td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#$.jqplot.Cursor.showHorizontalLine" id=link18 onMouseOver="ShowTip(event, 'tt18', 'link18')" onMouseOut="HideTip('tt18')">showHorizontalLine</a></td><td class=SDescription>draw a horizontal line across the plot which follows the cursor.</td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.Cursor.constrainZoomTo" id=link19 onMouseOver="ShowTip(event, 'tt19', 'link19')" onMouseOut="HideTip('tt19')">constrainZoomTo</a></td><td class=SDescription>&lsquo;none&rsquo;, &lsquo;x&rsquo; or &lsquo;y&rsquo;</td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#$.jqplot.Cursor.intersectionThreshold" id=link20 onMouseOver="ShowTip(event, 'tt20', 'link20')" onMouseOut="HideTip('tt20')">intersectionThreshold</a></td><td class=SDescription>pixel distance from data point or marker to consider cursor lines intersecting with point. </td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.Cursor.showCursorLegend" id=link21 onMouseOver="ShowTip(event, 'tt21', 'link21')" onMouseOut="HideTip('tt21')">showCursorLegend</a></td><td class=SDescription>Replace the plot legend with an enhanced legend displaying intersection information.</td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#$.jqplot.Cursor.cursorLegendFormatString" id=link22 onMouseOver="ShowTip(event, 'tt22', 'link22')" onMouseOut="HideTip('tt22')">cursorLegendFormatString</a></td><td class=SDescription>Format string used in the cursor legend. </td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.Cursor.constrainOutsideZoom" id=link23 onMouseOver="ShowTip(event, 'tt23', 'link23')" onMouseOut="HideTip('tt23')">constrainOutsideZoom</a></td><td class=SDescription>True to limit actual zoom area to edges of grid, even when zooming outside of plot area. </td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#$.jqplot.Cursor.showTooltipOutsideZoom" id=link24 onMouseOver="ShowTip(event, 'tt24', 'link24')" onMouseOut="HideTip('tt24')">showTooltipOutsideZoom</a></td><td class=SDescription>True will keep updating the tooltip when zooming of the grid.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#$.jqplot.Cursor.methods" >methods</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.Cursor.$.jqplot.Cursor.zoomProxy" id=link25 onMouseOver="ShowTip(event, 'tt25', 'link25')" onMouseOut="HideTip('tt25')">$.jqplot.<wbr>Cursor.<wbr>zoomProxy</a></td><td class=SDescription>links targetPlot to controllerPlot so that plot zooming of targetPlot will be controlled by zooming on the controllerPlot. </td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.Properties"></a>Properties</h3></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.style"></a>style</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.style = 'crosshair'</td></tr></table></blockquote><p>CSS spec for cursor style</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.show"></a>show</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.show = $.jqplot.config.enablePlugins</td></tr></table></blockquote><p>wether to show the cursor or not.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.showTooltip"></a>showTooltip</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.showTooltip = true</td></tr></table></blockquote><p>show a cursor position tooltip.&nbsp;  Location of the tooltip will be controlled by followMouse and tooltipLocation.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.followMouse"></a>followMouse</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.followMouse = false</td></tr></table></blockquote><p>Tooltip follows the mouse, it is not at a fixed location.&nbsp; Tooltip will show on the grid at the location given by tooltipLocation, offset from the grid edge by tooltipOffset.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.tooltipLocation"></a>tooltipLocation</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.tooltipLocation = 'se'</td></tr></table></blockquote><p>Where to position tooltip.&nbsp;  If followMouse is true, this is relative to the cursor, otherwise, it is relative to the grid.&nbsp; One of &lsquo;n&rsquo;, &lsquo;ne&rsquo;, &lsquo;e&rsquo;, &lsquo;se&rsquo;, &lsquo;s&rsquo;, &lsquo;sw&rsquo;, &lsquo;w&rsquo;, &lsquo;nw&rsquo;</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.tooltipOffset"></a>tooltipOffset</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=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>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.showTooltipGridPosition"></a>showTooltipGridPosition</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.showTooltipGridPosition = false</td></tr></table></blockquote><p>show the grid pixel coordinates of the mouse.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.showTooltipUnitPosition"></a>showTooltipUnitPosition</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.showTooltipUnitPosition = true</td></tr></table></blockquote><p>show the unit (data) coordinates of the mouse.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.showTooltipDataPosition"></a>showTooltipDataPosition</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=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>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.tooltipFormatString"></a>tooltipFormatString</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.tooltipFormatString = '%.4P, %.4P'</td></tr></table></blockquote><p>sprintf format string for the tooltip.&nbsp; Uses Ash Searle&rsquo;s javascript sprintf implementation found here: <a href="http://hexmen.com/blog/2007/03/printf-sprintf/" class=LURL target=_top>http://hexmen.com/blog/2007/03/printf-sprintf/</a> See <a href="http://perldoc.perl.org/functions/sprintf.html" class=LURL target=_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>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.useAxesFormatters"></a>useAxesFormatters</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=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>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.tooltipAxisGroups"></a>tooltipAxisGroups</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.tooltipAxisGroups = []</td></tr></table></blockquote><p>Show position for the specified axes.&nbsp; This is an array like [[&lsquo;xaxis&rsquo;, &lsquo;yaxis&rsquo;], [&lsquo;xaxis&rsquo;, &lsquo;y2axis&rsquo;]] Default is to compute automatically for all visible axes.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.zoom"></a>zoom</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.zoom = false</td></tr></table></blockquote><p>Enable plot zooming.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.looseZoom"></a>looseZoom</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.looseZoom = true</td></tr></table></blockquote><p>Will expand zoom range to provide more rounded tick values.&nbsp; Works only with linear, log and date axes.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.clickReset"></a>clickReset</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=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>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.dblClickReset"></a>dblClickReset</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=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>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.showVerticalLine"></a>showVerticalLine</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.showVerticalLine = false</td></tr></table></blockquote><p>draw a vertical line across the plot which follows the cursor.&nbsp; 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>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.showHorizontalLine"></a>showHorizontalLine</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=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>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.constrainZoomTo"></a>constrainZoomTo</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.constrainZoomTo = 'none'</td></tr></table></blockquote><p>&rsquo;none&rsquo;, &lsquo;x&rsquo; or &lsquo;y&rsquo;</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.intersectionThreshold"></a>intersectionThreshold</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=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.&nbsp; If data point markers are not shown, this should be &gt;= 1 or will often miss point intersections.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.showCursorLegend"></a>showCursorLegend</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=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>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.Cursor.cursorLegendFormatString"></a>cursorLegendFormatString</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.cursorLegendFormatString = $.jqplot.Cursor.cursorLegendFormatString</td></tr></table></blockquote><p>Format string used in the cursor legend.&nbsp;  If showTooltipDataPosition is true, this will also be the default format string used by tooltipFormatString.</p></div></div></div>
后面还有 33 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。