| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <meta name="generator" content="JsDoc Toolkit" />
-
- <title>JsDoc Reference - pv</title>
- <style type="text/css">
- /* default.css */
- body
- {
- font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
- width: 800px;
- }
- .header
- {
- clear: both;
- background-color: #ccc;
- padding: 8px;
- }
- h1
- {
- font-size: 150%;
- font-weight: bold;
- padding: 0;
- margin: 1em 0 0 .3em;
- }
- hr
- {
- border: none 0;
- border-top: 1px solid #7F8FB1;
- height: 1px;
- }
- pre.code
- {
- display: block;
- padding: 8px;
- border: 1px dashed #ccc;
- }
- #index
- {
- margin-top: 24px;
- float: left;
- width: 160px;
- position: absolute;
- left: 8px;
- background-color: #F3F3F3;
- padding: 8px;
- }
- #content
- {
- margin-left: 190px;
- width: 600px;
- }
- .classList
- {
- list-style-type: none;
- padding: 0;
- margin: 0 0 0 8px;
- font-family: arial, sans-serif;
- font-size: 1em;
- overflow: auto;
- }
- .classList li
- {
- padding: 0;
- margin: 0 0 8px 0;
- }
- .summaryTable { width: 100%; }
- h1.classTitle
- {
- font-size:170%;
- line-height:130%;
- }
- h2 { font-size: 110%; }
- caption, div.sectionTitle
- {
- background-color: #7F8FB1;
- color: #fff;
- font-size:130%;
- text-align: left;
- padding: 2px 6px 2px 6px;
- border: 1px #7F8FB1 solid;
- }
- div.sectionTitle { margin-bottom: 8px; }
- .summaryTable thead { display: none; }
- .summaryTable td
- {
- vertical-align: top;
- padding: 4px;
- border-bottom: 1px #7F8FB1 solid;
- border-right: 1px #7F8FB1 solid;
- }
- /*col#summaryAttributes {}*/
- .summaryTable td.attributes
- {
- border-left: 1px #7F8FB1 solid;
- width: 140px;
- text-align: right;
- }
- td.attributes, .fixedFont
- {
- line-height: 15px;
- color: #002EBE;
- font-family: "Courier New",Courier,monospace;
- font-size: 13px;
- }
- .summaryTable td.nameDescription
- {
- text-align: left;
- font-size: 13px;
- line-height: 15px;
- }
- .summaryTable td.nameDescription, .description
- {
- line-height: 15px;
- padding: 4px;
- padding-left: 4px;
- }
- pre
- {
- border-left: solid 10px #ddd;
- padding-left: 1.5em;
- }
- .summaryTable { margin-bottom: 8px; }
- ul.inheritsList
- {
- list-style: square;
- margin-left: 20px;
- padding-left: 0;
- }
- .detailList {
- margin-left: 20px;
- line-height: 15px;
- }
- .detailList dt { margin-left: 20px; }
- .detailList .heading
- {
- font-weight: bold;
- padding-bottom: 6px;
- margin-left: 0;
- }
- .light, td.attributes, .light a:link, .light a:visited
- {
- color: #777;
- font-style: italic;
- }
- .fineprint
- {
- text-align: right;
- font-size: 10px;
- }
- </style>
- </head>
- <body>
- <!-- ============================== header ================================= -->
- <!-- begin static/header.html -->
- <div id="header">
- </div>
- <!-- end static/header.html -->
- <!-- ============================== classes index ============================ -->
- <div id="index">
- <!-- begin publish.classesIndex -->
- <div align="center"><a href="../index.html">Class Index</a>
- | <a href="../files.html">File Index</a></div>
- <hr />
- <h2>Classes</h2>
- <ul class="classList">
-
- <li><i><a href="../symbols/_global_.html">_global_</a></i></li>
-
- <li><a href="../symbols/Array.html">Array</a></li>
-
- <li><a href="../symbols/Date.html">Date</a></li>
-
- <li><a href="../symbols/pv.html">pv</a></li>
-
- <li><a href="../symbols/pv.Anchor.html">pv.Anchor</a></li>
-
- <li><a href="../symbols/pv.Area.html">pv.Area</a></li>
-
- <li><a href="../symbols/pv.Bar.html">pv.Bar</a></li>
-
- <li><a href="../symbols/pv.Color.html">pv.Color</a></li>
-
- <li><a href="../symbols/pv.Color.Hsl.html">pv.Color.Hsl</a></li>
-
- <li><a href="../symbols/pv.Color.Rgb.html">pv.Color.Rgb</a></li>
-
- <li><a href="../symbols/pv.Colors.html">pv.Colors</a></li>
-
- <li><a href="../symbols/pv.Dot.html">pv.Dot</a></li>
-
- <li><a href="../symbols/pv.Flatten.html">pv.Flatten</a></li>
-
- <li><a href="../symbols/pv.Image.html">pv.Image</a></li>
-
- <li><a href="../symbols/pv.Label.html">pv.Label</a></li>
-
- <li><a href="../symbols/pv.Layout.grid.html">pv.Layout.grid</a></li>
-
- <li><a href="../symbols/pv.Layout.icicle.html">pv.Layout.icicle</a></li>
-
- <li><a href="../symbols/pv.Layout.stack.html">pv.Layout.stack</a></li>
-
- <li><a href="../symbols/pv.Layout.sunburst.html">pv.Layout.sunburst</a></li>
-
- <li><a href="../symbols/pv.Layout.treemap.html">pv.Layout.treemap</a></li>
-
- <li><a href="../symbols/pv.Line.html">pv.Line</a></li>
-
- <li><a href="../symbols/pv.Mark.html">pv.Mark</a></li>
-
- <li><a href="../symbols/pv.Nest.html">pv.Nest</a></li>
-
- <li><a href="../symbols/pv.ns.html">pv.ns</a></li>
-
- <li><a href="../symbols/pv.Panel.html">pv.Panel</a></li>
-
- <li><a href="../symbols/pv.Rule.html">pv.Rule</a></li>
-
- <li><a href="../symbols/pv.Scale.linear.html">pv.Scale.linear</a></li>
-
- <li><a href="../symbols/pv.Scale.log.html">pv.Scale.log</a></li>
-
- <li><a href="../symbols/pv.Scale.ordinal.html">pv.Scale.ordinal</a></li>
-
- <li><a href="../symbols/pv.Tree.html">pv.Tree</a></li>
-
- <li><a href="../symbols/pv.Vector.html">pv.Vector</a></li>
-
- <li><a href="../symbols/pv.version.html">pv.version</a></li>
-
- <li><a href="../symbols/pv.Wedge.html">pv.Wedge</a></li>
-
- </ul>
- <hr />
- <!-- end publish.classesIndex -->
- </div>
-
- <div id="content">
- <!-- ============================== class title ============================ -->
- <h1 class="classTitle">
-
- Namespace pv
- </h1>
- <!-- ============================== class summary ========================== -->
- <p class="description">
-
-
- The top-level Protovis namespace, <tt>pv</tt>.
-
-
- <br /><i>Defined in: </i> <a href="../symbols/src/pv.js.html">pv.js</a>.
-
- </p>
- <!-- ============================== constructor summary ==================== -->
-
- <table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class pv.">
- <caption>Namespace Summary</caption>
- <thead>
- <tr>
- <th scope="col">Constructor Attributes</th>
- <th scope="col">Constructor Name and Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription" >
- <div class="fixedFont">
- <b><a href="../symbols/pv.html#constructor">pv</a></b>
- </div>
- <div class="description">The top-level Protovis namespace.</div>
- </td>
- </tr>
- </tbody>
- </table>
-
- <!-- ============================== properties summary ===================== -->
-
-
-
-
-
-
- <!-- ============================== methods summary ======================== -->
-
-
-
- <table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class pv.">
- <caption>Method Summary</caption>
- <thead>
- <tr>
- <th scope="col">Method Attributes</th>
- <th scope="col">Method Name and Description</th>
- </tr>
- </thead>
- <tbody>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.blend">blend</a></b>(arrays)
- </div>
- <div class="description">Given the specified array of arrays, concatenates the arrays into a single
- array.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.child">child</a></b>()
- </div>
- <div class="description">Returns <tt>this.childIndex</tt>.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.color">color</a></b>(format)
- </div>
- <div class="description">Returns the <a href="../symbols/pv.Color.html">pv.Color</a> for the specified color format string.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.colors">colors</a></b>()
- </div>
- <div class="description">Returns a new categorical color encoding using the specified colors.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.cross">cross</a></b>(a, b)
- </div>
- <div class="description">Given two arrays <tt>a</tt> and <tt>b</tt>, <style
- type="text/css">sub{line-height:0}</style> returns an array of all possible
- pairs of elements [a<sub>i</sub>, b<sub>j</sub>].</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.dict">dict</a></b>(keys, f)
- </div>
- <div class="description">Returns a map constructed from the specified <tt>keys</tt>, using the
- function <tt>f</tt> to compute the value for each key.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.entries">entries</a></b>(map)
- </div>
- <div class="description">Returns all of the entries (key-value pairs) of the specified object (a
- map).</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.flatten">flatten</a></b>(map)
- </div>
- <div class="description">Returns a <a href="../symbols/pv.Flatten.html">pv.Flatten</a> operator for the specified map.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.hsl">hsl</a></b>(h, s, l, a)
- </div>
- <div class="description">Constructs a new HSL color with the specified values.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.identity">identity</a></b>(x)
- </div>
- <div class="description">Returns the passed-in argument, <tt>x</tt>; the identity function.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.index">index</a></b>()
- </div>
- <div class="description">Returns <tt>this.index</tt>.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.keys">keys</a></b>(map)
- </div>
- <div class="description">Returns all of the property names (keys) of the specified object (a map).</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.log">log</a></b>(x, b)
- </div>
- <div class="description">Returns the logarithm with a given base value.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.logAdjusted">logAdjusted</a></b>(x, b)
- </div>
- <div class="description">Computes a zero-symmetric logarithm, with adjustment to values between zero
- and the logarithm base.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.logCeil">logCeil</a></b>(x, b)
- </div>
- <div class="description">Rounds an input value up according to its logarithm.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.logFloor">logFloor</a></b>(x, b)
- </div>
- <div class="description">Rounds an input value down according to its logarithm.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.logSymmetric">logSymmetric</a></b>(x, b)
- </div>
- <div class="description">Computes a zero-symmetric logarithm.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.max">max</a></b>(array, f)
- </div>
- <div class="description">Returns the maximum value of the specified array.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.mean">mean</a></b>(array, f)
- </div>
- <div class="description">Returns the arithmetic mean, or average, of the specified array.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.median">median</a></b>(array, f)
- </div>
- <div class="description">Returns the median of the specified array.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.min">min</a></b>(array, f)
- </div>
- <div class="description">Returns the minimum value of the specified array of numbers.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.naturalOrder">naturalOrder</a></b>(a, b)
- </div>
- <div class="description">The comparator function for natural order.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.nest">nest</a></b>(array)
- </div>
- <div class="description">Returns a <a href="../symbols/pv.Nest.html">pv.Nest</a> operator for the specified array.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.normalize">normalize</a></b>(array, f)
- </div>
- <div class="description">Returns a normalized copy of the specified array, such that the sum of the
- returned elements sum to one.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.numerate">numerate</a></b>(keys, f)
- </div>
- <div class="description">Returns a map from key to index for the specified <tt>keys</tt> array.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.parent">parent</a></b>()
- </div>
- <div class="description">Returns <tt>this.parent.index</tt>.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.permute">permute</a></b>(array, indexes, f)
- </div>
- <div class="description">Returns a permutation of the specified array, using the specified array of
- indexes.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.ramp">ramp</a></b>(start, end)
- </div>
- <div class="description">Returns a linear color ramp from the specified <tt>start</tt> color to the
- specified <tt>end</tt> color.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.random">random</a></b>(min, max, step)
- </div>
- <div class="description">Returns a random number in the range [<tt>min</tt>, <tt>max</tt>) that is a
- multiple of <tt>step</tt>.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.range">range</a></b>(start, stop, step)
- </div>
- <div class="description">Returns an array of numbers, starting at <tt>start</tt>, incrementing by
- <tt>step</tt>, until <tt>stop</tt> is reached.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.repeat">repeat</a></b>(a, n)
- </div>
- <div class="description">Concatenates the specified array with itself <i>n</i> times.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.reverseOrder">reverseOrder</a></b>(a, b)
- </div>
- <div class="description">The comparator function for reverse natural order.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.rgb">rgb</a></b>(r, g, b, a)
- </div>
- <div class="description">Constructs a new RGB color with the specified channel values.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.search">search</a></b>(array, value, f)
- </div>
- <div class="description">Searches the specified array of numbers for the specified value using the
- binary search algorithm.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.sum">sum</a></b>(array, f)
- </div>
- <div class="description">Returns the sum of the specified array.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.transpose">transpose</a></b>(arrays)
- </div>
- <div class="description">Given the specified array of arrays, <style
- type="text/css">sub{line-height:0}</style> transposes each element
- array<sub>ij</sub> with array<sub>ji</sub>.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.tree">tree</a></b>(array)
- </div>
- <div class="description">Returns a <a href="../symbols/pv.Tree.html">pv.Tree</a> operator for the specified array.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.values">values</a></b>(map)
- </div>
- <div class="description">Returns all of the values (attribute values) of the specified object (a
- map).</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"><static> </td>
- <td class="nameDescription">
- <div class="fixedFont">pv.<b><a href="../symbols/pv.html#.vector">vector</a></b>(x, y)
- </div>
- <div class="description">Returns a <a href="../symbols/pv.Vector.html">pv.Vector</a> for the specified <i>x</i> and <i>y</i>
- coordinate.</div>
- </td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
- <!-- ============================== events summary ======================== -->
-
- <!-- ============================== constructor details ==================== -->
-
- <div class="details"><a name="constructor"> </a>
- <div class="sectionTitle">
- Namespace Detail
- </div>
-
- <div class="fixedFont">
- <b>pv</b>
- </div>
-
- <div class="description">
- The top-level Protovis namespace. All public methods and fields should be
- registered on this object. Note that core Protovis source is surrounded by an
- anonymous function, so any other declared globals will not be visible outside
- of core methods. This also allows multiple versions of Protovis to coexist,
- since each version will see their own <tt>pv</tt> namespace.
-
- </div>
-
-
-
-
-
-
-
-
-
-
-
- </div>
-
- <!-- ============================== field details ========================== -->
-
- <!-- ============================== method details ========================= -->
-
- <div class="sectionTitle">
- Method Detail
- </div>
-
- <a name=".blend"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{array}</span>
- <span class="light">pv.</span><b>blend</b>(arrays)
-
- </div>
- <div class="description">
- Given the specified array of arrays, concatenates the arrays into a single
- array. If the individual arrays are explicitly known, an alternative to blend
- is to use JavaScript's <tt>concat</tt> method directly. These two equivalent
- expressions:<ul>
- <li><tt>pv.blend([[1, 2, 3], ["a", "b", "c"]])</tt>
- <li><tt>[1, 2, 3].concat(["a", "b", "c"])</tt>
- </ul>return [1, 2, 3, "a", "b", "c"].
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{array[]}</span> <b>arrays</b>
-
- </dt>
- <dd>an array of arrays.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{array}</span> an array containing all the elements of each array in
- <tt>arrays</tt>.</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".child"> </a>
- <div class="fixedFont"><static>
-
-
- <span class="light">pv.</span><b>child</b>()
-
- </div>
- <div class="description">
- Returns <tt>this.childIndex</tt>. This method is provided for convenience for
- use with scales. For example, to color bars by their child index, say:
- <pre>.fillStyle(pv.Colors.category10().by(pv.child))</pre>
- This method is equivalent to <tt>function() this.childIndex</tt>, but more
- succinct.
-
-
- </div>
-
-
-
-
-
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">See:</dt>
-
- <dd>pv.Scale</dd>
-
- <dd><a href="../symbols/pv.Mark.html#childIndex">pv.Mark#childIndex</a></dd>
-
- </dl>
-
- <hr />
-
- <a name=".color"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{<a href="../symbols/pv.Color.html">pv.Color</a>}</span>
- <span class="light">pv.</span><b>color</b>(format)
-
- </div>
- <div class="description">
- Returns the <a href="../symbols/pv.Color.html">pv.Color</a> for the specified color format string. Colors
- may have an associated opacity, or alpha channel. Color formats are specified
- by CSS Color Modular Level 3, using either in RGB or HSL color space. For
- example:<ul>
- <li>#f00 // #rgb
- <li>#ff0000 // #rrggbb
- <li>rgb(255, 0, 0)
- <li>rgb(100%, 0%, 0%)
- <li>hsl(0, 100%, 50%)
- <li>rgba(0, 0, 255, 0.5)
- <li>hsla(120, 100%, 50%, 1)
- </ul>The SVG 1.0 color keywords names are also supported, such as "aliceblue"
- and "yellowgreen". The "transparent" keyword is supported for a
- fully-transparent color.
- <p>If the <tt>format</tt> argument is already an instance of <tt>Color</tt>,
- the argument is returned with no further processing.
-
- <br />
- <i>Defined in: </i> <a href="../symbols/src/color_Color.js.html">Color.js</a>.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{string}</span> <b>format</b>
-
- </dt>
- <dd>the color specification string, such as "#f00".</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/pv.Color.html">pv.Color</a>}</span> the corresponding <tt>Color</tt>.</dd>
-
- </dl>
-
-
-
- <dl class="detailList">
- <dt class="heading">See:</dt>
-
- <dd><a href="http://www.w3.org/TR/SVG/types.html#ColorKeywords">SVG color
- keywords</a></dd>
-
- <dd><a href="http://www.w3.org/TR/css3-color/">CSS3 color module</a></dd>
-
- </dl>
-
- <hr />
-
- <a name=".colors"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{<a href="../symbols/pv.Scale.ordinal.html">pv.Scale.ordinal</a>}</span>
- <span class="light">pv.</span><b>colors</b>()
-
- </div>
- <div class="description">
- Returns a new categorical color encoding using the specified colors. The
- arguments to this method are an array of colors; see <a href="../symbols/pv.html#.color">pv.color</a>. For
- example, to create a categorical color encoding using the <tt>species</tt>
- attribute:
- <pre>pv.colors("red", "green", "blue").by(function(d) d.species)</pre>
- The result of this expression can be used as a fill- or stroke-style
- property. This assumes that the data's <tt>species</tt> attribute is a
- string.
-
- <br />
- <i>Defined in: </i> <a href="../symbols/src/color_Colors.js.html">Colors.js</a>.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{string}</span> <b>colors...</b>
-
- </dt>
- <dd>categorical colors.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/pv.Scale.ordinal.html">pv.Scale.ordinal</a>}</span> an ordinal color scale.</dd>
-
- </dl>
-
-
-
- <dl class="detailList">
- <dt class="heading">See:</dt>
-
- <dd><a href="../symbols/pv.Scale.ordinal.html">pv.Scale.ordinal</a></dd>
-
- </dl>
-
- <hr />
-
- <a name=".cross"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{array}</span>
- <span class="light">pv.</span><b>cross</b>(a, b)
-
- </div>
- <div class="description">
- Given two arrays <tt>a</tt> and <tt>b</tt>, <style
- type="text/css">sub{line-height:0}</style> returns an array of all possible
- pairs of elements [a<sub>i</sub>, b<sub>j</sub>]. The outer loop is on array
- <i>a</i>, while the inner loop is on <i>b</i>, such that the order of
- returned elements is [a<sub>0</sub>, b<sub>0</sub>], [a<sub>0</sub>,
- b<sub>1</sub>], ... [a<sub>0</sub>, b<sub>m</sub>], [a<sub>1</sub>,
- b<sub>0</sub>], [a<sub>1</sub>, b<sub>1</sub>], ... [a<sub>1</sub>,
- b<sub>m</sub>], ... [a<sub>n</sub>, b<sub>m</sub>]. If either array is empty,
- an empty array is returned.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{array}</span> <b>a</b>
-
- </dt>
- <dd>an array.</dd>
-
- <dt>
- <span class="light fixedFont">{array}</span> <b>b</b>
-
- </dt>
- <dd>an array.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{array}</span> an array of pairs of elements in <tt>a</tt> and <tt>b</tt>.</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".dict"> </a>
- <div class="fixedFont"><static>
-
-
- <span class="light">pv.</span><b>dict</b>(keys, f)
-
- </div>
- <div class="description">
- Returns a map constructed from the specified <tt>keys</tt>, using the
- function <tt>f</tt> to compute the value for each key. The single argument to
- the value function is the key. The callback is invoked only for indexes of
- the array which have assigned values; it is not invoked for indexes which
- have been deleted or which have never been assigned values.
- <p>For example, this expression creates a map from strings to string length:
- <pre>pv.dict(["one", "three", "seventeen"], function(s) s.length)</pre>
- The returned value is <tt>{one: 3, three: 5, seventeen: 9}</tt>. Accessor
- functions can refer to <tt>this.index</tt>.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{array}</span> <b>keys</b>
-
- </dt>
- <dd>an array.</dd>
-
- <dt>
- <span class="light fixedFont">{function}</span> <b>f</b>
-
- </dt>
- <dd>a value function.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd>a map from keys to values.</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".entries"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{array}</span>
- <span class="light">pv.</span><b>entries</b>(map)
-
- </div>
- <div class="description">
- Returns all of the entries (key-value pairs) of the specified object (a
- map). The order of the returned array is not defined. Each key-value pair is
- represented as an object with <tt>key</tt> and <tt>value</tt> attributes,
- e.g., <tt>{key: "foo", value: 42}</tt>.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <b>map</b>
-
- </dt>
- <dd>an object.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{array}</span> an array of key-value pairs corresponding to the keys.</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".flatten"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{<a href="../symbols/pv.Flatten.html">pv.Flatten</a>}</span>
- <span class="light">pv.</span><b>flatten</b>(map)
-
- </div>
- <div class="description">
- Returns a <a href="../symbols/pv.Flatten.html">pv.Flatten</a> operator for the specified map. This is a
- convenience factory method, equivalent to <tt>new pv.Flatten(map)</tt>.
-
- <br />
- <i>Defined in: </i> <a href="../symbols/src/data_Flatten.js.html">Flatten.js</a>.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <b>map</b>
-
- </dt>
- <dd>a map to flatten.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/pv.Flatten.html">pv.Flatten</a>}</span> a flatten operator for the specified map.</dd>
-
- </dl>
-
-
-
- <dl class="detailList">
- <dt class="heading">See:</dt>
-
- <dd><a href="../symbols/pv.Flatten.html">pv.Flatten</a></dd>
-
- </dl>
-
- <hr />
-
- <a name=".hsl"> </a>
- <div class="fixedFont"><static>
-
-
- <span class="light">pv.</span><b>hsl</b>(h, s, l, a)
-
- </div>
- <div class="description">
- Constructs a new HSL color with the specified values.
-
- <br />
- <i>Defined in: </i> <a href="../symbols/src/color_Color.js.html">Color.js</a>.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>h</b>
-
- </dt>
- <dd>the hue, an integer in [0, 360].</dd>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>s</b>
-
- </dt>
- <dd>the saturation, a float in [0, 1].</dd>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>l</b>
-
- </dt>
- <dd>the lightness, a float in [0, 1].</dd>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>a</b>
- <i>Optional</i>
- </dt>
- <dd>the opacity, a float in [0, 1].</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd>pv.Color.Hsl</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".identity"> </a>
- <div class="fixedFont"><static>
-
-
- <span class="light">pv.</span><b>identity</b>(x)
-
- </div>
- <div class="description">
- Returns the passed-in argument, <tt>x</tt>; the identity function. This method
- is provided for convenience since it is used as the default behavior for a
- number of property functions.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <b>x</b>
-
- </dt>
- <dd>a value.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd>the value <tt>x</tt>.</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".index"> </a>
- <div class="fixedFont"><static>
-
-
- <span class="light">pv.</span><b>index</b>()
-
- </div>
- <div class="description">
- Returns <tt>this.index</tt>. This method is provided for convenience for use
- with scales. For example, to color bars by their index, say:
- <pre>.fillStyle(pv.Colors.category10().by(pv.index))</pre>
- This method is equivalent to <tt>function() this.index</tt>, but more
- succinct. Note that the <tt>index</tt> property is also supported for
- accessor functions with <a href="../symbols/pv.html#.max">pv.max</a>, <a href="../symbols/pv.html#.min">pv.min</a> and other array
- utility methods.
-
-
- </div>
-
-
-
-
-
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">See:</dt>
-
- <dd>pv.Scale</dd>
-
- <dd><a href="../symbols/pv.Mark.html#index">pv.Mark#index</a></dd>
-
- </dl>
-
- <hr />
-
- <a name=".keys"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{string[]}</span>
- <span class="light">pv.</span><b>keys</b>(map)
-
- </div>
- <div class="description">
- Returns all of the property names (keys) of the specified object (a map). The
- order of the returned array is not defined.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <b>map</b>
-
- </dt>
- <dd>an object.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{string[]}</span> an array of strings corresponding to the keys.</dd>
-
- </dl>
-
-
-
- <dl class="detailList">
- <dt class="heading">See:</dt>
-
- <dd><a href="#entries">#entries</a></dd>
-
- </dl>
-
- <hr />
-
- <a name=".log"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{number}</span>
- <span class="light">pv.</span><b>log</b>(x, b)
-
- </div>
- <div class="description">
- Returns the logarithm with a given base value.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>x</b>
-
- </dt>
- <dd>the number for which to compute the logarithm.</dd>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>b</b>
-
- </dt>
- <dd>the base of the logarithm.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{number}</span> the logarithm value.</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".logAdjusted"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{number}</span>
- <span class="light">pv.</span><b>logAdjusted</b>(x, b)
-
- </div>
- <div class="description">
- Computes a zero-symmetric logarithm, with adjustment to values between zero
- and the logarithm base. This adjustment introduces distortion for values less
- than the base number, but enables simultaneous plotting of log-transformed
- data involving both positive and negative numbers.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>x</b>
-
- </dt>
- <dd>the number for which to compute the logarithm.</dd>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>b</b>
-
- </dt>
- <dd>the base of the logarithm.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{number}</span> the adjusted, symmetric log value.</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".logCeil"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{number}</span>
- <span class="light">pv.</span><b>logCeil</b>(x, b)
-
- </div>
- <div class="description">
- Rounds an input value up according to its logarithm. The method takes the
- ceiling of the logarithm of the value and then uses the resulting value as an
- exponent for the base value.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>x</b>
-
- </dt>
- <dd>the number for which to compute the logarithm ceiling.</dd>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>b</b>
-
- </dt>
- <dd>the base of the logarithm.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{number}</span> the rounded-by-logarithm value.</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".logFloor"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{number}</span>
- <span class="light">pv.</span><b>logFloor</b>(x, b)
-
- </div>
- <div class="description">
- Rounds an input value down according to its logarithm. The method takes the
- floor of the logarithm of the value and then uses the resulting value as an
- exponent for the base value.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>x</b>
-
- </dt>
- <dd>the number for which to compute the logarithm floor.</dd>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>b</b>
-
- </dt>
- <dd>the base of the logarithm.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{number}</span> the rounded-by-logarithm value.</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".logSymmetric"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{number}</span>
- <span class="light">pv.</span><b>logSymmetric</b>(x, b)
-
- </div>
- <div class="description">
- Computes a zero-symmetric logarithm. Computes the logarithm of the absolute
- value of the input, and determines the sign of the output according to the
- sign of the input value.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>x</b>
-
- </dt>
- <dd>the number for which to compute the logarithm.</dd>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>b</b>
-
- </dt>
- <dd>the base of the logarithm.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{number}</span> the symmetric log value.</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".max"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{number}</span>
- <span class="light">pv.</span><b>max</b>(array, f)
-
- </div>
- <div class="description">
- Returns the maximum value of the specified array. If the specified array is
- not an array of numbers, an optional accessor function <tt>f</tt> can be
- specified to map the elements to numbers. See <a href="#normalize">#normalize</a> for an
- example. Accessor functions can refer to <tt>this.index</tt>.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{array}</span> <b>array</b>
-
- </dt>
- <dd>an array of objects, or numbers.</dd>
-
- <dt>
- <span class="light fixedFont">{function}</span> <b>f</b>
- <i>Optional</i>
- </dt>
- <dd>an optional accessor function.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{number}</span> the maximum value of the specified array.</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".mean"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{number}</span>
- <span class="light">pv.</span><b>mean</b>(array, f)
-
- </div>
- <div class="description">
- Returns the arithmetic mean, or average, of the specified array. If the
- specified array is not an array of numbers, an optional accessor function
- <tt>f</tt> can be specified to map the elements to numbers. See
- <a href="#normalize">#normalize</a> for an example. Accessor functions can refer to
- <tt>this.index</tt>.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{array}</span> <b>array</b>
-
- </dt>
- <dd>an array of objects, or numbers.</dd>
-
- <dt>
- <span class="light fixedFont">{function}</span> <b>f</b>
- <i>Optional</i>
- </dt>
- <dd>an optional accessor function.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{number}</span> the mean of the specified array.</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".median"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{number}</span>
- <span class="light">pv.</span><b>median</b>(array, f)
-
- </div>
- <div class="description">
- Returns the median of the specified array. If the specified array is not an
- array of numbers, an optional accessor function <tt>f</tt> can be specified
- to map the elements to numbers. See <a href="#normalize">#normalize</a> for an example.
- Accessor functions can refer to <tt>this.index</tt>.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{array}</span> <b>array</b>
-
- </dt>
- <dd>an array of objects, or numbers.</dd>
-
- <dt>
- <span class="light fixedFont">{function}</span> <b>f</b>
- <i>Optional</i>
- </dt>
- <dd>an optional accessor function.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{number}</span> the median of the specified array.</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".min"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{number}</span>
- <span class="light">pv.</span><b>min</b>(array, f)
-
- </div>
- <div class="description">
- Returns the minimum value of the specified array of numbers. If the specified
- array is not an array of numbers, an optional accessor function <tt>f</tt>
- can be specified to map the elements to numbers. See <a href="#normalize">#normalize</a> for
- an example. Accessor functions can refer to <tt>this.index</tt>.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{array}</span> <b>array</b>
-
- </dt>
- <dd>an array of objects, or numbers.</dd>
-
- <dt>
- <span class="light fixedFont">{function}</span> <b>f</b>
- <i>Optional</i>
- </dt>
- <dd>an optional accessor function.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{number}</span> the minimum value of the specified array.</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".naturalOrder"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{number}</span>
- <span class="light">pv.</span><b>naturalOrder</b>(a, b)
-
- </div>
- <div class="description">
- The comparator function for natural order. This can be used in conjunction with
- the built-in array <tt>sort</tt> method to sort elements by their natural
- order, ascending. Note that if no comparator function is specified to the
- built-in <tt>sort</tt> method, the default order is lexicographic, <i>not</i>
- natural!
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <b>a</b>
-
- </dt>
- <dd>an element to compare.</dd>
-
- <dt>
- <b>b</b>
-
- </dt>
- <dd>an element to compare.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{number}</span> negative if a < b; positive if a > b; otherwise 0.</dd>
-
- </dl>
-
-
-
- <dl class="detailList">
- <dt class="heading">See:</dt>
-
- <dd><a
- href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/sort">Array.sort</a>.</dd>
-
- </dl>
-
- <hr />
-
- <a name=".nest"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{<a href="../symbols/pv.Nest.html">pv.Nest</a>}</span>
- <span class="light">pv.</span><b>nest</b>(array)
-
- </div>
- <div class="description">
- Returns a <a href="../symbols/pv.Nest.html">pv.Nest</a> operator for the specified array. This is a
- convenience factory method, equivalent to <tt>new pv.Nest(array)</tt>.
-
- <br />
- <i>Defined in: </i> <a href="../symbols/src/data_Nest.js.html">Nest.js</a>.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{array}</span> <b>array</b>
-
- </dt>
- <dd>an array of elements to nest.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/pv.Nest.html">pv.Nest</a>}</span> a nest operator for the specified array.</dd>
-
- </dl>
-
-
-
- <dl class="detailList">
- <dt class="heading">See:</dt>
-
- <dd><a href="../symbols/pv.Nest.html">pv.Nest</a></dd>
-
- </dl>
-
- <hr />
-
- <a name=".normalize"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{number[]}</span>
- <span class="light">pv.</span><b>normalize</b>(array, f)
-
- </div>
- <div class="description">
- Returns a normalized copy of the specified array, such that the sum of the
- returned elements sum to one. If the specified array is not an array of
- numbers, an optional accessor function <tt>f</tt> can be specified to map the
- elements to numbers. For example, if <tt>array</tt> is an array of objects,
- and each object has a numeric property "foo", the expression
- <pre>pv.normalize(array, function(d) d.foo)</pre>
- returns a normalized array on the "foo" property. If an accessor function is
- not specified, the identity function is used. Accessor functions can refer to
- <tt>this.index</tt>.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{array}</span> <b>array</b>
-
- </dt>
- <dd>an array of objects, or numbers.</dd>
-
- <dt>
- <span class="light fixedFont">{function}</span> <b>f</b>
- <i>Optional</i>
- </dt>
- <dd>an optional accessor function.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{number[]}</span> an array of numbers that sums to one.</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".numerate"> </a>
- <div class="fixedFont"><static>
-
-
- <span class="light">pv.</span><b>numerate</b>(keys, f)
-
- </div>
- <div class="description">
- Returns a map from key to index for the specified <tt>keys</tt> array. For
- example,
- <pre>pv.numerate(["a", "b", "c"])</pre>
- returns <tt>{a: 0, b: 1, c: 2}</tt>. Note that since JavaScript maps only
- support string keys, <tt>keys</tt> must contain strings, or other values that
- naturally map to distinct string values. Alternatively, an optional accessor
- function <tt>f</tt> can be specified to compute the string key for the given
- element. Accessor functions can refer to <tt>this.index</tt>.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{array}</span> <b>keys</b>
-
- </dt>
- <dd>an array, usually of string keys.</dd>
-
- <dt>
- <span class="light fixedFont">{function}</span> <b>f</b>
- <i>Optional</i>
- </dt>
- <dd>an optional key function.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd>a map from key to index.</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".parent"> </a>
- <div class="fixedFont"><static>
-
-
- <span class="light">pv.</span><b>parent</b>()
-
- </div>
- <div class="description">
- Returns <tt>this.parent.index</tt>. This method is provided for convenience
- for use with scales. This method is provided for convenience for use with
- scales. For example, to color bars by their parent index, say:
- <pre>.fillStyle(pv.Colors.category10().by(pv.parent))</pre>
- Tthis method is equivalent to <tt>function() this.parent.index</tt>, but more
- succinct.
-
-
- </div>
-
-
-
-
-
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">See:</dt>
-
- <dd>pv.Scale</dd>
-
- <dd><a href="../symbols/pv.Mark.html#index">pv.Mark#index</a></dd>
-
- </dl>
-
- <hr />
-
- <a name=".permute"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{array}</span>
- <span class="light">pv.</span><b>permute</b>(array, indexes, f)
-
- </div>
- <div class="description">
- Returns a permutation of the specified array, using the specified array of
- indexes. The returned array contains the corresponding element in
- <tt>array</tt> for each index in <tt>indexes</tt>, in order. For example,
- <pre>pv.permute(["a", "b", "c"], [1, 2, 0])</pre>
- returns <tt>["b", "c", "a"]</tt>. It is acceptable for the array of indexes
- to be a different length from the array of elements, and for indexes to be
- duplicated or omitted. The optional accessor function <tt>f</tt> can be used
- to perform a simultaneous mapping of the array elements. Accessor functions
- can refer to <tt>this.index</tt>.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{array}</span> <b>array</b>
-
- </dt>
- <dd>an array.</dd>
-
- <dt>
- <span class="light fixedFont">{number[]}</span> <b>indexes</b>
-
- </dt>
- <dd>an array of indexes into <tt>array</tt>.</dd>
-
- <dt>
- <span class="light fixedFont">{function}</span> <b>f</b>
- <i>Optional</i>
- </dt>
- <dd>an optional accessor function.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{array}</span> an array of elements from <tt>array</tt>; a permutation.</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".ramp"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{Function}</span>
- <span class="light">pv.</span><b>ramp</b>(start, end)
-
- </div>
- <div class="description">
- Returns a linear color ramp from the specified <tt>start</tt> color to the
- specified <tt>end</tt> color. The color arguments may be specified either as
- <tt>string</tt>s or as <a href="../symbols/pv.Color.html">pv.Color</a>s.
-
- <br />
- <i>Defined in: </i> <a href="../symbols/src/color_Ramp.js.html">Ramp.js</a>.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{string}</span> <b>start</b>
-
- </dt>
- <dd>the start color; may be a <tt>pv.Color</tt>.</dd>
-
- <dt>
- <span class="light fixedFont">{string}</span> <b>end</b>
-
- </dt>
- <dd>the end color; may be a <tt>pv.Color</tt>.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{Function}</span> a color ramp from <tt>start</tt> to <tt>end</tt>.</dd>
-
- </dl>
-
-
-
- <dl class="detailList">
- <dt class="heading">See:</dt>
-
- <dd><a href="../symbols/pv.Scale.linear.html">pv.Scale.linear</a></dd>
-
- </dl>
-
- <hr />
-
- <a name=".random"> </a>
- <div class="fixedFont"><static>
-
-
- <span class="light">pv.</span><b>random</b>(min, max, step)
-
- </div>
- <div class="description">
- Returns a random number in the range [<tt>min</tt>, <tt>max</tt>) that is a
- multiple of <tt>step</tt>. More specifically, the returned number is of the
- form <tt>min</tt> + <i>n</i> * <tt>step</tt>, where <i>n</i> is a nonnegative
- integer. If <tt>step</tt> is not specified, it defaults to 1, returning a
- random integer if <tt>min</tt> is also an integer.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <b>min</b>
-
- </dt>
- <dd>{number} minimum value.</dd>
-
- <dt>
- <b>max</b>
- <i>Optional</i>
- </dt>
- <dd>{number} maximum value.</dd>
-
- <dt>
- <b>step</b>
- <i>Optional</i>
- </dt>
- <dd>{numbeR} step value.</dd>
-
- </dl>
-
-
-
-
-
-
-
- <hr />
-
- <a name=".range"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{number[]}</span>
- <span class="light">pv.</span><b>range</b>(start, stop, step)
-
- </div>
- <div class="description">
- Returns an array of numbers, starting at <tt>start</tt>, incrementing by
- <tt>step</tt>, until <tt>stop</tt> is reached. The stop value is exclusive. If
- only a single argument is specified, this value is interpeted as the
- <i>stop</i> value, with the <i>start</i> value as zero. If only two arguments
- are specified, the step value is implied to be one.
- <p>The method is modeled after the built-in <tt>range</tt> method from
- Python. See the Python documentation for more details.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>start</b>
- <i>Optional</i>
- </dt>
- <dd>the start value.</dd>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>stop</b>
-
- </dt>
- <dd>the stop value.</dd>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>step</b>
- <i>Optional</i>
- </dt>
- <dd>the step value.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{number[]}</span> an array of numbers.</dd>
-
- </dl>
-
-
-
- <dl class="detailList">
- <dt class="heading">See:</dt>
-
- <dd><a href="http://docs.python.org/library/functions.html#range">Python range</a></dd>
-
- </dl>
-
- <hr />
-
- <a name=".repeat"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{array}</span>
- <span class="light">pv.</span><b>repeat</b>(a, n)
-
- </div>
- <div class="description">
- Concatenates the specified array with itself <i>n</i> times. For example,
- <tt>pv.repeat([1, 2])</tt> returns [1, 2, 1, 2].
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{array}</span> <b>a</b>
-
- </dt>
- <dd>an array.</dd>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>n</b>
- <i>Optional</i>
- </dt>
- <dd>the number of times to repeat; defaults to two.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{array}</span> an array that repeats the specified array.</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".reverseOrder"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{number}</span>
- <span class="light">pv.</span><b>reverseOrder</b>(a, b)
-
- </div>
- <div class="description">
- The comparator function for reverse natural order. This can be used in
- conjunction with the built-in array <tt>sort</tt> method to sort elements by
- their natural order, descending. Note that if no comparator function is
- specified to the built-in <tt>sort</tt> method, the default order is
- lexicographic, <i>not</i> natural!
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <b>a</b>
-
- </dt>
- <dd>an element to compare.</dd>
-
- <dt>
- <b>b</b>
-
- </dt>
- <dd>an element to compare.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{number}</span> negative if a < b; positive if a > b; otherwise 0.</dd>
-
- </dl>
-
-
-
- <dl class="detailList">
- <dt class="heading">See:</dt>
-
- <dd><a href="#naturalOrder">#naturalOrder</a></dd>
-
- </dl>
-
- <hr />
-
- <a name=".rgb"> </a>
- <div class="fixedFont"><static>
-
-
- <span class="light">pv.</span><b>rgb</b>(r, g, b, a)
-
- </div>
- <div class="description">
- Constructs a new RGB color with the specified channel values.
-
- <br />
- <i>Defined in: </i> <a href="../symbols/src/color_Color.js.html">Color.js</a>.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>r</b>
-
- </dt>
- <dd>the red channel, an integer in [0,255].</dd>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>g</b>
-
- </dt>
- <dd>the green channel, an integer in [0,255].</dd>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>b</b>
-
- </dt>
- <dd>the blue channel, an integer in [0,255].</dd>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>a</b>
- <i>Optional</i>
- </dt>
- <dd>the alpha channel, a float in [0,1].</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd>pv.Color.Rgb</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".search"> </a>
- <div class="fixedFont"><static>
-
-
- <span class="light">pv.</span><b>search</b>(array, value, f)
-
- </div>
- <div class="description">
- Searches the specified array of numbers for the specified value using the
- binary search algorithm. The array must be sorted (as by the <tt>sort</tt>
- method) prior to making this call. If it is not sorted, the results are
- undefined. If the array contains multiple elements with the specified value,
- there is no guarantee which one will be found.
- <p>The <i>insertion point</i> is defined as the point at which the value
- would be inserted into the array: the index of the first element greater than
- the value, or <tt>array.length</tt>, if all elements in the array are less
- than the specified value. Note that this guarantees that the return value
- will be nonnegative if and only if the value is found.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{number[]}</span> <b>array</b>
-
- </dt>
- <dd>the array to be searched.</dd>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>value</b>
-
- </dt>
- <dd>the value to be searched for.</dd>
-
- <dt>
- <span class="light fixedFont">{function}</span> <b>f</b>
- <i>Optional</i>
- </dt>
- <dd>an optional key function.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd>the index of the search value, if it is contained in the array;
- otherwise, (-(<i>insertion point</i>) - 1).</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".sum"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{number}</span>
- <span class="light">pv.</span><b>sum</b>(array, f)
-
- </div>
- <div class="description">
- Returns the sum of the specified array. If the specified array is not an
- array of numbers, an optional accessor function <tt>f</tt> can be specified
- to map the elements to numbers. See <a href="#normalize">#normalize</a> for an example.
- Accessor functions can refer to <tt>this.index</tt>.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{array}</span> <b>array</b>
-
- </dt>
- <dd>an array of objects, or numbers.</dd>
-
- <dt>
- <span class="light fixedFont">{function}</span> <b>f</b>
- <i>Optional</i>
- </dt>
- <dd>an optional accessor function.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{number}</span> the sum of the specified array.</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".transpose"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{array[]}</span>
- <span class="light">pv.</span><b>transpose</b>(arrays)
-
- </div>
- <div class="description">
- Given the specified array of arrays, <style
- type="text/css">sub{line-height:0}</style> transposes each element
- array<sub>ij</sub> with array<sub>ji</sub>. If the array has dimensions
- <i>n</i>×<i>m</i>, it will have dimensions <i>m</i>×<i>n</i>
- after this method returns. This method transposes the elements of the array
- in place, mutating the array, and returning a reference to the array.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{array[]}</span> <b>arrays</b>
-
- </dt>
- <dd>an array of arrays.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{array[]}</span> the passed-in array, after transposing the elements.</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name=".tree"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{<a href="../symbols/pv.Tree.html">pv.Tree</a>}</span>
- <span class="light">pv.</span><b>tree</b>(array)
-
- </div>
- <div class="description">
- Returns a <a href="../symbols/pv.Tree.html">pv.Tree</a> operator for the specified array. This is a
- convenience factory method, equivalent to <tt>new pv.Tree(array)</tt>.
-
- <br />
- <i>Defined in: </i> <a href="../symbols/src/data_Tree.js.html">Tree.js</a>.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{array}</span> <b>array</b>
-
- </dt>
- <dd>an array from which to construct a tree.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/pv.Tree.html">pv.Tree</a>}</span> a tree operator for the specified array.</dd>
-
- </dl>
-
-
-
- <dl class="detailList">
- <dt class="heading">See:</dt>
-
- <dd><a href="../symbols/pv.Tree.html">pv.Tree</a></dd>
-
- </dl>
-
- <hr />
-
- <a name=".values"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{array}</span>
- <span class="light">pv.</span><b>values</b>(map)
-
- </div>
- <div class="description">
- Returns all of the values (attribute values) of the specified object (a
- map). The order of the returned array is not defined.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <b>map</b>
-
- </dt>
- <dd>an object.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{array}</span> an array of objects corresponding to the values.</dd>
-
- </dl>
-
-
-
- <dl class="detailList">
- <dt class="heading">See:</dt>
-
- <dd><a href="#entries">#entries</a></dd>
-
- </dl>
-
- <hr />
-
- <a name=".vector"> </a>
- <div class="fixedFont"><static>
-
- <span class="light">{<a href="../symbols/pv.Vector.html">pv.Vector</a>}</span>
- <span class="light">pv.</span><b>vector</b>(x, y)
-
- </div>
- <div class="description">
- Returns a <a href="../symbols/pv.Vector.html">pv.Vector</a> for the specified <i>x</i> and <i>y</i>
- coordinate. This is a convenience factory method, equivalent to <tt>new
- pv.Vector(x, y)</tt>.
-
- <br />
- <i>Defined in: </i> <a href="../symbols/src/data_Vector.js.html">Vector.js</a>.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>x</b>
-
- </dt>
- <dd>the <i>x</i> coordinate.</dd>
-
- <dt>
- <span class="light fixedFont">{number}</span> <b>y</b>
-
- </dt>
- <dd>the <i>y</i> coordinate.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/pv.Vector.html">pv.Vector</a>}</span> a vector for the specified coordinates.</dd>
-
- </dl>
-
-
-
- <dl class="detailList">
- <dt class="heading">See:</dt>
-
- <dd><a href="../symbols/pv.Vector.html">pv.Vector</a></dd>
-
- </dl>
-
-
-
-
-
- <!-- ============================== event details ========================= -->
-
-
- <hr />
- </div>
-
- <!-- ============================== footer ================================= -->
- <div class="fineprint" style="clear:both">
-
- 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)
- </div>
- </body>
- </html>
|