pv.Wedge.html 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  4. <head>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  6. <meta name="generator" content="JsDoc Toolkit" />
  7. <title>JsDoc Reference - pv.Wedge</title>
  8. <style type="text/css">
  9. /* default.css */
  10. body
  11. {
  12. font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
  13. width: 800px;
  14. }
  15. .header
  16. {
  17. clear: both;
  18. background-color: #ccc;
  19. padding: 8px;
  20. }
  21. h1
  22. {
  23. font-size: 150%;
  24. font-weight: bold;
  25. padding: 0;
  26. margin: 1em 0 0 .3em;
  27. }
  28. hr
  29. {
  30. border: none 0;
  31. border-top: 1px solid #7F8FB1;
  32. height: 1px;
  33. }
  34. pre.code
  35. {
  36. display: block;
  37. padding: 8px;
  38. border: 1px dashed #ccc;
  39. }
  40. #index
  41. {
  42. margin-top: 24px;
  43. float: left;
  44. width: 160px;
  45. position: absolute;
  46. left: 8px;
  47. background-color: #F3F3F3;
  48. padding: 8px;
  49. }
  50. #content
  51. {
  52. margin-left: 190px;
  53. width: 600px;
  54. }
  55. .classList
  56. {
  57. list-style-type: none;
  58. padding: 0;
  59. margin: 0 0 0 8px;
  60. font-family: arial, sans-serif;
  61. font-size: 1em;
  62. overflow: auto;
  63. }
  64. .classList li
  65. {
  66. padding: 0;
  67. margin: 0 0 8px 0;
  68. }
  69. .summaryTable { width: 100%; }
  70. h1.classTitle
  71. {
  72. font-size:170%;
  73. line-height:130%;
  74. }
  75. h2 { font-size: 110%; }
  76. caption, div.sectionTitle
  77. {
  78. background-color: #7F8FB1;
  79. color: #fff;
  80. font-size:130%;
  81. text-align: left;
  82. padding: 2px 6px 2px 6px;
  83. border: 1px #7F8FB1 solid;
  84. }
  85. div.sectionTitle { margin-bottom: 8px; }
  86. .summaryTable thead { display: none; }
  87. .summaryTable td
  88. {
  89. vertical-align: top;
  90. padding: 4px;
  91. border-bottom: 1px #7F8FB1 solid;
  92. border-right: 1px #7F8FB1 solid;
  93. }
  94. /*col#summaryAttributes {}*/
  95. .summaryTable td.attributes
  96. {
  97. border-left: 1px #7F8FB1 solid;
  98. width: 140px;
  99. text-align: right;
  100. }
  101. td.attributes, .fixedFont
  102. {
  103. line-height: 15px;
  104. color: #002EBE;
  105. font-family: "Courier New",Courier,monospace;
  106. font-size: 13px;
  107. }
  108. .summaryTable td.nameDescription
  109. {
  110. text-align: left;
  111. font-size: 13px;
  112. line-height: 15px;
  113. }
  114. .summaryTable td.nameDescription, .description
  115. {
  116. line-height: 15px;
  117. padding: 4px;
  118. padding-left: 4px;
  119. }
  120. pre
  121. {
  122. border-left: solid 10px #ddd;
  123. padding-left: 1.5em;
  124. }
  125. .summaryTable { margin-bottom: 8px; }
  126. ul.inheritsList
  127. {
  128. list-style: square;
  129. margin-left: 20px;
  130. padding-left: 0;
  131. }
  132. .detailList {
  133. margin-left: 20px;
  134. line-height: 15px;
  135. }
  136. .detailList dt { margin-left: 20px; }
  137. .detailList .heading
  138. {
  139. font-weight: bold;
  140. padding-bottom: 6px;
  141. margin-left: 0;
  142. }
  143. .light, td.attributes, .light a:link, .light a:visited
  144. {
  145. color: #777;
  146. font-style: italic;
  147. }
  148. .fineprint
  149. {
  150. text-align: right;
  151. font-size: 10px;
  152. }
  153. </style>
  154. </head>
  155. <body>
  156. <!-- ============================== header ================================= -->
  157. <!-- begin static/header.html -->
  158. <div id="header">
  159. </div>
  160. <!-- end static/header.html -->
  161. <!-- ============================== classes index ============================ -->
  162. <div id="index">
  163. <!-- begin publish.classesIndex -->
  164. <div align="center"><a href="../index.html">Class Index</a>
  165. | <a href="../files.html">File Index</a></div>
  166. <hr />
  167. <h2>Classes</h2>
  168. <ul class="classList">
  169. <li><i><a href="../symbols/_global_.html">_global_</a></i></li>
  170. <li><a href="../symbols/Array.html">Array</a></li>
  171. <li><a href="../symbols/Date.html">Date</a></li>
  172. <li><a href="../symbols/pv.html">pv</a></li>
  173. <li><a href="../symbols/pv.Anchor.html">pv.Anchor</a></li>
  174. <li><a href="../symbols/pv.Area.html">pv.Area</a></li>
  175. <li><a href="../symbols/pv.Bar.html">pv.Bar</a></li>
  176. <li><a href="../symbols/pv.Color.html">pv.Color</a></li>
  177. <li><a href="../symbols/pv.Color.Hsl.html">pv.Color.Hsl</a></li>
  178. <li><a href="../symbols/pv.Color.Rgb.html">pv.Color.Rgb</a></li>
  179. <li><a href="../symbols/pv.Colors.html">pv.Colors</a></li>
  180. <li><a href="../symbols/pv.Dot.html">pv.Dot</a></li>
  181. <li><a href="../symbols/pv.Flatten.html">pv.Flatten</a></li>
  182. <li><a href="../symbols/pv.Image.html">pv.Image</a></li>
  183. <li><a href="../symbols/pv.Label.html">pv.Label</a></li>
  184. <li><a href="../symbols/pv.Layout.grid.html">pv.Layout.grid</a></li>
  185. <li><a href="../symbols/pv.Layout.icicle.html">pv.Layout.icicle</a></li>
  186. <li><a href="../symbols/pv.Layout.stack.html">pv.Layout.stack</a></li>
  187. <li><a href="../symbols/pv.Layout.sunburst.html">pv.Layout.sunburst</a></li>
  188. <li><a href="../symbols/pv.Layout.treemap.html">pv.Layout.treemap</a></li>
  189. <li><a href="../symbols/pv.Line.html">pv.Line</a></li>
  190. <li><a href="../symbols/pv.Mark.html">pv.Mark</a></li>
  191. <li><a href="../symbols/pv.Nest.html">pv.Nest</a></li>
  192. <li><a href="../symbols/pv.ns.html">pv.ns</a></li>
  193. <li><a href="../symbols/pv.Panel.html">pv.Panel</a></li>
  194. <li><a href="../symbols/pv.Rule.html">pv.Rule</a></li>
  195. <li><a href="../symbols/pv.Scale.linear.html">pv.Scale.linear</a></li>
  196. <li><a href="../symbols/pv.Scale.log.html">pv.Scale.log</a></li>
  197. <li><a href="../symbols/pv.Scale.ordinal.html">pv.Scale.ordinal</a></li>
  198. <li><a href="../symbols/pv.Tree.html">pv.Tree</a></li>
  199. <li><a href="../symbols/pv.Vector.html">pv.Vector</a></li>
  200. <li><a href="../symbols/pv.version.html">pv.version</a></li>
  201. <li><a href="../symbols/pv.Wedge.html">pv.Wedge</a></li>
  202. </ul>
  203. <hr />
  204. <!-- end publish.classesIndex -->
  205. </div>
  206. <div id="content">
  207. <!-- ============================== class title ============================ -->
  208. <h1 class="classTitle">
  209. Class pv.Wedge
  210. </h1>
  211. <!-- ============================== class summary ========================== -->
  212. <p class="description">
  213. <br />Extends
  214. <a href="../symbols/pv.Mark.html">pv.Mark</a>.<br />
  215. Represents a wedge, or pie slice. Specified in terms of start and end
  216. angle, inner and outer radius, wedges can be used to construct donut charts
  217. and polar bar charts as well. If the <a href="#angle">#angle</a> property is used, the end
  218. angle is implied by adding this value to start angle. By default, the start
  219. angle is the previously-generated wedge's end angle. This design allows
  220. explicit control over the wedge placement if desired, while offering
  221. convenient defaults for the construction of radial graphs.
  222. <p>The center point of the circle is positioned using the standard box model.
  223. The wedge can be stroked and filled, similar to {link Bar}.
  224. <p>See also the <a href="../../api/Wedge.html">Wedge guide</a>.
  225. <br /><i>Defined in: </i> <a href="../symbols/src/mark_Wedge.js.html">Wedge.js</a>.
  226. </p>
  227. <!-- ============================== constructor summary ==================== -->
  228. <table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class pv.Wedge.">
  229. <caption>Class Summary</caption>
  230. <thead>
  231. <tr>
  232. <th scope="col">Constructor Attributes</th>
  233. <th scope="col">Constructor Name and Description</th>
  234. </tr>
  235. </thead>
  236. <tbody>
  237. <tr>
  238. <td class="attributes">&nbsp;</td>
  239. <td class="nameDescription" >
  240. <div class="fixedFont">
  241. <b><a href="../symbols/pv.Wedge.html#constructor">pv.Wedge</a></b>()
  242. </div>
  243. <div class="description">Constructs a new wedge with default properties.</div>
  244. </td>
  245. </tr>
  246. </tbody>
  247. </table>
  248. <!-- ============================== properties summary ===================== -->
  249. <table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class pv.Wedge.">
  250. <caption>Field Summary</caption>
  251. <thead>
  252. <tr>
  253. <th scope="col">Field Attributes</th>
  254. <th scope="col">Field Name and Description</th>
  255. </tr>
  256. </thead>
  257. <tbody>
  258. <tr>
  259. <td class="attributes">&nbsp;</td>
  260. <td class="nameDescription">
  261. <div class="fixedFont">
  262. <b><a href="../symbols/pv.Wedge.html#angle">angle</a></b>
  263. </div>
  264. <div class="description">The angular span of the wedge, in radians.</div>
  265. </td>
  266. </tr>
  267. <tr>
  268. <td class="attributes">&nbsp;</td>
  269. <td class="nameDescription">
  270. <div class="fixedFont">
  271. <b><a href="../symbols/pv.Wedge.html#defaults">defaults</a></b>
  272. </div>
  273. <div class="description">Default properties for wedges.</div>
  274. </td>
  275. </tr>
  276. <tr>
  277. <td class="attributes">&nbsp;</td>
  278. <td class="nameDescription">
  279. <div class="fixedFont">
  280. <b><a href="../symbols/pv.Wedge.html#endAngle">endAngle</a></b>
  281. </div>
  282. <div class="description">The end angle of the wedge, in radians.</div>
  283. </td>
  284. </tr>
  285. <tr>
  286. <td class="attributes">&nbsp;</td>
  287. <td class="nameDescription">
  288. <div class="fixedFont">
  289. <b><a href="../symbols/pv.Wedge.html#fillStyle">fillStyle</a></b>
  290. </div>
  291. <div class="description">The wedge fill style; if non-null, the interior of the wedge is filled with
  292. the specified color.</div>
  293. </td>
  294. </tr>
  295. <tr>
  296. <td class="attributes">&nbsp;</td>
  297. <td class="nameDescription">
  298. <div class="fixedFont">
  299. <b><a href="../symbols/pv.Wedge.html#innerRadius">innerRadius</a></b>
  300. </div>
  301. <div class="description">The inner radius of the wedge, in pixels.</div>
  302. </td>
  303. </tr>
  304. <tr>
  305. <td class="attributes">&nbsp;</td>
  306. <td class="nameDescription">
  307. <div class="fixedFont">
  308. <b><a href="../symbols/pv.Wedge.html#lineWidth">lineWidth</a></b>
  309. </div>
  310. <div class="description">The width of stroked lines, in pixels; used in conjunction with
  311. <tt>strokeStyle</tt> to stroke the wedge's border.</div>
  312. </td>
  313. </tr>
  314. <tr>
  315. <td class="attributes">&nbsp;</td>
  316. <td class="nameDescription">
  317. <div class="fixedFont">
  318. <b><a href="../symbols/pv.Wedge.html#outerRadius">outerRadius</a></b>
  319. </div>
  320. <div class="description">The outer radius of the wedge, in pixels.</div>
  321. </td>
  322. </tr>
  323. <tr>
  324. <td class="attributes">&nbsp;</td>
  325. <td class="nameDescription">
  326. <div class="fixedFont">
  327. <b><a href="../symbols/pv.Wedge.html#startAngle">startAngle</a></b>
  328. </div>
  329. <div class="description">The start angle of the wedge, in radians.</div>
  330. </td>
  331. </tr>
  332. <tr>
  333. <td class="attributes">&nbsp;</td>
  334. <td class="nameDescription">
  335. <div class="fixedFont">
  336. <b><a href="../symbols/pv.Wedge.html#strokeStyle">strokeStyle</a></b>
  337. </div>
  338. <div class="description">The style of stroked lines; used in conjunction with <tt>lineWidth</tt> to
  339. stroke the wedge's border.</div>
  340. </td>
  341. </tr>
  342. </tbody>
  343. </table>
  344. <dl class="inheritsList">
  345. <dt>Fields borrowed from class <a href="../symbols/pv.Mark.html">pv.Mark</a>: </dt><dd><a href="../symbols/pv.Mark.html#bottom">bottom</a>, <a href="../symbols/pv.Mark.html#childIndex">childIndex</a>, <a href="../symbols/pv.Mark.html#cursor">cursor</a>, <a href="../symbols/pv.Mark.html#data">data</a>, <a href="../symbols/pv.Mark.html#index">index</a>, <a href="../symbols/pv.Mark.html#left">left</a>, <a href="../symbols/pv.Mark.html#parent">parent</a>, <a href="../symbols/pv.Mark.html#proto">proto</a>, <a href="../symbols/pv.Mark.html#reverse">reverse</a>, <a href="../symbols/pv.Mark.html#right">right</a>, <a href="../symbols/pv.Mark.html#root">root</a>, <a href="../symbols/pv.Mark.html#scene">scene</a>, <a href="../symbols/pv.Mark.html#title">title</a>, <a href="../symbols/pv.Mark.html#top">top</a>, <a href="../symbols/pv.Mark.html#type">type</a>, <a href="../symbols/pv.Mark.html#visible">visible</a></dd>
  346. </dl>
  347. <!-- ============================== methods summary ======================== -->
  348. <table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class pv.Wedge.">
  349. <caption>Method Summary</caption>
  350. <thead>
  351. <tr>
  352. <th scope="col">Method Attributes</th>
  353. <th scope="col">Method Name and Description</th>
  354. </tr>
  355. </thead>
  356. <tbody>
  357. <tr>
  358. <td class="attributes">&nbsp;</td>
  359. <td class="nameDescription">
  360. <div class="fixedFont"><b><a href="../symbols/pv.Wedge.html#anchor">anchor</a></b>(name)
  361. </div>
  362. <div class="description">Constructs a new wedge anchor with default properties.</div>
  363. </td>
  364. </tr>
  365. <tr>
  366. <td class="attributes">&nbsp;</td>
  367. <td class="nameDescription">
  368. <div class="fixedFont"><b><a href="../symbols/pv.Wedge.html#midAngle">midAngle</a></b>()
  369. </div>
  370. <div class="description">Returns the mid-angle of the wedge, which is defined as half-way between the
  371. start and end angles.</div>
  372. </td>
  373. </tr>
  374. <tr>
  375. <td class="attributes">&nbsp;</td>
  376. <td class="nameDescription">
  377. <div class="fixedFont"><b><a href="../symbols/pv.Wedge.html#midRadius">midRadius</a></b>()
  378. </div>
  379. <div class="description">Returns the mid-radius of the wedge, which is defined as half-way between the
  380. inner and outer radii.</div>
  381. </td>
  382. </tr>
  383. <tr>
  384. <td class="attributes">&lt;static&gt; &nbsp;</td>
  385. <td class="nameDescription">
  386. <div class="fixedFont">pv.Wedge.<b><a href="../symbols/pv.Wedge.html#.upright">upright</a></b>(angle)
  387. </div>
  388. <div class="description">Returns true if the specified angle is considered "upright", as in, text
  389. rendered at that angle would appear upright.</div>
  390. </td>
  391. </tr>
  392. </tbody>
  393. </table>
  394. <dl class="inheritsList">
  395. <dt>Methods borrowed from class <a href="../symbols/pv.Mark.html">pv.Mark</a>: </dt><dd><a href="../symbols/pv.Mark.html#add">add</a>, <a href="../symbols/pv.Mark.html#anchorTarget">anchorTarget</a>, <a href="../symbols/pv.Mark.html#cousin">cousin</a>, <a href="../symbols/pv.Mark.html#def">def</a>, <a href="../symbols/pv.Mark.html#event">event</a>, <a href="../symbols/pv.Mark.html#extend">extend</a>, <a href="../symbols/pv.Mark.html#first">first</a>, <a href="../symbols/pv.Mark.html#last">last</a>, <a href="../symbols/pv.Mark.html#mouse">mouse</a>, <a href="../symbols/pv.Mark.html#render">render</a>, <a href="../symbols/pv.Mark.html#sibling">sibling</a></dd>
  396. </dl>
  397. <!-- ============================== events summary ======================== -->
  398. <!-- ============================== constructor details ==================== -->
  399. <div class="details"><a name="constructor"> </a>
  400. <div class="sectionTitle">
  401. Class Detail
  402. </div>
  403. <div class="fixedFont">
  404. <b>pv.Wedge</b>()
  405. </div>
  406. <div class="description">
  407. Constructs a new wedge with default properties. Wedges are not typically
  408. constructed directly, but by adding to a panel or an existing mark via
  409. <a href="../symbols/pv.Mark.html#add">pv.Mark#add</a>.
  410. </div>
  411. </div>
  412. <!-- ============================== field details ========================== -->
  413. <div class="sectionTitle">
  414. Field Detail
  415. </div>
  416. <a name="angle"> </a>
  417. <div class="fixedFont">
  418. <span class="light">{number}</span>
  419. <b>angle</b>
  420. </div>
  421. <div class="description">
  422. The angular span of the wedge, in radians. This property is used if end angle
  423. is not specified.
  424. </div>
  425. <hr />
  426. <a name="defaults"> </a>
  427. <div class="fixedFont">
  428. <span class="light">{<a href="../symbols/pv.Wedge.html">pv.Wedge</a>}</span>
  429. <b>defaults</b>
  430. </div>
  431. <div class="description">
  432. Default properties for wedges. By default, there is no stroke and the fill
  433. style is a categorical color.
  434. </div>
  435. <hr />
  436. <a name="endAngle"> </a>
  437. <div class="fixedFont">
  438. <span class="light">{number}</span>
  439. <b>endAngle</b>
  440. </div>
  441. <div class="description">
  442. The end angle of the wedge, in radians. If not specified, the end angle is
  443. implied as the start angle plus the <a href="#angle">#angle</a>.
  444. </div>
  445. <hr />
  446. <a name="fillStyle"> </a>
  447. <div class="fixedFont">
  448. <span class="light">{string}</span>
  449. <b>fillStyle</b>
  450. </div>
  451. <div class="description">
  452. The wedge fill style; if non-null, the interior of the wedge is filled with
  453. the specified color. The default value of this property is a categorical
  454. color.
  455. </div>
  456. <dl class="detailList">
  457. <dt class="heading">See:</dt>
  458. <dd><a href="../symbols/pv.html#.color">pv.color</a></dd>
  459. </dl>
  460. <hr />
  461. <a name="innerRadius"> </a>
  462. <div class="fixedFont">
  463. <span class="light">{number}</span>
  464. <b>innerRadius</b>
  465. </div>
  466. <div class="description">
  467. The inner radius of the wedge, in pixels. The default value of this property
  468. is zero; a positive value will produce a donut slice rather than a pie slice.
  469. The inner radius can vary per-wedge.
  470. </div>
  471. <hr />
  472. <a name="lineWidth"> </a>
  473. <div class="fixedFont">
  474. <span class="light">{number}</span>
  475. <b>lineWidth</b>
  476. </div>
  477. <div class="description">
  478. The width of stroked lines, in pixels; used in conjunction with
  479. <tt>strokeStyle</tt> to stroke the wedge's border.
  480. </div>
  481. <hr />
  482. <a name="outerRadius"> </a>
  483. <div class="fixedFont">
  484. <span class="light">{number}</span>
  485. <b>outerRadius</b>
  486. </div>
  487. <div class="description">
  488. The outer radius of the wedge, in pixels. This property is required. For
  489. pies, only this radius is required; for donuts, the inner radius must be
  490. specified as well. The outer radius can vary per-wedge.
  491. </div>
  492. <hr />
  493. <a name="startAngle"> </a>
  494. <div class="fixedFont">
  495. <span class="light">{number}</span>
  496. <b>startAngle</b>
  497. </div>
  498. <div class="description">
  499. The start angle of the wedge, in radians. The start angle is measured
  500. clockwise from the 3 o'clock position. The default value of this property is
  501. the end angle of the previous instance (the Mark#sibling), or -PI / 2
  502. for the first wedge; for pie and donut charts, typically only the
  503. <a href="#angle">#angle</a> property needs to be specified.
  504. </div>
  505. <hr />
  506. <a name="strokeStyle"> </a>
  507. <div class="fixedFont">
  508. <span class="light">{string}</span>
  509. <b>strokeStyle</b>
  510. </div>
  511. <div class="description">
  512. The style of stroked lines; used in conjunction with <tt>lineWidth</tt> to
  513. stroke the wedge's border. The default value of this property is null,
  514. meaning wedges are not stroked by default.
  515. </div>
  516. <dl class="detailList">
  517. <dt class="heading">See:</dt>
  518. <dd><a href="../symbols/pv.html#.color">pv.color</a></dd>
  519. </dl>
  520. <!-- ============================== method details ========================= -->
  521. <div class="sectionTitle">
  522. Method Detail
  523. </div>
  524. <a name="anchor"> </a>
  525. <div class="fixedFont">
  526. <span class="light">{<a href="../symbols/pv.Anchor.html">pv.Anchor</a>}</span>
  527. <b>anchor</b>(name)
  528. </div>
  529. <div class="description">
  530. Constructs a new wedge anchor with default properties. Wedges support five
  531. different anchors:<ul>
  532. <li>outer
  533. <li>inner
  534. <li>center
  535. <li>start
  536. <li>end
  537. </ul>In addition to positioning properties (left, right, top bottom), the
  538. anchors support text rendering properties (text-align, text-baseline,
  539. textAngle). Text is rendered to appear inside the wedge.
  540. </div>
  541. <dl class="detailList">
  542. <dt class="heading">Parameters:</dt>
  543. <dt>
  544. <span class="light fixedFont">{string}</span> <b>name</b>
  545. </dt>
  546. <dd>the anchor name; either a string or a property function.</dd>
  547. </dl>
  548. <dl class="detailList">
  549. <dt class="heading">Returns:</dt>
  550. <dd><span class="light fixedFont">{<a href="../symbols/pv.Anchor.html">pv.Anchor</a>}</span> </dd>
  551. </dl>
  552. <hr />
  553. <a name="midAngle"> </a>
  554. <div class="fixedFont">
  555. <span class="light">{number}</span>
  556. <b>midAngle</b>()
  557. </div>
  558. <div class="description">
  559. Returns the mid-angle of the wedge, which is defined as half-way between the
  560. start and end angles.
  561. </div>
  562. <dl class="detailList">
  563. <dt class="heading">Returns:</dt>
  564. <dd><span class="light fixedFont">{number}</span> the mid-angle, in radians.</dd>
  565. </dl>
  566. <dl class="detailList">
  567. <dt class="heading">See:</dt>
  568. <dd><a href="#startAngle">#startAngle</a></dd>
  569. <dd><a href="#endAngle">#endAngle</a></dd>
  570. </dl>
  571. <hr />
  572. <a name="midRadius"> </a>
  573. <div class="fixedFont">
  574. <span class="light">{number}</span>
  575. <b>midRadius</b>()
  576. </div>
  577. <div class="description">
  578. Returns the mid-radius of the wedge, which is defined as half-way between the
  579. inner and outer radii.
  580. </div>
  581. <dl class="detailList">
  582. <dt class="heading">Returns:</dt>
  583. <dd><span class="light fixedFont">{number}</span> the mid-radius, in pixels.</dd>
  584. </dl>
  585. <dl class="detailList">
  586. <dt class="heading">See:</dt>
  587. <dd><a href="#innerRadius">#innerRadius</a></dd>
  588. <dd><a href="#outerRadius">#outerRadius</a></dd>
  589. </dl>
  590. <hr />
  591. <a name=".upright"> </a>
  592. <div class="fixedFont">&lt;static&gt;
  593. <span class="light">{boolean}</span>
  594. <span class="light">pv.Wedge.</span><b>upright</b>(angle)
  595. </div>
  596. <div class="description">
  597. Returns true if the specified angle is considered "upright", as in, text
  598. rendered at that angle would appear upright. If the angle is not upright,
  599. text is rotated 180 degrees to be upright, and the text alignment properties
  600. are correspondingly changed.
  601. </div>
  602. <dl class="detailList">
  603. <dt class="heading">Parameters:</dt>
  604. <dt>
  605. <span class="light fixedFont">{number}</span> <b>angle</b>
  606. </dt>
  607. <dd>an angle, in radius.</dd>
  608. </dl>
  609. <dl class="detailList">
  610. <dt class="heading">Returns:</dt>
  611. <dd><span class="light fixedFont">{boolean}</span> true if the specified angle is upright.</dd>
  612. </dl>
  613. <!-- ============================== event details ========================= -->
  614. <hr />
  615. </div>
  616. <!-- ============================== footer ================================= -->
  617. <div class="fineprint" style="clear:both">
  618. Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.0 on Tue Oct 06 2009 09:59:02 GMT-0700 (PDT)
  619. </div>
  620. </body>
  621. </html>