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

(开头部分) 32KB

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

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

<html><head><title>$.jqplot.PieRenderer</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.PieRenderer"></a>$.jqplot.<wbr>PieRenderer</div><div class=CBody><p>Plugin renderer to draw a pie chart. x values, if present, will be used as slice labels. y values give slice size.</p><p>To use this renderer, you need to include the pie renderer plugin, for example:</p><blockquote><pre>&lt;script type=&quot;text/javascript&quot; src=&quot;plugins/jqplot.pieRenderer.js&quot;&gt;&lt;/script&gt;</pre></blockquote><p>Properties described here are passed into the $.jqplot function as options on the series renderer.&nbsp;  For example:</p><blockquote><pre>plot2 = $.jqplot('chart2', [s1, s2], {
    seriesDefaults: {
        renderer:$.jqplot.PieRenderer,
        rendererOptions:{
             sliceMargin: 2,
             startAngle: -90
         }
     }
});</pre></blockquote><p>A pie plot will trigger events on the plot target according to user interaction.&nbsp;  All events return the event object, the series index, the point (slice) index, and the point data for the appropriate slice.</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>&rsquo;jqplotDataMouseOver&rsquo;</td><td class=CDLDescription>triggered when user mouseing over a slice.</td></tr><tr><td class=CDLEntry>&rsquo;jqplotDataHighlight&rsquo;</td><td class=CDLDescription>triggered the first time user mouses over a slice, if highlighting is enabled.</td></tr><tr><td class=CDLEntry>&rsquo;jqplotDataUnhighlight&rsquo;</td><td class=CDLDescription>triggered when a user moves the mouse out of a highlighted slice.</td></tr><tr><td class=CDLEntry>&rsquo;jqplotDataClick&rsquo;</td><td class=CDLDescription>triggered when the user clicks on a slice.</td></tr><tr><td class=CDLEntry>&rsquo;jqplotDataRightClick&rsquo;</td><td class=CDLDescription>tiggered when the user right clicks on a slice if the &ldquo;captureRightClick&rdquo; option is set to true on the plot.</td></tr></table><!--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.PieRenderer" >$.jqplot.<wbr>PieRenderer</a></td><td class=SDescription>Plugin renderer to draw a pie chart. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#$.jqplot.PieRenderer.Properties" >Properties</a></td><td class=SDescription></td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.PieRenderer.diameter" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">diameter</a></td><td class=SDescription>Outer diameter of the pie, auto computed by default</td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#$.jqplot.PieRenderer.padding" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">padding</a></td><td class=SDescription>padding between the pie and plot edges, legend, etc.</td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.PieRenderer.sliceMargin" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">sliceMargin</a></td><td class=SDescription>angular spacing between pie slices in degrees.</td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#$.jqplot.PieRenderer.fill" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">fill</a></td><td class=SDescription>true or false, wether to fil the slices.</td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.PieRenderer.shadowOffset" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">shadowOffset</a></td><td class=SDescription>offset of the shadow from the slice and offset of each succesive stroke of the shadow from the last.</td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#$.jqplot.PieRenderer.shadowAlpha" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">shadowAlpha</a></td><td class=SDescription>transparency of the shadow (0 = transparent, 1 = opaque)</td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.PieRenderer.shadowDepth" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">shadowDepth</a></td><td class=SDescription>number of strokes to apply to the shadow, each stroke offset shadowOffset from the last.</td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#$.jqplot.PieRenderer.highlightMouseOver" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">highlightMouseOver</a></td><td class=SDescription>True to highlight slice when moused over. </td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.PieRenderer.highlightMouseDown" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">highlightMouseDown</a></td><td class=SDescription>True to highlight when a mouse button is pressed over a slice. </td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#$.jqplot.PieRenderer.highlightColors" id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">highlightColors</a></td><td class=SDescription>an array of colors to use when highlighting a slice.</td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.PieRenderer.dataLabels" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">dataLabels</a></td><td class=SDescription>Either &lsquo;label&rsquo;, &lsquo;value&rsquo;, &lsquo;percent&rsquo; or an array of labels to place on the pie slices. </td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#$.jqplot.PieRenderer.showDataLabels" id=link12 onMouseOver="ShowTip(event, 'tt12', 'link12')" onMouseOut="HideTip('tt12')">showDataLabels</a></td><td class=SDescription>true to show data labels on slices.</td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.PieRenderer.dataLabelFormatString" id=link13 onMouseOver="ShowTip(event, 'tt13', 'link13')" onMouseOut="HideTip('tt13')">dataLabelFormatString</a></td><td class=SDescription>Format string for data labels. </td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#$.jqplot.PieRenderer.dataLabelThreshold" id=link14 onMouseOver="ShowTip(event, 'tt14', 'link14')" onMouseOut="HideTip('tt14')">dataLabelThreshold</a></td><td class=SDescription>Threshhold in percentage (0-100) of pie area, below which no label will be displayed. </td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.PieRenderer.dataLabelPositionFactor" id=link15 onMouseOver="ShowTip(event, 'tt15', 'link15')" onMouseOut="HideTip('tt15')">dataLabelPositionFactor</a></td><td class=SDescription>A Multiplier (0-1) of the pie radius which controls position of label on slice. </td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#$.jqplot.PieRenderer.dataLabelNudge" id=link16 onMouseOver="ShowTip(event, 'tt16', 'link16')" onMouseOut="HideTip('tt16')">dataLabelNudge</a></td><td class=SDescription>Number of pixels to slide the label away from (+) or toward (-) the center of the pie.</td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.PieRenderer.dataLabelCenterOn" id=link17 onMouseOver="ShowTip(event, 'tt17', 'link17')" onMouseOut="HideTip('tt17')">dataLabelCenterOn</a></td><td class=SDescription>True to center the data label at its position. </td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#$.jqplot.PieRenderer.startAngle" id=link18 onMouseOver="ShowTip(event, 'tt18', 'link18')" onMouseOut="HideTip('tt18')">startAngle</a></td><td class=SDescription>Angle to start drawing pie in degrees. </td></tr><tr class="SClass"><td class=SEntry><a href="#$.jqplot.PieLegendRenderer" >$.jqplot.<wbr>PieLegendRenderer</a></td><td class=SDescription>Legend Renderer specific to pie plots. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#$.jqplot.PieLegendRenderer.Properties" >Properties</a></td><td class=SDescription></td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#$.jqplot.PieLegendRenderer.numberRows" id=link19 onMouseOver="ShowTip(event, 'tt19', 'link19')" onMouseOut="HideTip('tt19')">numberRows</a></td><td class=SDescription>Maximum number of rows in the legend. </td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#$.jqplot.PieLegendRenderer.numberColumns" id=link20 onMouseOver="ShowTip(event, 'tt20', 'link20')" onMouseOut="HideTip('tt20')">numberColumns</a></td><td class=SDescription>Maximum number of columns in the legend. </td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

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

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.PieRenderer.diameter"></a>diameter</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.diameter = null</td></tr></table></blockquote><p>Outer diameter of the pie, auto computed by default</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.PieRenderer.padding"></a>padding</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.padding = 20</td></tr></table></blockquote><p>padding between the pie and plot edges, legend, etc.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.PieRenderer.sliceMargin"></a>sliceMargin</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.sliceMargin = 0</td></tr></table></blockquote><p>angular spacing between pie slices in degrees.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.PieRenderer.fill"></a>fill</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.fill = true</td></tr></table></blockquote><p>true or false, wether to fil the slices.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.PieRenderer.shadowOffset"></a>shadowOffset</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.shadowOffset = 2</td></tr></table></blockquote><p>offset of the shadow from the slice and offset of each succesive stroke of the shadow from the last.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.PieRenderer.shadowAlpha"></a>shadowAlpha</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.shadowAlpha = 0.07</td></tr></table></blockquote><p>transparency of the shadow (0 = transparent, 1 = opaque)</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.PieRenderer.shadowDepth"></a>shadowDepth</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.shadowDepth = 5</td></tr></table></blockquote><p>number of strokes to apply to the shadow, each stroke offset shadowOffset from the last.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.PieRenderer.highlightMouseOver"></a>highlightMouseOver</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.highlightMouseOver = true</td></tr></table></blockquote><p>True to highlight slice when moused over.&nbsp; This must be false to enable highlightMouseDown to highlight when clicking on a slice.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.PieRenderer.highlightMouseDown"></a>highlightMouseDown</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.highlightMouseDown = false</td></tr></table></blockquote><p>True to highlight when a mouse button is pressed over a slice.&nbsp; This will be disabled if highlightMouseOver is true.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.PieRenderer.highlightColors"></a>highlightColors</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.highlightColors = []</td></tr></table></blockquote><p>an array of colors to use when highlighting a slice.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.PieRenderer.dataLabels"></a>dataLabels</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.dataLabels = 'percent'</td></tr></table></blockquote><p>Either &lsquo;label&rsquo;, &lsquo;value&rsquo;, &lsquo;percent&rsquo; or an array of labels to place on the pie slices.&nbsp; Defaults to percentage of each pie slice.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.PieRenderer.showDataLabels"></a>showDataLabels</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.showDataLabels = false</td></tr></table></blockquote><p>true to show data labels on slices.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.PieRenderer.dataLabelFormatString"></a>dataLabelFormatString</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.dataLabelFormatString = null</td></tr></table></blockquote><p>Format string for data labels.&nbsp;  If none, &lsquo;%s&rsquo; is used for &ldquo;label&rdquo; and for arrays, &lsquo;%d&rsquo; for value and &lsquo;%d%%&rsquo; for percentage.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.PieRenderer.dataLabelThreshold"></a>dataLabelThreshold</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.dataLabelThreshold = 3</td></tr></table></blockquote><p>Threshhold in percentage (0-100) of pie area, below which no label will be displayed.&nbsp; This applies to all label types, not just to percentage labels.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.PieRenderer.dataLabelPositionFactor"></a>dataLabelPositionFactor</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.dataLabelPositionFactor = 0.52</td></tr></table></blockquote><p>A Multiplier (0-1) of the pie radius which controls position of label on slice.&nbsp; Increasing will slide label toward edge of pie, decreasing will slide label toward center of pie.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.PieRenderer.dataLabelNudge"></a>dataLabelNudge</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.dataLabelNudge = 2</td></tr></table></blockquote><p>Number of pixels to slide the label away from (+) or toward (-) the center of the pie.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.PieRenderer.dataLabelCenterOn"></a>dataLabelCenterOn</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.dataLabelCenterOn = true</td></tr></table></blockquote><p>True to center the data label at its position.&nbsp; False to set the inside facing edge of the label at its position.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="$.jqplot.PieRenderer.startAngle"></a>startAngle</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.startAngle = 0</td></tr></table></blockquote><p>Angle to start drawing pie in degrees.&nbsp; According to orientation of canvas coordinate system: 0 = on the positive x axis -90 = on the positive y axis.&nbsp; 90 = on the negaive y axis.&nbsp; 180 or - 180 = on the negative x axis.</p></div></div></div>
后面还有 33 行代码,购买后查看完整代码

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

AI 解读

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

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