pv.Scale.ordinal.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896
  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.Scale.ordinal</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.Scale.ordinal
  210. </h1>
  211. <!-- ============================== class summary ========================== -->
  212. <p class="description">
  213. Represents an ordinal scale. <style
  214. type="text/css">sub{line-height:0}</style> An ordinal scale represents a
  215. pairwise mapping from <i>n</i> discrete values in the input domain to
  216. <i>n</i> discrete values in the output range. For example, an ordinal scale
  217. might map a domain of species ["setosa", "versicolor", "virginica"] to colors
  218. ["red", "green", "blue"]. Thus, saying
  219. <pre>.fillStyle(function(d) {
  220. switch (d.species) {
  221. case "setosa": return "red";
  222. case "versicolor": return "green";
  223. case "virginica": return "blue";
  224. }
  225. })</pre>
  226. is equivalent to
  227. <pre>.fillStyle(pv.Scale.ordinal("setosa", "versicolor", "virginica")
  228. .range("red", "green", "blue")
  229. .by(function(d) d.species))</pre>
  230. If the mapping from species to color does not need to be specified
  231. explicitly, the domain can be omitted. In this case it will be inferred
  232. lazily from the data:
  233. <pre>.fillStyle(pv.colors("red", "green", "blue")
  234. .by(function(d) d.species))</pre>
  235. When the domain is inferred, the first time the scale is invoked, the first
  236. element from the range will be returned. Subsequent calls with unique values
  237. will return subsequent elements from the range. If the inferred domain grows
  238. larger than the range, range values will be reused. However, it is strongly
  239. recommended that the domain and the range contain the same number of
  240. elements.
  241. <p>A range can be discretized from a continuous interval (e.g., for pixel
  242. positioning) by using <a href="#split">#split</a>, <a href="#splitFlush">#splitFlush</a> or
  243. <a href="#splitBanded">#splitBanded</a> after the domain has been set. For example, if
  244. <tt>states</tt> is an array of the fifty U.S. state names, the state name can
  245. be encoded in the left position:
  246. <pre>.left(pv.Scale.ordinal(states)
  247. .split(0, 640)
  248. .by(function(d) d.state))</pre>
  249. <p>N.B.: ordinal scales are not invertible (at least not yet), since the
  250. domain and range and discontinuous. A workaround is to use a linear scale.
  251. <br /><i>Defined in: </i> <a href="../symbols/src/data_OrdinalScale.js.html">OrdinalScale.js</a>.
  252. </p>
  253. <!-- ============================== constructor summary ==================== -->
  254. <table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class pv.Scale.ordinal.">
  255. <caption>Class Summary</caption>
  256. <thead>
  257. <tr>
  258. <th scope="col">Constructor Attributes</th>
  259. <th scope="col">Constructor Name and Description</th>
  260. </tr>
  261. </thead>
  262. <tbody>
  263. <tr>
  264. <td class="attributes">&nbsp;</td>
  265. <td class="nameDescription" >
  266. <div class="fixedFont">
  267. <b><a href="../symbols/pv.Scale.ordinal.html#constructor">pv.Scale.ordinal</a></b>()
  268. </div>
  269. <div class="description">Returns an ordinal scale for the specified domain.</div>
  270. </td>
  271. </tr>
  272. </tbody>
  273. </table>
  274. <!-- ============================== properties summary ===================== -->
  275. <!-- ============================== methods summary ======================== -->
  276. <table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class pv.Scale.ordinal.">
  277. <caption>Method Summary</caption>
  278. <thead>
  279. <tr>
  280. <th scope="col">Method Attributes</th>
  281. <th scope="col">Method Name and Description</th>
  282. </tr>
  283. </thead>
  284. <tbody>
  285. <tr>
  286. <td class="attributes">&nbsp;</td>
  287. <td class="nameDescription">
  288. <div class="fixedFont"><b><a href="../symbols/pv.Scale.ordinal.html#by">by</a></b>(f)
  289. </div>
  290. <div class="description">Returns a view of this scale by the specified accessor function <tt>f</tt>.</div>
  291. </td>
  292. </tr>
  293. <tr>
  294. <td class="attributes">&nbsp;</td>
  295. <td class="nameDescription">
  296. <div class="fixedFont"><b><a href="../symbols/pv.Scale.ordinal.html#domain">domain</a></b>()
  297. </div>
  298. <div class="description">Sets or gets the input domain.</div>
  299. </td>
  300. </tr>
  301. <tr>
  302. <td class="attributes">&nbsp;</td>
  303. <td class="nameDescription">
  304. <div class="fixedFont"><b><a href="../symbols/pv.Scale.ordinal.html#range">range</a></b>()
  305. </div>
  306. <div class="description">Sets or gets the output range.</div>
  307. </td>
  308. </tr>
  309. <tr>
  310. <td class="attributes">&nbsp;</td>
  311. <td class="nameDescription">
  312. <div class="fixedFont"><b><a href="../symbols/pv.Scale.ordinal.html#split">split</a></b>(min, max)
  313. </div>
  314. <div class="description">Sets the range from the given continuous interval.</div>
  315. </td>
  316. </tr>
  317. <tr>
  318. <td class="attributes">&nbsp;</td>
  319. <td class="nameDescription">
  320. <div class="fixedFont"><b><a href="../symbols/pv.Scale.ordinal.html#splitBanded">splitBanded</a></b>(min, max, band)
  321. </div>
  322. <div class="description">Sets the range from the given continuous interval.</div>
  323. </td>
  324. </tr>
  325. <tr>
  326. <td class="attributes">&nbsp;</td>
  327. <td class="nameDescription">
  328. <div class="fixedFont"><b><a href="../symbols/pv.Scale.ordinal.html#splitFlush">splitFlush</a></b>(min, max)
  329. </div>
  330. <div class="description">Sets the range from the given continuous interval.</div>
  331. </td>
  332. </tr>
  333. </tbody>
  334. </table>
  335. <!-- ============================== events summary ======================== -->
  336. <!-- ============================== constructor details ==================== -->
  337. <div class="details"><a name="constructor"> </a>
  338. <div class="sectionTitle">
  339. Class Detail
  340. </div>
  341. <div class="fixedFont">
  342. <b>pv.Scale.ordinal</b>()
  343. </div>
  344. <div class="description">
  345. Returns an ordinal scale for the specified domain. The arguments to this
  346. constructor are optional, and equivalent to calling <a href="#domain">#domain</a>.
  347. </div>
  348. <dl class="detailList">
  349. <dt class="heading">Parameters:</dt>
  350. <dt>
  351. <span class="light fixedFont">{...}</span> <b>domain...</b>
  352. </dt>
  353. <dd>domain values.</dd>
  354. </dl>
  355. <dl class="detailList">
  356. <dt class="heading">Returns:</dt>
  357. <dd><span class="light fixedFont">{<a href="../symbols/pv.Scale.ordinal.html">pv.Scale.ordinal</a>}</span> an ordinal scale.</dd>
  358. </dl>
  359. <dl class="detailList">
  360. <dt class="heading">See:</dt>
  361. <dd><a href="../symbols/pv.html#.colors">pv.colors</a></dd>
  362. </dl>
  363. </div>
  364. <!-- ============================== field details ========================== -->
  365. <!-- ============================== method details ========================= -->
  366. <div class="sectionTitle">
  367. Method Detail
  368. </div>
  369. <a name="by"> </a>
  370. <div class="fixedFont">
  371. <span class="light">{<a href="../symbols/pv.Scale.ordinal.html">pv.Scale.ordinal</a>}</span>
  372. <b>by</b>(f)
  373. </div>
  374. <div class="description">
  375. Returns a view of this scale by the specified accessor function <tt>f</tt>.
  376. Given a scale <tt>y</tt>, <tt>y.by(function(d) d.foo)</tt> is equivalent to
  377. <tt>function(d) y(d.foo)</tt>. This method should be used judiciously; it
  378. is typically more clear to invoke the scale directly, passing in the value
  379. to be scaled.
  380. </div>
  381. <dl class="detailList">
  382. <dt class="heading">Parameters:</dt>
  383. <dt>
  384. <span class="light fixedFont">{function}</span> <b>f</b>
  385. </dt>
  386. <dd>an accessor function.</dd>
  387. </dl>
  388. <dl class="detailList">
  389. <dt class="heading">Returns:</dt>
  390. <dd><span class="light fixedFont">{<a href="../symbols/pv.Scale.ordinal.html">pv.Scale.ordinal</a>}</span> a view of this scale by the specified accessor
  391. function.</dd>
  392. </dl>
  393. <hr />
  394. <a name="domain"> </a>
  395. <div class="fixedFont">
  396. <span class="light">{<a href="../symbols/pv.Scale.ordinal.html">pv.Scale.ordinal</a>}</span>
  397. <b>domain</b>()
  398. </div>
  399. <div class="description">
  400. Sets or gets the input domain. This method can be invoked several ways:
  401. <p>1. <tt>domain(values...)</tt>
  402. <p>Specifying the domain as a series of values is the most explicit and
  403. recommended approach. However, if the domain values are derived from data,
  404. you may find the second method more appropriate.
  405. <p>2. <tt>domain(array, f)</tt>
  406. <p>Rather than enumerating the domain values as explicit arguments to this
  407. method, you can specify a single argument of an array. In addition, you can
  408. specify an optional accessor function to extract the domain values from the
  409. array.
  410. <p>3. <tt>domain()</tt>
  411. <p>Invoking the <tt>domain</tt> method with no arguments returns the
  412. current domain as an array.
  413. </div>
  414. <dl class="detailList">
  415. <dt class="heading">Parameters:</dt>
  416. <dt>
  417. <span class="light fixedFont">{...}</span> <b>domain...</b>
  418. </dt>
  419. <dd>domain values.</dd>
  420. </dl>
  421. <dl class="detailList">
  422. <dt class="heading">Returns:</dt>
  423. <dd><span class="light fixedFont">{<a href="../symbols/pv.Scale.ordinal.html">pv.Scale.ordinal</a>}</span> <tt>this</tt>, or the current domain.</dd>
  424. </dl>
  425. <hr />
  426. <a name="range"> </a>
  427. <div class="fixedFont">
  428. <span class="light">{<a href="../symbols/pv.Scale.ordinal.html">pv.Scale.ordinal</a>}</span>
  429. <b>range</b>()
  430. </div>
  431. <div class="description">
  432. Sets or gets the output range. This method can be invoked several ways:
  433. <p>1. <tt>range(values...)</tt>
  434. <p>Specifying the range as a series of values is the most explicit and
  435. recommended approach. However, if the range values are derived from data,
  436. you may find the second method more appropriate.
  437. <p>2. <tt>range(array, f)</tt>
  438. <p>Rather than enumerating the range values as explicit arguments to this
  439. method, you can specify a single argument of an array. In addition, you can
  440. specify an optional accessor function to extract the range values from the
  441. array.
  442. <p>3. <tt>range()</tt>
  443. <p>Invoking the <tt>range</tt> method with no arguments returns the
  444. current range as an array.
  445. </div>
  446. <dl class="detailList">
  447. <dt class="heading">Parameters:</dt>
  448. <dt>
  449. <span class="light fixedFont">{...}</span> <b>range...</b>
  450. </dt>
  451. <dd>range values.</dd>
  452. </dl>
  453. <dl class="detailList">
  454. <dt class="heading">Returns:</dt>
  455. <dd><span class="light fixedFont">{<a href="../symbols/pv.Scale.ordinal.html">pv.Scale.ordinal</a>}</span> <tt>this</tt>, or the current range.</dd>
  456. </dl>
  457. <hr />
  458. <a name="split"> </a>
  459. <div class="fixedFont">
  460. <span class="light">{<a href="../symbols/pv.Scale.ordinal.html">pv.Scale.ordinal</a>}</span>
  461. <b>split</b>(min, max)
  462. </div>
  463. <div class="description">
  464. Sets the range from the given continuous interval. The interval
  465. [<i>min</i>, <i>max</i>] is subdivided into <i>n</i> equispaced points,
  466. where <i>n</i> is the number of (unique) values in the domain. The first
  467. and last point are offset from the edge of the range by half the distance
  468. between points.
  469. <p>This method must be called <i>after</i> the domain is set.
  470. </div>
  471. <dl class="detailList">
  472. <dt class="heading">Parameters:</dt>
  473. <dt>
  474. <span class="light fixedFont">{number}</span> <b>min</b>
  475. </dt>
  476. <dd>minimum value of the output range.</dd>
  477. <dt>
  478. <span class="light fixedFont">{number}</span> <b>max</b>
  479. </dt>
  480. <dd>maximum value of the output range.</dd>
  481. </dl>
  482. <dl class="detailList">
  483. <dt class="heading">Returns:</dt>
  484. <dd><span class="light fixedFont">{<a href="../symbols/pv.Scale.ordinal.html">pv.Scale.ordinal</a>}</span> <tt>this</tt>.</dd>
  485. </dl>
  486. <dl class="detailList">
  487. <dt class="heading">See:</dt>
  488. <dd><a href="#splitFlush">#splitFlush</a></dd>
  489. <dd><a href="#splitBanded">#splitBanded</a></dd>
  490. </dl>
  491. <hr />
  492. <a name="splitBanded"> </a>
  493. <div class="fixedFont">
  494. <span class="light">{<a href="../symbols/pv.Scale.ordinal.html">pv.Scale.ordinal</a>}</span>
  495. <b>splitBanded</b>(min, max, band)
  496. </div>
  497. <div class="description">
  498. Sets the range from the given continuous interval. The interval
  499. [<i>min</i>, <i>max</i>] is subdivided into <i>n</i> equispaced bands,
  500. where <i>n</i> is the number of (unique) values in the domain. The first
  501. and last band are offset from the edge of the range by the distance between
  502. bands.
  503. <p>The band width argument, <tt>band</tt>, is typically in the range [0, 1]
  504. and defaults to 1. This fraction corresponds to the amount of space in the
  505. range to allocate to the bands, as opposed to padding. A value of 0.5 means
  506. that the band width will be equal to the padding width. The computed
  507. absolute band width can be retrieved from the range as
  508. <tt>scale.range().band</tt>.
  509. <p>If the band width argument is negative, this method will allocate bands
  510. of a <i>fixed</i> width <tt>-band</tt>, rather than a relative fraction of
  511. the available space.
  512. <p>Tip: to inset the bands by a fixed amount <tt>p</tt>, specify a minimum
  513. value of <tt>min + p</tt> (or simply <tt>p</tt>, if <tt>min</tt> is
  514. 0). Then set the mark width to <tt>scale.range().band - p</tt>.
  515. <p>This method must be called <i>after</i> the domain is set.
  516. </div>
  517. <dl class="detailList">
  518. <dt class="heading">Parameters:</dt>
  519. <dt>
  520. <span class="light fixedFont">{number}</span> <b>min</b>
  521. </dt>
  522. <dd>minimum value of the output range.</dd>
  523. <dt>
  524. <span class="light fixedFont">{number}</span> <b>max</b>
  525. </dt>
  526. <dd>maximum value of the output range.</dd>
  527. <dt>
  528. <span class="light fixedFont">{number}</span> <b>band</b>
  529. <i>Optional</i>
  530. </dt>
  531. <dd>the fractional band width in [0, 1]; defaults to 1.</dd>
  532. </dl>
  533. <dl class="detailList">
  534. <dt class="heading">Returns:</dt>
  535. <dd><span class="light fixedFont">{<a href="../symbols/pv.Scale.ordinal.html">pv.Scale.ordinal</a>}</span> <tt>this</tt>.</dd>
  536. </dl>
  537. <dl class="detailList">
  538. <dt class="heading">See:</dt>
  539. <dd><a href="#split">#split</a></dd>
  540. </dl>
  541. <hr />
  542. <a name="splitFlush"> </a>
  543. <div class="fixedFont">
  544. <span class="light">{<a href="../symbols/pv.Scale.ordinal.html">pv.Scale.ordinal</a>}</span>
  545. <b>splitFlush</b>(min, max)
  546. </div>
  547. <div class="description">
  548. Sets the range from the given continuous interval. The interval
  549. [<i>min</i>, <i>max</i>] is subdivided into <i>n</i> equispaced points,
  550. where <i>n</i> is the number of (unique) values in the domain. The first
  551. and last point are exactly on the edge of the range.
  552. <p>This method must be called <i>after</i> the domain is set.
  553. </div>
  554. <dl class="detailList">
  555. <dt class="heading">Parameters:</dt>
  556. <dt>
  557. <span class="light fixedFont">{number}</span> <b>min</b>
  558. </dt>
  559. <dd>minimum value of the output range.</dd>
  560. <dt>
  561. <span class="light fixedFont">{number}</span> <b>max</b>
  562. </dt>
  563. <dd>maximum value of the output range.</dd>
  564. </dl>
  565. <dl class="detailList">
  566. <dt class="heading">Returns:</dt>
  567. <dd><span class="light fixedFont">{<a href="../symbols/pv.Scale.ordinal.html">pv.Scale.ordinal</a>}</span> <tt>this</tt>.</dd>
  568. </dl>
  569. <dl class="detailList">
  570. <dt class="heading">See:</dt>
  571. <dd><a href="#split">#split</a></dd>
  572. </dl>
  573. <!-- ============================== event details ========================= -->
  574. <hr />
  575. </div>
  576. <!-- ============================== footer ================================= -->
  577. <div class="fineprint" style="clear:both">
  578. 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)
  579. </div>
  580. </body>
  581. </html>