reference.html.haml 197 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567
  1. .container.sidemenu
  2. .row
  3. .large-3.medium-4.columns.column-menu
  4. .side-bar
  5. %ul.side-nav
  6. %li
  7. %strong OPTIONS
  8. %li Chart
  9. = partial :reference_menu_item, locals: { id: 'bindto' }
  10. = partial :reference_menu_item, locals: { id: 'size.width' }
  11. = partial :reference_menu_item, locals: { id: 'size.height' }
  12. = partial :reference_menu_item, locals: { id: 'padding.top' }
  13. = partial :reference_menu_item, locals: { id: 'padding.right' }
  14. = partial :reference_menu_item, locals: { id: 'padding.bottom' }
  15. = partial :reference_menu_item, locals: { id: 'padding.left' }
  16. = partial :reference_menu_item, locals: { id: 'color.pattern' }
  17. = partial :reference_menu_item, locals: { id: 'color.threshold' }
  18. = partial :reference_menu_item, locals: { id: 'interaction.enabled' }
  19. = partial :reference_menu_item, locals: { id: 'transition.duration' }
  20. = partial :reference_menu_item, locals: { id: 'oninit' }
  21. = partial :reference_menu_item, locals: { id: 'onrendered' }
  22. = partial :reference_menu_item, locals: { id: 'onmouseover' }
  23. = partial :reference_menu_item, locals: { id: 'onmouseout' }
  24. = partial :reference_menu_item, locals: { id: 'onresize' }
  25. = partial :reference_menu_item, locals: { id: 'onresized' }
  26. %li Data
  27. = partial :reference_menu_item, locals: { id: 'data.url' }
  28. = partial :reference_menu_item, locals: { id: 'data.json' }
  29. = partial :reference_menu_item, locals: { id: 'data.rows' }
  30. = partial :reference_menu_item, locals: { id: 'data.columns' }
  31. = partial :reference_menu_item, locals: { id: 'data.mimeType' }
  32. = partial :reference_menu_item, locals: { id: 'data.keys' }
  33. = partial :reference_menu_item, locals: { id: 'data.x' }
  34. = partial :reference_menu_item, locals: { id: 'data.xs' }
  35. = partial :reference_menu_item, locals: { id: 'data.xFormat' }
  36. = partial :reference_menu_item, locals: { id: 'data.xLocaltime' }
  37. = partial :reference_menu_item, locals: { id: 'data.xSort' }
  38. -#= partial :reference_menu_item, locals: { id: 'data.idConverter' }
  39. = partial :reference_menu_item, locals: { id: 'data.names' }
  40. = partial :reference_menu_item, locals: { id: 'data.classes' }
  41. = partial :reference_menu_item, locals: { id: 'data.groups' }
  42. = partial :reference_menu_item, locals: { id: 'data.axes' }
  43. = partial :reference_menu_item, locals: { id: 'data.type' }
  44. = partial :reference_menu_item, locals: { id: 'data.types' }
  45. = partial :reference_menu_item, locals: { id: 'data.labels' }
  46. = partial :reference_menu_item, locals: { id: 'data.labels.format' }
  47. = partial :reference_menu_item, locals: { id: 'data.order' }
  48. = partial :reference_menu_item, locals: { id: 'data.regions' }
  49. = partial :reference_menu_item, locals: { id: 'data.color' }
  50. = partial :reference_menu_item, locals: { id: 'data.colors' }
  51. = partial :reference_menu_item, locals: { id: 'data.hide' }
  52. = partial :reference_menu_item, locals: { id: 'data.empty.label.text' }
  53. = partial :reference_menu_item, locals: { id: 'data.selection.enabled' }
  54. = partial :reference_menu_item, locals: { id: 'data.selection.grouped' }
  55. = partial :reference_menu_item, locals: { id: 'data.selection.multiple' }
  56. = partial :reference_menu_item, locals: { id: 'data.selection.draggable' }
  57. = partial :reference_menu_item, locals: { id: 'data.selection.isselectable' }
  58. = partial :reference_menu_item, locals: { id: 'data.stack.normalize' }
  59. = partial :reference_menu_item, locals: { id: 'data.onclick' }
  60. = partial :reference_menu_item, locals: { id: 'data.onmouseover' }
  61. = partial :reference_menu_item, locals: { id: 'data.onmouseout' }
  62. = partial :reference_menu_item, locals: { id: 'data.onselected' }
  63. = partial :reference_menu_item, locals: { id: 'data.onunselected' }
  64. = partial :reference_menu_item, locals: { id: 'data.ondragstart' }
  65. = partial :reference_menu_item, locals: { id: 'data.ondragend' }
  66. %li Axis
  67. = partial :reference_menu_item, locals: { id: 'axis.rotated' }
  68. = partial :reference_menu_item, locals: { id: 'axis.x.show' }
  69. = partial :reference_menu_item, locals: { id: 'axis.x.type' }
  70. = partial :reference_menu_item, locals: { id: 'axis.x.localtime' }
  71. = partial :reference_menu_item, locals: { id: 'axis.x.categories' }
  72. = partial :reference_menu_item, locals: { id: 'axis.x.tick.centered' }
  73. = partial :reference_menu_item, locals: { id: 'axis.x.tick.format' }
  74. = partial :reference_menu_item, locals: { id: 'axis.x.tick.culling' }
  75. = partial :reference_menu_item, locals: { id: 'axis.x.tick.culling.max' }
  76. = partial :reference_menu_item, locals: { id: 'axis.x.tick.count' }
  77. = partial :reference_menu_item, locals: { id: 'axis.x.tick.fit' }
  78. = partial :reference_menu_item, locals: { id: 'axis.x.tick.values' }
  79. = partial :reference_menu_item, locals: { id: 'axis.x.tick.rotate' }
  80. = partial :reference_menu_item, locals: { id: 'axis.x.tick.outer' }
  81. = partial :reference_menu_item, locals: { id: 'axis.x.tick.multiline' }
  82. = partial :reference_menu_item, locals: { id: 'axis.x.tick.multilineMax' }
  83. = partial :reference_menu_item, locals: { id: 'axis.x.tick.width' }
  84. = partial :reference_menu_item, locals: { id: 'axis.x.max' }
  85. = partial :reference_menu_item, locals: { id: 'axis.x.min' }
  86. = partial :reference_menu_item, locals: { id: 'axis.x.padding' }
  87. = partial :reference_menu_item, locals: { id: 'axis.x.height' }
  88. = partial :reference_menu_item, locals: { id: 'axis.x.extent' }
  89. = partial :reference_menu_item, locals: { id: 'axis.x.label' }
  90. = partial :reference_menu_item, locals: { id: 'axis.y.show' }
  91. = partial :reference_menu_item, locals: { id: 'axis.y.inner' }
  92. = partial :reference_menu_item, locals: { id: 'axis.y.type' }
  93. = partial :reference_menu_item, locals: { id: 'axis.y.max' }
  94. = partial :reference_menu_item, locals: { id: 'axis.y.min' }
  95. = partial :reference_menu_item, locals: { id: 'axis.y.inverted' }
  96. = partial :reference_menu_item, locals: { id: 'axis.y.center' }
  97. = partial :reference_menu_item, locals: { id: 'axis.y.label' }
  98. = partial :reference_menu_item, locals: { id: 'axis.y.tick.format' }
  99. = partial :reference_menu_item, locals: { id: 'axis.y.tick.outer' }
  100. = partial :reference_menu_item, locals: { id: 'axis.y.tick.values' }
  101. = partial :reference_menu_item, locals: { id: 'axis.y.tick.count' }
  102. = partial :reference_menu_item, locals: { id: 'axis.y.tick.time.value' }
  103. = partial :reference_menu_item, locals: { id: 'axis.y.tick.time.interval' }
  104. = partial :reference_menu_item, locals: { id: 'axis.y.padding' }
  105. = partial :reference_menu_item, locals: { id: 'axis.y.default' }
  106. = partial :reference_menu_item, locals: { id: 'axis.y2.show' }
  107. = partial :reference_menu_item, locals: { id: 'axis.y2.inner' }
  108. = partial :reference_menu_item, locals: { id: 'axis.y2.type' }
  109. = partial :reference_menu_item, locals: { id: 'axis.y2.max' }
  110. = partial :reference_menu_item, locals: { id: 'axis.y2.min' }
  111. = partial :reference_menu_item, locals: { id: 'axis.y2.inverted' }
  112. = partial :reference_menu_item, locals: { id: 'axis.y2.center' }
  113. = partial :reference_menu_item, locals: { id: 'axis.y2.label' }
  114. = partial :reference_menu_item, locals: { id: 'axis.y2.tick.format' }
  115. = partial :reference_menu_item, locals: { id: 'axis.y2.tick.outer' }
  116. = partial :reference_menu_item, locals: { id: 'axis.y2.tick.values' }
  117. = partial :reference_menu_item, locals: { id: 'axis.y2.tick.count' }
  118. = partial :reference_menu_item, locals: { id: 'axis.y2.padding' }
  119. = partial :reference_menu_item, locals: { id: 'axis.y2.default' }
  120. %li Grid
  121. = partial :reference_menu_item, locals: { id: 'grid.x.show' }
  122. = partial :reference_menu_item, locals: { id: 'grid.x.lines' }
  123. = partial :reference_menu_item, locals: { id: 'grid.y.show' }
  124. = partial :reference_menu_item, locals: { id: 'grid.y.lines' }
  125. = partial :reference_menu_item, locals: { id: 'grid.y.ticks' }
  126. %li Region
  127. = partial :reference_menu_item, locals: { id: 'regions' }
  128. %li Legend
  129. = partial :reference_menu_item, locals: { id: 'legend.show' }
  130. = partial :reference_menu_item, locals: { id: 'legend.hide' }
  131. = partial :reference_menu_item, locals: { id: 'legend.position' }
  132. = partial :reference_menu_item, locals: { id: 'legend.inset' }
  133. = partial :reference_menu_item, locals: { id: 'legend.item.onclick' }
  134. = partial :reference_menu_item, locals: { id: 'legend.item.onmouseover' }
  135. = partial :reference_menu_item, locals: { id: 'legend.item.onmouseout' }
  136. %li Tooltip
  137. = partial :reference_menu_item, locals: { id: 'tooltip.show' }
  138. = partial :reference_menu_item, locals: { id: 'tooltip.grouped' }
  139. = partial :reference_menu_item, locals: { id: 'tooltip.format.title' }
  140. = partial :reference_menu_item, locals: { id: 'tooltip.format.name' }
  141. = partial :reference_menu_item, locals: { id: 'tooltip.format.value' }
  142. = partial :reference_menu_item, locals: { id: 'tooltip.position' }
  143. = partial :reference_menu_item, locals: { id: 'tooltip.contents' }
  144. = partial :reference_menu_item, locals: { id: 'tooltip.horizontal' }
  145. %li Subchart
  146. = partial :reference_menu_item, locals: { id: 'subchart.show', experimental: true }
  147. = partial :reference_menu_item, locals: { id: 'subchart.size.height', experimental: true }
  148. = partial :reference_menu_item, locals: { id: 'subchart.onbrush', experimental: true }
  149. = partial :reference_menu_item, locals: { id: 'subchart.axis.x.show', experimental: true }
  150. %li Zoom
  151. = partial :reference_menu_item, locals: { id: 'zoom.enabled', experimental: true }
  152. = partial :reference_menu_item, locals: { id: 'zoom.type', experimental: true }
  153. = partial :reference_menu_item, locals: { id: 'zoom.rescale', experimental: true }
  154. = partial :reference_menu_item, locals: { id: 'zoom.extent', experimental: true }
  155. = partial :reference_menu_item, locals: { id: 'zoom.onzoom', experimental: true }
  156. = partial :reference_menu_item, locals: { id: 'zoom.onzoomstart', experimental: true }
  157. = partial :reference_menu_item, locals: { id: 'zoom.onzoomend', experimental: true }
  158. = partial :reference_menu_item, locals: { id: 'zoom.disableDefaultBehavior', experimental: true }
  159. %li Point
  160. = partial :reference_menu_item, locals: { id: 'point.show' }
  161. = partial :reference_menu_item, locals: { id: 'point.r' }
  162. = partial :reference_menu_item, locals: { id: 'point.focus.expand.enabled' }
  163. = partial :reference_menu_item, locals: { id: 'point.focus.expand.r' }
  164. = partial :reference_menu_item, locals: { id: 'point.select.r' }
  165. %li Line
  166. = partial :reference_menu_item, locals: { id: 'line.connectNull' }
  167. = partial :reference_menu_item, locals: { id: 'line.step.type' }
  168. %li Area
  169. = partial :reference_menu_item, locals: { id: 'area.zerobased' }
  170. %li Bar
  171. = partial :reference_menu_item, locals: { id: 'bar.width' }
  172. = partial :reference_menu_item, locals: { id: 'bar.width.ratio' }
  173. = partial :reference_menu_item, locals: { id: 'bar.zerobased' }
  174. %li Pie
  175. = partial :reference_menu_item, locals: { id: 'pie.label.show' }
  176. = partial :reference_menu_item, locals: { id: 'pie.label.format' }
  177. = partial :reference_menu_item, locals: { id: 'pie.label.threshold' }
  178. = partial :reference_menu_item, locals: { id: 'pie.expand' }
  179. = partial :reference_menu_item, locals: { id: 'pie.padAngle' }
  180. %li Donut
  181. = partial :reference_menu_item, locals: { id: 'donut.label.show' }
  182. = partial :reference_menu_item, locals: { id: 'donut.label.format' }
  183. = partial :reference_menu_item, locals: { id: 'donut.label.threshold' }
  184. = partial :reference_menu_item, locals: { id: 'donut.expand' }
  185. = partial :reference_menu_item, locals: { id: 'donut.padAngle' }
  186. = partial :reference_menu_item, locals: { id: 'donut.width' }
  187. = partial :reference_menu_item, locals: { id: 'donut.title' }
  188. %li Gauge
  189. = partial :reference_menu_item, locals: { id: 'gauge.label.show' }
  190. = partial :reference_menu_item, locals: { id: 'gauge.label.format' }
  191. = partial :reference_menu_item, locals: { id: 'gauge.expand' }
  192. = partial :reference_menu_item, locals: { id: 'gauge.min' }
  193. = partial :reference_menu_item, locals: { id: 'gauge.max' }
  194. = partial :reference_menu_item, locals: { id: 'gauge.units' }
  195. = partial :reference_menu_item, locals: { id: 'gauge.width' }
  196. %li Spline
  197. = partial :reference_menu_item, locals: { id: 'spline.interpolation.type' }
  198. %li Stanford
  199. = partial :reference_menu_item, locals: { id: 'stanford.scaleMin' }
  200. = partial :reference_menu_item, locals: { id: 'stanford.scaleMax' }
  201. = partial :reference_menu_item, locals: { id: 'stanford.scaleWidth' }
  202. = partial :reference_menu_item, locals: { id: 'stanford.scaleFormat' }
  203. = partial :reference_menu_item, locals: { id: 'stanford.colors' }
  204. = partial :reference_menu_item, locals: { id: 'stanford.padding' }
  205. = partial :reference_menu_item, locals: { id: 'stanford.texts' }
  206. = partial :reference_menu_item, locals: { id: 'stanford.lines' }
  207. = partial :reference_menu_item, locals: { id: 'stanford.regions' }
  208. %li.margin-medium-top
  209. %strong API
  210. = partial :reference_menu_item, locals: { id: 'api.focus' }
  211. = partial :reference_menu_item, locals: { id: 'api.defocus' }
  212. = partial :reference_menu_item, locals: { id: 'api.revert' }
  213. = partial :reference_menu_item, locals: { id: 'api.show' }
  214. = partial :reference_menu_item, locals: { id: 'api.hide' }
  215. = partial :reference_menu_item, locals: { id: 'api.toggle' }
  216. = partial :reference_menu_item, locals: { id: 'api.load' }
  217. = partial :reference_menu_item, locals: { id: 'api.unload' }
  218. = partial :reference_menu_item, locals: { id: 'api.flow' }
  219. = partial :reference_menu_item, locals: { id: 'api.select' }
  220. = partial :reference_menu_item, locals: { id: 'api.unselect' }
  221. = partial :reference_menu_item, locals: { id: 'api.selected' }
  222. = partial :reference_menu_item, locals: { id: 'api.transform' }
  223. = partial :reference_menu_item, locals: { id: 'api.groups' }
  224. = partial :reference_menu_item, locals: { id: 'api.xgrids' }
  225. = partial :reference_menu_item, locals: { id: 'api.xgrids.add' }
  226. = partial :reference_menu_item, locals: { id: 'api.xgrids.remove' }
  227. = partial :reference_menu_item, locals: { id: 'api.ygrids' }
  228. = partial :reference_menu_item, locals: { id: 'api.ygrids.add' }
  229. = partial :reference_menu_item, locals: { id: 'api.ygrids.remove' }
  230. = partial :reference_menu_item, locals: { id: 'api.regions' }
  231. = partial :reference_menu_item, locals: { id: 'api.regions.add' }
  232. = partial :reference_menu_item, locals: { id: 'api.regions.remove' }
  233. = partial :reference_menu_item, locals: { id: 'api.data' }
  234. = partial :reference_menu_item, locals: { id: 'api.data.shown' }
  235. = partial :reference_menu_item, locals: { id: 'api.data.values' }
  236. = partial :reference_menu_item, locals: { id: 'api.data.names' }
  237. = partial :reference_menu_item, locals: { id: 'api.data.colors' }
  238. = partial :reference_menu_item, locals: { id: 'api.data.axes' }
  239. = partial :reference_menu_item, locals: { id: 'api.x' }
  240. = partial :reference_menu_item, locals: { id: 'api.xs' }
  241. = partial :reference_menu_item, locals: { id: 'api.axis.labels' }
  242. = partial :reference_menu_item, locals: { id: 'api.axis.min' }
  243. = partial :reference_menu_item, locals: { id: 'api.axis.max' }
  244. = partial :reference_menu_item, locals: { id: 'api.axis.range' }
  245. = partial :reference_menu_item, locals: { id: 'api.axis.types' }
  246. = partial :reference_menu_item, locals: { id: 'api.legend.show' }
  247. = partial :reference_menu_item, locals: { id: 'api.legend.hide' }
  248. = partial :reference_menu_item, locals: { id: 'api.subchart.isShown' }
  249. = partial :reference_menu_item, locals: { id: 'api.subchart.show' }
  250. = partial :reference_menu_item, locals: { id: 'api.subchart.hide' }
  251. = partial :reference_menu_item, locals: { id: 'api.zoom' }
  252. = partial :reference_menu_item, locals: { id: 'api.unzoom' }
  253. = partial :reference_menu_item, locals: { id: 'api.zoom.enable' }
  254. = partial :reference_menu_item, locals: { id: 'api.resize' }
  255. = partial :reference_menu_item, locals: { id: 'api.flush' }
  256. = partial :reference_menu_item, locals: { id: 'api.destroy' }
  257. %li.margin-medium-top
  258. %strong CLASS
  259. = partial :reference_menu_item, locals: { id: 'class.c3-chart' }
  260. = partial :reference_menu_item, locals: { id: 'class.c3-chart-line' }
  261. = partial :reference_menu_item, locals: { id: 'class.c3-chart-lines' }
  262. = partial :reference_menu_item, locals: { id: 'class.c3-chart-bar' }
  263. = partial :reference_menu_item, locals: { id: 'class.c3-chart-bars' }
  264. = partial :reference_menu_item, locals: { id: 'class.c3-chart-text' }
  265. = partial :reference_menu_item, locals: { id: 'class.c3-chart-texts' }
  266. = partial :reference_menu_item, locals: { id: 'class.c3-chart-arc' }
  267. = partial :reference_menu_item, locals: { id: 'class.c3-chart-arcs' }
  268. = partial :reference_menu_item, locals: { id: 'class.c3-chart-arcs-title' }
  269. = partial :reference_menu_item, locals: { id: 'class.c3-chart-arcs-background' }
  270. = partial :reference_menu_item, locals: { id: 'class.c3-chart-arcs-gauge-unit' }
  271. = partial :reference_menu_item, locals: { id: 'class.c3-chart-arcs-gauge-max' }
  272. = partial :reference_menu_item, locals: { id: 'class.c3-chart-arcs-gauge-min' }
  273. = partial :reference_menu_item, locals: { id: 'class.c3-selected-circle' }
  274. = partial :reference_menu_item, locals: { id: 'class.c3-selected-circles' }
  275. = partial :reference_menu_item, locals: { id: 'class.c3-event-rect' }
  276. = partial :reference_menu_item, locals: { id: 'class.c3-event-rects' }
  277. = partial :reference_menu_item, locals: { id: 'class.c3-event-rects-single' }
  278. = partial :reference_menu_item, locals: { id: 'class.c3-event-rects-multiple' }
  279. = partial :reference_menu_item, locals: { id: 'class.c3-zoom-rect' }
  280. = partial :reference_menu_item, locals: { id: 'class.c3-brush' }
  281. = partial :reference_menu_item, locals: { id: 'class.c3-focused' }
  282. = partial :reference_menu_item, locals: { id: 'class.c3-region' }
  283. = partial :reference_menu_item, locals: { id: 'class.c3-regions' }
  284. = partial :reference_menu_item, locals: { id: 'class.c3-tooltip' }
  285. = partial :reference_menu_item, locals: { id: 'class.c3-tooltip-name' }
  286. = partial :reference_menu_item, locals: { id: 'class.c3-shape' }
  287. = partial :reference_menu_item, locals: { id: 'class.c3-shapes' }
  288. = partial :reference_menu_item, locals: { id: 'class.c3-line' }
  289. = partial :reference_menu_item, locals: { id: 'class.c3-lines' }
  290. = partial :reference_menu_item, locals: { id: 'class.c3-bar' }
  291. = partial :reference_menu_item, locals: { id: 'class.c3-bars' }
  292. = partial :reference_menu_item, locals: { id: 'class.c3-circle' }
  293. = partial :reference_menu_item, locals: { id: 'class.c3-circles' }
  294. = partial :reference_menu_item, locals: { id: 'class.c3-arc' }
  295. = partial :reference_menu_item, locals: { id: 'class.c3-arcs' }
  296. = partial :reference_menu_item, locals: { id: 'class.c3-area' }
  297. = partial :reference_menu_item, locals: { id: 'class.c3-areas' }
  298. = partial :reference_menu_item, locals: { id: 'class.c3-empty' }
  299. = partial :reference_menu_item, locals: { id: 'class.c3-text' }
  300. = partial :reference_menu_item, locals: { id: 'class.c3-texts' }
  301. = partial :reference_menu_item, locals: { id: 'class.c3-gauge-value' }
  302. = partial :reference_menu_item, locals: { id: 'class.c3-grid' }
  303. = partial :reference_menu_item, locals: { id: 'class.c3-xgrid' }
  304. = partial :reference_menu_item, locals: { id: 'class.c3-xgrids' }
  305. = partial :reference_menu_item, locals: { id: 'class.c3-xgrid-line' }
  306. = partial :reference_menu_item, locals: { id: 'class.c3-xgrid-lines' }
  307. = partial :reference_menu_item, locals: { id: 'class.c3-xgrid-focus' }
  308. = partial :reference_menu_item, locals: { id: 'class.c3-ygrid' }
  309. = partial :reference_menu_item, locals: { id: 'class.c3-ygrids' }
  310. = partial :reference_menu_item, locals: { id: 'class.c3-ygrid-line' }
  311. = partial :reference_menu_item, locals: { id: 'class.c3-ygrid-lines' }
  312. = partial :reference_menu_item, locals: { id: 'class.c3-stanford-elements' }
  313. = partial :reference_menu_item, locals: { id: 'class.c3-stanford-line' }
  314. = partial :reference_menu_item, locals: { id: 'class.c3-stanford-lines' }
  315. = partial :reference_menu_item, locals: { id: 'class.c3-stanford-region' }
  316. = partial :reference_menu_item, locals: { id: 'class.c3-stanford-regions' }
  317. = partial :reference_menu_item, locals: { id: 'class.c3-stanford-text' }
  318. = partial :reference_menu_item, locals: { id: 'class.c3-stanford-texts' }
  319. = partial :reference_menu_item, locals: { id: 'class.c3-axis' }
  320. = partial :reference_menu_item, locals: { id: 'class.c3-axis-x' }
  321. = partial :reference_menu_item, locals: { id: 'class.c3-axis-x-label' }
  322. = partial :reference_menu_item, locals: { id: 'class.c3-axis-y' }
  323. = partial :reference_menu_item, locals: { id: 'class.c3-axis-y-label' }
  324. = partial :reference_menu_item, locals: { id: 'class.c3-axis-y2' }
  325. = partial :reference_menu_item, locals: { id: 'class.c3-axis-y2-label' }
  326. = partial :reference_menu_item, locals: { id: 'class.c3-legend-item' }
  327. = partial :reference_menu_item, locals: { id: 'class.c3-legend-item-event' }
  328. = partial :reference_menu_item, locals: { id: 'class.c3-legend-item-tile' }
  329. = partial :reference_menu_item, locals: { id: 'class.c3-legend-item-hidden' }
  330. = partial :reference_menu_item, locals: { id: 'class.c3-legend-item-focused' }
  331. .large-9.medium-8.columns.column-content
  332. %h2 Options
  333. %hr
  334. %section
  335. %h3
  336. = partial :reference_item_link, locals: { id: 'bindto' }
  337. %p The CSS selector or the element which the chart will be set to. D3 selection object can be specified. If other chart is set already, it will be replaced with the new one (only one chart can be set in one element).
  338. %br
  339. %p If this option is not specified, the chart will be generated but not be set. Instead, we can access the element by <span class="code">chart.element</span> and set it by ourselves.
  340. %h5 Note:
  341. %p When chart is not binded, c3 starts observing if <span class="code">chart.element</span> is binded by <span class="code">MutationObserver</span>. In this case, polyfill is required in IE9 and IE10 because they do not support <span class="code">MutationObserver</span>. On the other hand, if chart always will be binded, polyfill will not be required because <span class="code">MutationObserver</span> will never be called.
  342. %h5 Default:
  343. <code>#chart</code>
  344. %h5 Format:
  345. %div.sourcecode
  346. %pre
  347. %code.html.javascript
  348. bindto: '#myContainer'
  349. \// or element
  350. bindto: document.getElementById('myContainer')
  351. \// or D3 selection object
  352. bindto: d3.select('#myContainer')
  353. %hr
  354. %section
  355. %h3
  356. = partial :reference_item_link, locals: { id: 'size.width' }
  357. %p The desired width of the chart element.
  358. %br
  359. %p If this option is not specified, the width of the chart will be calculated by the size of the parent element it's appended to.
  360. %h5 Default:
  361. <code>undefined</code>
  362. %h5 Format:
  363. %div.sourcecode
  364. %pre
  365. %code.html.javascript
  366. size: {
  367. &nbsp;&nbsp;width: 640
  368. }
  369. %h5 Note:
  370. %p This option should be specified if possible because it can improve its performance because some size calculations will be skipped by an explicit value.
  371. %hr
  372. %section
  373. %h3
  374. = partial :reference_item_link, locals: { id: 'size.height' }
  375. %p The desired height of the chart element.
  376. %br
  377. %p If this option is not specified, the height of the chart will be calculated by the size of the parent element it's appended to.
  378. %h5 Default:
  379. <code>undefined</code>
  380. %h5 Format:
  381. %div.sourcecode
  382. %pre
  383. %code.html.javascript
  384. size: {
  385. &nbsp;&nbsp;height: 480
  386. }
  387. %hr
  388. %section
  389. %h3
  390. = partial :reference_item_link, locals: { id: 'padding.top' }
  391. %p The padding on the top of the chart.
  392. %h5 Default:
  393. <code>undefined</code>
  394. %h5 Format:
  395. %div.sourcecode
  396. %pre
  397. %code.html.javascript
  398. padding: {
  399. &nbsp;&nbsp;top: 20
  400. }
  401. %h5 Example:
  402. %ul
  403. %li
  404. %a( href="/samples/options_padding.html" ) Padding for the chart
  405. %hr
  406. %section
  407. %h3
  408. = partial :reference_item_link, locals: { id: 'padding.right' }
  409. %p The padding on the right of the chart.
  410. %h5 Default:
  411. <code>undefined</code>
  412. %h5 Format:
  413. %div.sourcecode
  414. %pre
  415. %code.html.javascript
  416. padding: {
  417. &nbsp;&nbsp;right: 20
  418. }
  419. %h5 Example:
  420. %ul
  421. %li
  422. %a( href="/samples/options_padding.html" ) Padding for the chart
  423. %hr
  424. %section
  425. %h3
  426. = partial :reference_item_link, locals: { id: 'padding.bottom' }
  427. %p The padding on the bottom of the chart.
  428. %h5 Default:
  429. <code>undefined</code>
  430. %h5 Format:
  431. %div.sourcecode
  432. %pre
  433. %code.html.javascript
  434. padding: {
  435. &nbsp;&nbsp;bottom: 20
  436. }
  437. %h5 Example:
  438. %ul
  439. %li
  440. %a( href="/samples/options_padding.html" ) Padding for the chart
  441. %hr
  442. %section
  443. %h3
  444. = partial :reference_item_link, locals: { id: 'padding.left' }
  445. %p The padding on the left of the chart.
  446. %h5 Default:
  447. <code>undefined</code>
  448. %h5 Format:
  449. %div.sourcecode
  450. %pre
  451. %code.html.javascript
  452. padding: {
  453. &nbsp;&nbsp;left: 20
  454. }
  455. %h5 Example:
  456. %ul
  457. %li
  458. %a( href="/samples/options_padding.html" ) Padding for the chart
  459. %h5 Note:
  460. %p This option should be specified if possible because it can improve its performance because some size calculations will be skipped by an explicit value.
  461. %hr
  462. %section
  463. %h3
  464. = partial :reference_item_link, locals: { id: 'color.pattern' }
  465. %p Set custom color pattern.
  466. %h5 Default:
  467. <code>undefined</code>
  468. %h5 Format:
  469. %div.sourcecode
  470. %pre
  471. %code.html.javascript
  472. color: {
  473. &nbsp;&nbsp;pattern: ['#1f77b4', '#aec7e8', ...]
  474. }
  475. %h5 Example:
  476. %ul
  477. %li
  478. %a( href="/samples/options_color.html" ) Custom color pattern
  479. %hr
  480. %section
  481. %h3
  482. = partial :reference_item_link, locals: { id: 'color.threshold' }
  483. %p not yet
  484. %hr
  485. %section
  486. %h3
  487. = partial :reference_item_link, locals: { id: 'interaction.enabled' }
  488. %p Indicate if the chart should have interactions.
  489. %br
  490. %p If <code>false</code> is set, all of interactions (showing/hiding tooltip, selection, mouse events, etc) will be disabled.
  491. %h5 Default:
  492. <code>true</code>
  493. %h5 Format:
  494. %div.sourcecode
  495. %pre
  496. %code.html.javascript
  497. interaction: {
  498. &nbsp;&nbsp;enabled: false
  499. }
  500. %hr
  501. %section
  502. %h3
  503. = partial :reference_item_link, locals: { id: 'transition.duration' }
  504. %p Set duration of transition (in milliseconds) for chart animation.
  505. %h5 Note:
  506. %p If <span class="code">0</span> or <span class="code">null</span> set, transition will be skipped. So, this makes initial rendering faster especially in case you have a lot of data.
  507. %h5 Default:
  508. <code>350</code>
  509. %h5 Format:
  510. %div.sourcecode
  511. %pre
  512. %code.html.javascript
  513. transition: {
  514. &nbsp;&nbsp;duration: 500
  515. }
  516. %h5 Example:
  517. %ul
  518. %li
  519. %a( href="/samples/transition_duration.html" ) Change the duration of transition
  520. %hr
  521. %section
  522. %h3
  523. = partial :reference_item_link, locals: { id: 'oninit' }
  524. %p Set a callback to execute when the chart is initialized.
  525. %h5 Default:
  526. <code>function () {}</code>
  527. %h5 Format:
  528. %div.sourcecode
  529. %pre
  530. %code.html.javascript
  531. oninit: function () { ... }
  532. %hr
  533. %section
  534. %h3
  535. = partial :reference_item_link, locals: { id: 'onrendered' }
  536. %p Set a callback which is executed when the chart is rendered. Basically, this callback will be called in each time when the chart is redrawed.
  537. %h5 Default:
  538. <code>function () {}</code>
  539. %h5 Format:
  540. %div.sourcecode
  541. %pre
  542. %code.html.javascript
  543. onrendered: function () { ... }
  544. %hr
  545. %section
  546. %h3
  547. = partial :reference_item_link, locals: { id: 'onmouseover' }
  548. %p Set a callback to execute when mouse enters the chart.
  549. %h5 Default:
  550. <code>function () {}</code>
  551. %h5 Format:
  552. %div.sourcecode
  553. %pre
  554. %code.html.javascript
  555. onmouseover: function () { ... }
  556. %hr
  557. %section
  558. %h3
  559. = partial :reference_item_link, locals: { id: 'onmouseout' }
  560. %p Set a callback to execute when mouse leaves the chart.
  561. %h5 Default:
  562. <code>function () {}</code>
  563. %h5 Format:
  564. %div.sourcecode
  565. %pre
  566. %code.html.javascript
  567. onmouseout: function () { ... }
  568. %hr
  569. %section
  570. %h3
  571. = partial :reference_item_link, locals: { id: 'onresize' }
  572. %p Set a callback to execute when user resizes the screen.
  573. %h5 Default:
  574. <code>function () {}</code>
  575. %h5 Format:
  576. %div.sourcecode
  577. %pre
  578. %code.html.javascript
  579. onresize: function () { ... }
  580. %hr
  581. %section
  582. %h3
  583. = partial :reference_item_link, locals: { id: 'onresized' }
  584. %p Set a callback to execute when screen resize finished.
  585. %h5 Default:
  586. <code>function () {}</code>
  587. %h5 Format:
  588. %div.sourcecode
  589. %pre
  590. %code.html.javascript
  591. onresized: function () { ... }
  592. %hr
  593. %section
  594. %h3
  595. = partial :reference_item_link, locals: { id: 'data.url' }
  596. %p Load a CSV or JSON file from a URL. Note that this will not work if loading via the "file://" protocol as the most browsers will block XMLHTTPRequests.
  597. %h5 Format:
  598. %div.sourcecode
  599. %pre
  600. %code.html.javascript
  601. var chart = c3.generate({
  602. &nbsp;&nbsp;data: {
  603. &nbsp;&nbsp;&nbsp;&nbsp;url: '/data/c3_test.csv'
  604. &nbsp;&nbsp;}
  605. });
  606. %hr
  607. %section
  608. %h3
  609. = partial :reference_item_link, locals: { id: 'data.json' }
  610. %p Parse a JSON object for data. See also data.keys.
  611. %h5 Format:
  612. %div.sourcecode
  613. %pre
  614. %code.html.javascript
  615. var chart = c3.generate({
  616. &nbsp;&nbsp;data: {
  617. &nbsp;&nbsp;&nbsp;&nbsp;json: [
  618. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{name: 'www.site1.com', upload: 200, download: 200, total: 400},
  619. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{name: 'www.site2.com', upload: 100, download: 300, total: 400},
  620. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{name: 'www.site3.com', upload: 300, download: 200, total: 500},
  621. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{name: 'www.site4.com', upload: 400, download: 100, total: 500}
  622. &nbsp;&nbsp;&nbsp;&nbsp;],
  623. &nbsp;&nbsp;&nbsp;&nbsp;keys: {
  624. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// x: 'name', // it's possible to specify 'x' when category axis
  625. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value: ['upload', 'download']
  626. &nbsp;&nbsp;&nbsp;&nbsp;}
  627. &nbsp;&nbsp;},
  628. &nbsp;&nbsp;axis: {
  629. &nbsp;&nbsp;&nbsp;&nbsp;x: {
  630. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// type: 'category'
  631. &nbsp;&nbsp;&nbsp;&nbsp;}
  632. &nbsp;&nbsp;}
  633. });
  634. %hr
  635. %section
  636. %h3
  637. = partial :reference_item_link, locals: { id: 'data.rows' }
  638. %p Load data from a multidimensional array, with the first element containing the data names, the following containing related data in that order.
  639. %h5 Format:
  640. %div.sourcecode
  641. %pre
  642. %code.html.javascript
  643. rows: [
  644. &nbsp;&nbsp;['data1', 'data2', 'data3'],
  645. &nbsp;&nbsp;[90, 120, 300],
  646. &nbsp;&nbsp;[40, 160, 240],
  647. &nbsp;&nbsp;[50, 200, 290],
  648. &nbsp;&nbsp;[120, 160, 230],
  649. &nbsp;&nbsp;[80, 130, 300],
  650. &nbsp;&nbsp;[90, 220, 320]
  651. ]
  652. %hr
  653. %section
  654. %h3
  655. = partial :reference_item_link, locals: { id: 'data.columns' }
  656. %p Load data from a multidimensional array, with each element containing an array consisting of a datum name and associated data values.
  657. %h5 Format:
  658. %div.sourcecode
  659. %pre
  660. %code.html.javascript
  661. columns: [
  662. &nbsp;&nbsp;['data1', 30, 20, 50, 40, 60, 50],
  663. &nbsp;&nbsp;['data2', 200, 130, 90, 240, 130, 220],
  664. &nbsp;&nbsp;['data3', 300, 200, 160, 400, 250, 250]
  665. ]
  666. %hr
  667. %section
  668. %h3
  669. = partial :reference_item_link, locals: { id: 'data.mimeType' }
  670. %p Used if loading JSON via data.url:
  671. %div.sourcecode
  672. %pre
  673. %code.html.javascript
  674. {data: {mimeType: 'json'}}
  675. %hr
  676. %section
  677. %h3
  678. = partial :reference_item_link, locals: { id: 'data.keys' }
  679. %p Choose which JSON object keys correspond to desired data.
  680. %h5 Format:
  681. %div.sourcecode
  682. %pre
  683. %code.html.javascript
  684. var chart = c3.generate({
  685. &nbsp;&nbsp;data: {
  686. &nbsp;&nbsp;&nbsp;&nbsp;json: [
  687. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{name: 'www.site1.com', upload: 200, download: 200, total: 400},
  688. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{name: 'www.site2.com', upload: 100, download: 300, total: 400},
  689. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{name: 'www.site3.com', upload: 300, download: 200, total: 500},
  690. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{name: 'www.site4.com', upload: 400, download: 100, total: 500}
  691. &nbsp;&nbsp;&nbsp;&nbsp;],
  692. &nbsp;&nbsp;&nbsp;&nbsp;keys: {
  693. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// x: 'name', // it's possible to specify 'x' when category axis
  694. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value: ['upload', 'download']
  695. &nbsp;&nbsp;&nbsp;&nbsp;}
  696. &nbsp;&nbsp;},
  697. &nbsp;&nbsp;axis: {
  698. &nbsp;&nbsp;&nbsp;&nbsp;x: {
  699. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// type: 'category'
  700. &nbsp;&nbsp;&nbsp;&nbsp;}
  701. &nbsp;&nbsp;}
  702. });
  703. %hr
  704. %section
  705. %h3
  706. = partial :reference_item_link, locals: { id: 'data.x' }
  707. %p Specify the key of x values in the data.
  708. %br
  709. %p We can show the data with non-index x values by this option. This option is required when the type of x axis is timeseries. If this option is set on category axis, the values of the data on the key will be used for category names.
  710. %h5 Default:
  711. <code>undefined</code>
  712. %h5 Format:
  713. %div.sourcecode
  714. %pre
  715. %code.html.javascript
  716. data: {
  717. &nbsp;&nbsp;x: 'date'
  718. }
  719. %h5 Example:
  720. %ul
  721. %li
  722. %a( href="/samples/simple_xy.html") XY Chart
  723. %li
  724. %a( href="/samples/timeseries.html" ) Timeseries Chart
  725. %li
  726. %a( href="/samples/data_stringx.html" ) Category Names
  727. %hr
  728. %section
  729. %h3
  730. = partial :reference_item_link, locals: { id: 'data.xs' }
  731. %p Specify the keys of the x values for each data.
  732. %br
  733. %p This option can be used if we want to show the data that has different x values.
  734. %h5 Default:
  735. <code>{}</code>
  736. %h5 Format:
  737. %div.sourcecode
  738. %pre
  739. %code.html.javascript
  740. data: {
  741. &nbsp;&nbsp;xs: {
  742. &nbsp;&nbsp;&nbsp;&nbsp;data1: 'x1',
  743. &nbsp;&nbsp;&nbsp;&nbsp;data2: 'x2'
  744. &nbsp;&nbsp;}
  745. }
  746. %h5 Example:
  747. %ul
  748. %li
  749. %a( href="/samples/simple_xy_multiple.html" ) Multiple XY Chart
  750. %h5 Note:
  751. %p <a href="#data-x">data.x</a> should be used if the all of data have same x values.
  752. %hr
  753. %section
  754. %h3
  755. = partial :reference_item_link, locals: { id: 'data.xFormat' }
  756. %p Set a format to parse string specified as x.
  757. %h5 Default:
  758. <code>%Y-%m-%d</code>
  759. %h5 Format:
  760. %div.sourcecode
  761. %pre
  762. %code.html.javascript
  763. data: {
  764. &nbsp;&nbsp;xFormat: '%Y-%m-%d %H:%M:%S'
  765. }
  766. %h5 Example:
  767. %ul
  768. %li
  769. %a( href="/samples/timeseries.html" ) Timeseries Chart
  770. %hr
  771. %section
  772. %h3
  773. = partial :reference_item_link, locals: { id: 'data.xLocaltime' }
  774. %p not yet
  775. %hr
  776. %section
  777. %h3
  778. = partial :reference_item_link, locals: { id: 'data.xSort' }
  779. %p not yet
  780. %hr
  781. %section
  782. %h3
  783. = partial :reference_item_link, locals: { id: 'data.names' }
  784. %p Set custom data name.
  785. %h5 Default:
  786. <code>{}</code>
  787. %h5 Format:
  788. %div.sourcecode
  789. %pre
  790. %code.html.javascript
  791. data: {
  792. &nbsp;&nbsp;names: {
  793. &nbsp;&nbsp;&nbsp;&nbsp;data1: 'Data Name 1',
  794. &nbsp;&nbsp;&nbsp;&nbsp;data2: 'Data Name 2'
  795. &nbsp;&nbsp;}
  796. }
  797. %h5 Example:
  798. %ul
  799. %li
  800. %a( href="/samples/data_name.html" ) Data Name
  801. %hr
  802. %section
  803. %h3
  804. = partial :reference_item_link, locals: { id: 'data.classes' }
  805. %p Set custom data class.
  806. %br
  807. %p If this option is specified, the element <span class="code">g</span> for the data has an additional class that has the prefix <span class="code">c3-target-</span> (e.g. <span class="code">c3-target-additional-data1-class</span>).
  808. %h5 Default:
  809. <code>{}</code>
  810. %h5 Format:
  811. %div.sourcecode
  812. %pre
  813. %code.html.javascript
  814. data: {
  815. &nbsp;&nbsp;classes: {
  816. &nbsp;&nbsp;&nbsp;&nbsp;data1: 'additional-data1-class',
  817. &nbsp;&nbsp;&nbsp;&nbsp;data2: 'additional-data2-class'
  818. &nbsp;&nbsp;}
  819. }
  820. %hr
  821. %section
  822. %h3
  823. = partial :reference_item_link, locals: { id: 'data.groups' }
  824. %p Set groups for the data for stacking.
  825. %h5 Default:
  826. <code>[]</code>
  827. %h5 Format:
  828. %div.sourcecode
  829. %pre
  830. %code.html.javascript
  831. data: {
  832. &nbsp;&nbsp;groups: [
  833. &nbsp;&nbsp;&nbsp;&nbsp;['data1', 'data2'],
  834. &nbsp;&nbsp;&nbsp;&nbsp;['data3']
  835. &nbsp;&nbsp;]
  836. }
  837. %h5 Example:
  838. %ul
  839. %li
  840. %a( href="/samples/chart_bar_stacked.html" ) Stacked Bar Chart
  841. %li
  842. %a( href="/samples/chart_area_stacked.html" ) Stacked Area Chart
  843. %hr
  844. %section
  845. %h3
  846. = partial :reference_item_link, locals: { id: 'data.axes' }
  847. %p Set y axis the data related to. <span class="code">y</span> and <span class="code">y2</span> can be used.
  848. %h5 Default:
  849. <code>{}</code>
  850. %h5 Format:
  851. %div.sourcecode
  852. %pre
  853. %code.html.javascript
  854. data: {
  855. &nbsp;&nbsp;axes: {
  856. &nbsp;&nbsp;&nbsp;&nbsp;data1: 'y',
  857. &nbsp;&nbsp;&nbsp;&nbsp;data2: 'y2'
  858. &nbsp;&nbsp;}
  859. }
  860. %h5 Example:
  861. %ul
  862. %li
  863. %a( href="/samples/axes_y2.html" ) Additional Y Axis
  864. %hr
  865. %section
  866. %h3
  867. = partial :reference_item_link, locals: { id: 'data.type' }
  868. %p Set chart type at once.
  869. %br
  870. %p If this option is specified, the type will be applied to every data. This setting can be overwritten by <a href="#data-types">data.types</a>.
  871. %h5 Available Values:
  872. %ul
  873. %li line
  874. %li spline
  875. %li step
  876. %li area
  877. %li area-spline
  878. %li area-step
  879. %li bar
  880. %li scatter
  881. %li stanford
  882. %li pie
  883. %li donut
  884. %li gauge
  885. %h5 Default:
  886. <code>line</code>
  887. %h5 Format:
  888. %div.sourcecode
  889. %pre
  890. %code.html.javascript
  891. data: {
  892. &nbsp;&nbsp;type: 'bar'
  893. }
  894. %h5 Example:
  895. %ul
  896. %li
  897. %a( href="/samples/chart_spline.html" ) Spline Chart
  898. %li
  899. %a( href="/samples/chart_step.html" ) Step Chart
  900. %li
  901. %a( href="/samples/chart_area.html" ) Area Chart
  902. %li
  903. %a( href="/samples/chart_bar.html" ) Bar Chart
  904. %li
  905. %a( href="/samples/chart_scatter.html" ) Scatter Chart
  906. %li
  907. %a( href="/samples/chart_stanford.html" ) Stanford Chart
  908. %li
  909. %a( href="/samples/chart_pie.html" ) Pie Chart
  910. %li
  911. %a( href="/samples/chart_donut.html" ) Donut Chart
  912. %li
  913. %a( href="/samples/chart_gauge.html" ) Gauge Chart
  914. %hr
  915. %section
  916. %h3
  917. = partial :reference_item_link, locals: { id: 'data.types' }
  918. %p Set chart type for each data.
  919. %br
  920. %p This setting overwrites <a href="#data-type">data.type</a> setting.
  921. %h5 Default:
  922. <code>{}</code>
  923. %h5 Format:
  924. %div.sourcecode
  925. %pre
  926. %code.html.javascript
  927. data: {
  928. &nbsp;&nbsp;types: {
  929. &nbsp;&nbsp;&nbsp;&nbsp;data1: 'bar'
  930. &nbsp;&nbsp;&nbsp;&nbsp;data2: 'spline'
  931. &nbsp;&nbsp;}
  932. }
  933. %h5 Example:
  934. %ul
  935. %li
  936. %a( href="/samples/chart_combination.html" ) Combination Chart
  937. %hr
  938. %section
  939. %h3
  940. = partial :reference_item_link, locals: { id: 'data.labels' }
  941. %p Show labels on each data points.
  942. %h5 Default:
  943. <code>false</code>
  944. %h5 Format:
  945. %div.sourcecode
  946. %pre
  947. %code.html.javascript
  948. data: {
  949. &nbsp;&nbsp;labels: true
  950. }
  951. %h5 Example:
  952. %ul
  953. %li
  954. %a( href="/samples/data_label.html" ) Data Label
  955. %hr
  956. %section
  957. %h3
  958. = partial :reference_item_link, locals: { id: 'data.labels.format' }
  959. %p Set formatter function for data labels.
  960. %br
  961. %p The formatter function receives 4 arguments such as <span class="code">v</span>, <span class="code">id</span>, <span class="code">i</span>, <span class="code">j</span> and it must return a string that will be shown as the label. The arguments are:
  962. %br
  963. %ul
  964. %li <span class="code">v</span> is the value of the data point where the label is shown.
  965. %li <span class="code">id</span> is the id of the data where the label is shown.
  966. %li <span class="code">i</span> is the index of the data point where the label is shown.
  967. %li <span class="code">j</span> is the sub index of the data point where the label is shown.
  968. %p Formatter function can be defined for each data by specifying as an object and D3 formatter function can be set (e.g. <span class="code">d3.format('$')</span>)
  969. %h5 Default:
  970. <code>{}</code>
  971. %h5 Format:
  972. %div.sourcecode
  973. %pre
  974. %code.html.javascript
  975. data: {
  976. &nbsp;&nbsp;labels: {
  977. &nbsp;&nbsp;&nbsp;&nbsp;format: function (v, id, i, j) { ... }
  978. &nbsp;&nbsp;&nbsp;&nbsp;// it's possible to set for each data
  979. &nbsp;&nbsp;&nbsp;&nbsp;//format: {
  980. &nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;&nbsp;data1: function (v, id, i, j) { ... },
  981. &nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;&nbsp;...
  982. &nbsp;&nbsp;&nbsp;&nbsp;//}
  983. &nbsp;&nbsp;}
  984. }
  985. %h5 Example:
  986. %ul
  987. %li
  988. %a( href="/samples/data_label_format.html" ) Data Label Format
  989. %hr
  990. %section
  991. %h3
  992. = partial :reference_item_link, locals: { id: 'data.order' }
  993. %p Define the order of the data.
  994. %br
  995. %p This option changes the order of stacking the data and pieces of pie/donut. If <code>null</code> specified, it will be the order the data loaded. If function specified, it will be used to sort the data and it will receive the data as argument.
  996. %h5 Available Values:
  997. %ul
  998. %li desc
  999. %li asc
  1000. %li <span class="code">function (data1, data2) { ... }</span>
  1001. %li <code>null</code>
  1002. %h5 Default:
  1003. <code>desc</code>
  1004. %h5 Format:
  1005. %div.sourcecode
  1006. %pre
  1007. %code.html.javascript
  1008. data: {
  1009. &nbsp;&nbsp;order: 'asc'
  1010. }
  1011. %h5 Example:
  1012. %ul
  1013. %li
  1014. %a( href="/samples/data_order.html" ) Data Order
  1015. %hr
  1016. %section
  1017. %h3
  1018. = partial :reference_item_link, locals: { id: 'data.regions' }
  1019. %p Define regions for each data.
  1020. %br
  1021. %p The values must be an array for each data and it should include an object that has <span class="code">start</span>, <span class="code">end</span>, <span class="code">style</span>. If <span class="code">start</span> is not set, the start will be the first data point. If <span class="code">end</span> is not set, the end will be the last data point.
  1022. %br
  1023. %p Currently this option supports only line chart and dashed style. If this option specified, the line will be dashed only in the regions.
  1024. %br
  1025. %p An optional <span class="code">label</span> property can be provided to display a label for the region. If a label option is not specified, no label will be displayed for the region. For each region, you may also specify the <span class="code">paddingY</span> and <span class="code">paddingX</span> options to control the position of label text. Finally, a <span class="code">vertical</span> option can be used to identify whether or not the label text should be rotated 90 degrees.
  1026. %h5 Default:
  1027. <code>{}</code>
  1028. %h5 Format:
  1029. %div.sourcecode
  1030. %pre
  1031. %code.html.javascript
  1032. data: {
  1033. &nbsp;&nbsp;regions: {
  1034. &nbsp;&nbsp;&nbsp;&nbsp;data1: [
  1035. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{'start':1, 'end':2, 'style':'dashed'},
  1036. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{'start':3, label:"Region 2", paddingX:2, paddingY:2, vertical=true}
  1037. &nbsp;&nbsp;&nbsp;&nbsp;],
  1038. &nbsp;&nbsp;&nbsp;&nbsp;...
  1039. &nbsp;&nbsp;}
  1040. }
  1041. %h5 Example:
  1042. %ul
  1043. %li
  1044. %a( href="/samples/simple_regions.html" ) Line Chart with Region
  1045. %hr
  1046. %section
  1047. %h3
  1048. = partial :reference_item_link, locals: { id: 'data.color' }
  1049. %p Set color converter function.
  1050. %br
  1051. %p This option should a function and the specified function receives <span class="code">color</span> (e.g. '#ff0000') and <span class="code">d</span> that has data parameters like id, value, index, etc. And it must return a string that represents color (e.g. '#00ff00').
  1052. %h5 Default:
  1053. <code>undefined</code>
  1054. %h5 Format:
  1055. %div.sourcecode
  1056. %pre
  1057. %code.html.javascript
  1058. data: {
  1059. &nbsp;&nbsp;color: function (color, d) { ... }
  1060. }
  1061. %h5 Example:
  1062. %ul
  1063. %li
  1064. %a( href="/samples/data_color.html" ) Data Color
  1065. %hr
  1066. %section
  1067. %h3
  1068. = partial :reference_item_link, locals: { id: 'data.colors' }
  1069. %p Set color for each data.
  1070. %h5 Default:
  1071. <code>{}</code>
  1072. %h5 Format:
  1073. %div.sourcecode
  1074. %pre
  1075. %code.html.javascript
  1076. data: {
  1077. &nbsp;&nbsp;colors: {
  1078. &nbsp;&nbsp;&nbsp;&nbsp;data1: '#ff0000',
  1079. &nbsp;&nbsp;&nbsp;&nbsp;...
  1080. &nbsp;&nbsp;}
  1081. }
  1082. %h5 Example:
  1083. %ul
  1084. %li
  1085. %a( href="/samples/data_color.html" ) Data Color
  1086. %hr
  1087. %section
  1088. %h3
  1089. = partial :reference_item_link, locals: { id: 'data.hide' }
  1090. %p Hide each data when the chart appears.
  1091. %br
  1092. %p If <code>true</code> specified, all of data will be hidden. If multiple ids specified as an array, those will be hidden.
  1093. %h5 Default:
  1094. <code>false</code>
  1095. %h5 Format:
  1096. %div.sourcecode
  1097. %pre
  1098. %code.html.javascript
  1099. data: {
  1100. &nbsp;&nbsp;// all of data will be hidden
  1101. &nbsp;&nbsp;hide: true
  1102. &nbsp;&nbsp;// specified data will be hidden
  1103. &nbsp;&nbsp;hide: ['data1', ...]
  1104. }
  1105. %h5 Note:
  1106. %p This option does not hide legends, so we need to use <a href="#legend-hide">legend.hide</a> option together if we want to hide legend too.
  1107. %hr
  1108. %section
  1109. %h3
  1110. = partial :reference_item_link, locals: { id: 'data.empty.label.text' }
  1111. %p Set text displayed when empty data.
  1112. %h5 Default:
  1113. <code>""</code>
  1114. %h5 Format:
  1115. %div.sourcecode
  1116. %pre
  1117. %code.html.javascript
  1118. data: {
  1119. &nbsp;&nbsp;empty: {
  1120. &nbsp;&nbsp;&nbsp;&nbsp;label: {
  1121. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;text: "No Data"
  1122. &nbsp;&nbsp;&nbsp;&nbsp;}
  1123. &nbsp;&nbsp;}
  1124. }
  1125. %hr
  1126. %section
  1127. %h3
  1128. = partial :reference_item_link, locals: { id: 'data.selection.enabled' }
  1129. %p Set data selection enabled.
  1130. %br
  1131. %p If this option is set <code>true</code>, we can select the data points and get/set its state of selection by API (e.g. <a>select</a>, <a>unselect</a>, <a>selected</a>).
  1132. %h5 Default:
  1133. <code>false</code>
  1134. %h5 Format:
  1135. %div.sourcecode
  1136. %pre
  1137. %code.html.javascript
  1138. data: {
  1139. &nbsp;&nbsp;selection: {
  1140. &nbsp;&nbsp;&nbsp;&nbsp;enabled: true
  1141. &nbsp;&nbsp;}
  1142. }
  1143. %hr
  1144. %section
  1145. %h3
  1146. = partial :reference_item_link, locals: { id: 'data.selection.grouped' }
  1147. %p Set grouped selection enabled.
  1148. %br
  1149. %p If this option set <code>true</code>, multiple data points that have same x value will be selected by one selection.
  1150. %h5 Default:
  1151. <code>false</code>
  1152. %h5 Format:
  1153. %div.sourcecode
  1154. %pre
  1155. %code.html.javascript
  1156. data: {
  1157. &nbsp;&nbsp;selection: {
  1158. &nbsp;&nbsp;&nbsp;&nbsp;grouped: true
  1159. &nbsp;&nbsp;}
  1160. }
  1161. %hr
  1162. %section
  1163. %h3
  1164. = partial :reference_item_link, locals: { id: 'data.selection.multiple' }
  1165. %p Set multiple data points selection enabled.
  1166. %br
  1167. %p If this option set <code>true</code>, multiple data points can have the selected state at the same time. If <code>false</code> set, only one data point can have the selected state and the others will be unselected when the new data point is selected.
  1168. %h5 Default:
  1169. <code>true</code>
  1170. %h5 Format:
  1171. %div.sourcecode
  1172. %pre
  1173. %code.html.javascript
  1174. data: {
  1175. &nbsp;&nbsp;selection: {
  1176. &nbsp;&nbsp;&nbsp;&nbsp;multiple: true
  1177. &nbsp;&nbsp;}
  1178. }
  1179. %hr
  1180. %section
  1181. %h3
  1182. = partial :reference_item_link, locals: { id: 'data.selection.draggable' }
  1183. %p Enable to select data points by dragging.
  1184. %br
  1185. %p If this option set <code>true</code>, data points can be selected by dragging.
  1186. %h5 Note:
  1187. %p If this option set <code>true</code>, scrolling on the chart will be disabled because dragging event will handle the event.
  1188. %h5 Default:
  1189. <code>false</code>
  1190. %h5 Format:
  1191. %div.sourcecode
  1192. %pre
  1193. %code.html.javascript
  1194. data: {
  1195. &nbsp;&nbsp;selection: {
  1196. &nbsp;&nbsp;&nbsp;&nbsp;draggable: true
  1197. &nbsp;&nbsp;}
  1198. }
  1199. %hr
  1200. %section
  1201. %h3
  1202. = partial :reference_item_link, locals: { id: 'data.selection.isselectable' }
  1203. %p Set a callback for each data point to determine if it's selectable or not.
  1204. %br
  1205. %p The callback will receive <span class="code">d</span> as an argument and it has some parameters like <span class="code">id</span>, <span class="code">value</span>, <span class="code">index</span>. This callback should return <span class="code">boolean</span>.
  1206. %h5 Default:
  1207. <code>function () { return true; }</code>
  1208. %h5 Format:
  1209. %div.sourcecode
  1210. %pre
  1211. %code.html.javascript
  1212. data: {
  1213. &nbsp;&nbsp;selection: {
  1214. &nbsp;&nbsp;&nbsp;&nbsp;isselectable: function (d) { ... }
  1215. &nbsp;&nbsp;}
  1216. }
  1217. %hr
  1218. %section
  1219. %h3
  1220. = partial :reference_item_link, locals: { id: 'data.stack.normalize' }
  1221. %p Set the stacking to be normalized
  1222. %br
  1223. %p For stacking, the `data.groups` option should be set and have positive values. The yAxis will be set in percentage value (0 ~ 100%).
  1224. %h5 Default:
  1225. <code>false</code>
  1226. %h5 Format:
  1227. %div.sourcecode
  1228. %pre
  1229. %code.html.javascript
  1230. data: {
  1231. &nbsp;&nbsp;stack: {
  1232. &nbsp;&nbsp;&nbsp;&nbsp;normalize: true
  1233. &nbsp;&nbsp;}
  1234. }
  1235. %hr
  1236. %section
  1237. %h3
  1238. = partial :reference_item_link, locals: { id: 'data.onclick' }
  1239. %p Set a callback for click event on each data point.
  1240. %br
  1241. %p This callback will be called when each data point clicked and will receive <span class="code">d</span> and <span class="code">element</span> as the arguments. <span class="code">d</span> is the data clicked and <span class="code">element</span> is the element clicked. In this callback, <span class="code">this</span> will be the <span class="code">Chart</span> object.
  1242. %h5 Default:
  1243. <code>function () {}</code>
  1244. %h5 Format:
  1245. %div.sourcecode
  1246. %pre
  1247. %code.html.javascript
  1248. data: {
  1249. &nbsp;&nbsp;onclick: function (d, element) { ... }
  1250. }
  1251. %hr
  1252. %section
  1253. %h3
  1254. = partial :reference_item_link, locals: { id: 'data.onmouseover' }
  1255. %p Set a callback for mouseover event on each data point.
  1256. %br
  1257. %p This callback will be called when mouse cursor moves onto each data point and will receive <span class="code">d</span> as the argument. <span class="code">d</span> is the data where mouse cursor moves onto. In this callback, <span class="code">this</span> will be the <span class="code">Chart</span> object.
  1258. %h5 Default:
  1259. <code>function () {}</code>
  1260. %h5 Format:
  1261. %div.sourcecode
  1262. %pre
  1263. %code.html.javascript
  1264. data: {
  1265. &nbsp;&nbsp;onmouseover: function (d) { ... }
  1266. }
  1267. %hr
  1268. %section
  1269. %h3
  1270. = partial :reference_item_link, locals: { id: 'data.onmouseout' }
  1271. %p Set a callback for mouseout event on each data point.
  1272. %br
  1273. %p This callback will be called when mouse cursor moves out each data point and will receive <span class="code">d</span> as the argument. <span class="code">d</span> is the data where mouse cursor moves out. In this callback, <span class="code">this</span> will be the <span class="code">Chart</span> object.
  1274. %h5 Default:
  1275. <code>function () {}</code>
  1276. %h5 Format:
  1277. %div.sourcecode
  1278. %pre
  1279. %code.html.javascript
  1280. data: {
  1281. &nbsp;&nbsp;onmouseout: function (d) { ... }
  1282. }
  1283. %hr
  1284. %section
  1285. %h3
  1286. = partial :reference_item_link, locals: { id: 'data.onselected' }
  1287. %p not yet
  1288. %hr
  1289. %section
  1290. %h3
  1291. = partial :reference_item_link, locals: { id: 'data.onunselected' }
  1292. %p not yet
  1293. %hr
  1294. %section
  1295. %h3
  1296. = partial :reference_item_link, locals: { id: 'data.ondragstart' }
  1297. %p not yet
  1298. %hr
  1299. %section
  1300. %h3
  1301. = partial :reference_item_link, locals: { id: 'data.ondragend' }
  1302. %p not yet
  1303. %hr
  1304. %section
  1305. %h3
  1306. = partial :reference_item_link, locals: { id: 'axis.rotated' }
  1307. %p Switch x and y axis position.
  1308. %h5 Default:
  1309. <code>false</code>
  1310. %h5 Format:
  1311. %div.sourcecode
  1312. %pre
  1313. %code.html.javascript
  1314. axis: {
  1315. &nbsp;&nbsp;rotated: true
  1316. }
  1317. %h5 Example:
  1318. %ul
  1319. %li
  1320. %a( href="/samples/axes_rotated.html" ) Rotated Axis
  1321. %hr
  1322. %section
  1323. %h3
  1324. = partial :reference_item_link, locals: { id: 'axis.x.show' }
  1325. %p Show or hide x axis.
  1326. %h5 Default:
  1327. <code>true</code>
  1328. %h5 Format:
  1329. %div.sourcecode
  1330. %pre
  1331. %code.html.javascript
  1332. axis: {
  1333. &nbsp;&nbsp;x: {
  1334. &nbsp;&nbsp;&nbsp;&nbsp;show: true
  1335. &nbsp;&nbsp;}
  1336. }
  1337. %hr
  1338. %section
  1339. %h3
  1340. = partial :reference_item_link, locals: { id: 'axis.x.type' }
  1341. %p Set type of x axis.
  1342. %h5 Available Values
  1343. %ul
  1344. %li timeseries
  1345. %li category
  1346. %li indexed
  1347. %h5 Default:
  1348. <code>indexed</code>
  1349. %h5 Format:
  1350. %div.sourcecode
  1351. %pre
  1352. %code.html.javascript
  1353. axis: {
  1354. &nbsp;&nbsp;x: {
  1355. &nbsp;&nbsp;&nbsp;&nbsp;type: 'timeseries'
  1356. &nbsp;&nbsp;}
  1357. }
  1358. %h5 Example:
  1359. %ul
  1360. %li
  1361. %a( href="/samples/timeseries.html" ) Timeseries Chart
  1362. %li
  1363. %a( href="/samples/categorized.html" ) Category Axis
  1364. %hr
  1365. %section
  1366. %h3
  1367. = partial :reference_item_link, locals: { id: 'axis.x.localtime' }
  1368. %p Set how to treat the timezone of x values.
  1369. %br
  1370. %p If true, treat x value as localtime. If false, convert to UTC internally.
  1371. %h5 Default:
  1372. <code>true</code>
  1373. %h5 Format:
  1374. %div.sourcecode
  1375. %pre
  1376. %code.html.javascript
  1377. axis: {
  1378. &nbsp;&nbsp;x: {
  1379. &nbsp;&nbsp;&nbsp;&nbsp;localtime: true
  1380. &nbsp;&nbsp;}
  1381. }
  1382. %h5 Example:
  1383. %ul
  1384. %li
  1385. %a( href="/samples/axes_x_localtime.html" ) X Axis Timezone
  1386. %hr
  1387. %section
  1388. %h3
  1389. = partial :reference_item_link, locals: { id: 'axis.x.categories' }
  1390. %p Set category names on category axis.
  1391. %br
  1392. %p This must be an array that includes category names in string. If category names are included in the date by <span class="code">data.x</span> option, this is not required.
  1393. %h5 Default:
  1394. <code>[]</code>
  1395. %h5 Format:
  1396. %div.sourcecode
  1397. %pre
  1398. %code.html.javascript
  1399. axis: {
  1400. &nbsp;&nbsp;x: {
  1401. &nbsp;&nbsp;&nbsp;&nbsp;categories: ['Category 1', 'Category 2', ...]
  1402. &nbsp;&nbsp;}
  1403. }
  1404. %h5 Example:
  1405. %ul
  1406. %li
  1407. %a( href="/samples/categorized.html" ) Category Axis
  1408. %hr
  1409. %section
  1410. %h3
  1411. = partial :reference_item_link, locals: { id: 'axis.x.tick.centered' }
  1412. %p Centerise ticks on category axis.
  1413. %h5 Default:
  1414. <code>false</code>
  1415. %h5 Format:
  1416. %div.sourcecode
  1417. %pre
  1418. %code.html.javascript
  1419. axis: {
  1420. &nbsp;&nbsp;x: {
  1421. &nbsp;&nbsp;&nbsp;&nbsp;tick: {
  1422. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;centered: true
  1423. &nbsp;&nbsp;&nbsp;&nbsp;}
  1424. &nbsp;&nbsp;}
  1425. }
  1426. %hr
  1427. %section
  1428. %h3
  1429. = partial :reference_item_link, locals: { id: 'axis.x.tick.format' }
  1430. %p A function to format tick value. Format string is also available for timeseries data.
  1431. %h5 Default:
  1432. <code>undefined</code>
  1433. %h5 Format:
  1434. %div.sourcecode
  1435. %pre
  1436. %code.html.javascript
  1437. axis: {
  1438. &nbsp;&nbsp;x: {
  1439. &nbsp;&nbsp;&nbsp;&nbsp;tick: {
  1440. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;format: function (x) { return x.getFullYear(); }
  1441. &nbsp;&nbsp;&nbsp;&nbsp;}
  1442. &nbsp;&nbsp;}
  1443. }
  1444. %hr
  1445. %section
  1446. %h3
  1447. = partial :reference_item_link, locals: { id: 'axis.x.tick.culling' }
  1448. %p Setting for culling ticks.
  1449. %br
  1450. %p If <code>true</code> is set, the ticks will be culled, then only limitted tick text will be shown. This option does not hide the tick lines. If <code>false</code> is set, all of ticks will be shown.
  1451. %br
  1452. %p We can change the number of ticks to be shown by <a href="#axis-x-tick-culling-max">axis.x.tick.culling.max</a>.
  1453. %h5 Default:
  1454. %ul
  1455. %li <code>true</code> for indexed axis and timeseries axis
  1456. %li <code>false</code> for category axis
  1457. %h5 Format:
  1458. %div.sourcecode
  1459. %pre
  1460. %code.html.javascript
  1461. axis: {
  1462. &nbsp;&nbsp;x: {
  1463. &nbsp;&nbsp;&nbsp;&nbsp;tick: {
  1464. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;culling: false
  1465. &nbsp;&nbsp;&nbsp;&nbsp;}
  1466. &nbsp;&nbsp;}
  1467. }
  1468. %h5 Example:
  1469. %ul
  1470. %li
  1471. %a( href="/samples/axes_x_tick_culling.html" ) X Axis Tick Culling
  1472. %hr
  1473. %section
  1474. %h3
  1475. = partial :reference_item_link, locals: { id: 'axis.x.tick.culling.max' }
  1476. %p The number of tick texts will be adjusted to less than this value.
  1477. %h5 Default:
  1478. <code>10</code>
  1479. %h5 Format:
  1480. %div.sourcecode
  1481. %pre
  1482. %code.html.javascript
  1483. axis: {
  1484. &nbsp;&nbsp;x: {
  1485. &nbsp;&nbsp;&nbsp;&nbsp;tick: {
  1486. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;culling: {
  1487. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;max: 5
  1488. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
  1489. &nbsp;&nbsp;&nbsp;&nbsp;}
  1490. &nbsp;&nbsp;}
  1491. }
  1492. %h5 Example:
  1493. %ul
  1494. %li
  1495. %a( href="/samples/axes_x_tick_culling.html" ) X Axis Tick Culling
  1496. %hr
  1497. %section
  1498. %h3
  1499. = partial :reference_item_link, locals: { id: 'axis.x.tick.count' }
  1500. %p The number of x axis ticks to show.
  1501. %br
  1502. %p This option hides tick lines together with tick text. If this option is used on timeseries axis, the ticks position will be determined precisely and not nicely positioned (e.g. it will have rough second value).
  1503. %h5 Default:
  1504. <code>undefined</code>
  1505. %h5 Format:
  1506. %div.sourcecode
  1507. %pre
  1508. %code.html.javascript
  1509. axis: {
  1510. &nbsp;&nbsp;x: {
  1511. &nbsp;&nbsp;&nbsp;&nbsp;tick: {
  1512. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;count: 5
  1513. &nbsp;&nbsp;&nbsp;&nbsp;}
  1514. &nbsp;&nbsp;}
  1515. }
  1516. %h5 Example:
  1517. %ul
  1518. %li
  1519. %a( href="/samples/axes_x_tick_count.html" ) X Axis Tick Count
  1520. %hr
  1521. %section
  1522. %h3
  1523. = partial :reference_item_link, locals: { id: 'axis.x.tick.fit' }
  1524. %p Fit x axis ticks.
  1525. %br
  1526. %p If <code>true</code> set, the ticks will be positioned nicely. If <code>false</code> set, the ticks will be positioned according to x value of the data points.
  1527. %h5 Default:
  1528. <code>true</code>
  1529. %h5 Format:
  1530. %div.sourcecode
  1531. %pre
  1532. %code.html.javascript
  1533. axis: {
  1534. &nbsp;&nbsp;x: {
  1535. &nbsp;&nbsp;&nbsp;&nbsp;tick: {
  1536. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fit: true
  1537. &nbsp;&nbsp;&nbsp;&nbsp;}
  1538. &nbsp;&nbsp;}
  1539. }
  1540. %h5 Example:
  1541. %ul
  1542. %li
  1543. %a( href="/samples/axes_x_tick_fit.html" ) X Axis Tick Fit
  1544. %hr
  1545. %section
  1546. %h3
  1547. = partial :reference_item_link, locals: { id: 'axis.x.tick.values' }
  1548. %p Set the x values of ticks manually.
  1549. %br
  1550. %p If this option is provided, the position of the ticks will be determined based on those values. This option works with timeseries data and the x values will be parsed accoding to the type of the value and <a href="#data-xFormat">data.xFormat</a> option.
  1551. %h5 Default:
  1552. <code>null</code>
  1553. %h5 Format:
  1554. %div.sourcecode
  1555. %pre
  1556. %code.html.javascript
  1557. axis: {
  1558. &nbsp;&nbsp;x: {
  1559. &nbsp;&nbsp;&nbsp;&nbsp;tick: {
  1560. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;values: [1, 2, 4, 8, 16, 32, ...]
  1561. &nbsp;&nbsp;&nbsp;&nbsp;}
  1562. &nbsp;&nbsp;}
  1563. }
  1564. %h5 Example:
  1565. %ul
  1566. %li
  1567. %a( href="/samples/axes_x_tick_values.html" ) X Axis Tick Values
  1568. %hr
  1569. %section
  1570. %h3
  1571. = partial :reference_item_link, locals: { id: 'axis.x.tick.rotate' }
  1572. %p Rotate x axis tick text.
  1573. %br
  1574. %p If you set negative value, it will rotate to opposite direction.
  1575. %h5 Default:
  1576. <code>0</code>
  1577. %h5 Format:
  1578. %div.sourcecode
  1579. %pre
  1580. %code.html.javascript
  1581. axis: {
  1582. &nbsp;&nbsp;x: {
  1583. &nbsp;&nbsp;&nbsp;&nbsp;tick: {
  1584. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rotate: 60
  1585. &nbsp;&nbsp;&nbsp;&nbsp;}
  1586. &nbsp;&nbsp;}
  1587. }
  1588. %h5 Example:
  1589. %ul
  1590. %li
  1591. %a( href="/samples/axes_x_tick_rotate.html" ) Rotate X Axis Tick Text
  1592. %hr
  1593. %section
  1594. %h3
  1595. = partial :reference_item_link, locals: { id: 'axis.x.tick.outer' }
  1596. %p Show x axis outer tick.
  1597. %h5 Default:
  1598. <code>true</code>
  1599. %h5 Format:
  1600. %div.sourcecode
  1601. %pre
  1602. %code.html.javascript
  1603. axis: {
  1604. &nbsp;&nbsp;x: {
  1605. &nbsp;&nbsp;&nbsp;&nbsp;tick: {
  1606. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;outer: false
  1607. &nbsp;&nbsp;&nbsp;&nbsp;}
  1608. &nbsp;&nbsp;}
  1609. }
  1610. %hr
  1611. %section
  1612. %h3
  1613. = partial :reference_item_link, locals: { id: 'axis.x.tick.multiline' }
  1614. %p Enable multiline.
  1615. %br
  1616. %p If this option is set <code>true</code>, when a tick's text on the x-axis is too long, it splits the text into multiple lines in order to avoid text overlapping.
  1617. %h5 Default:
  1618. <code>true</code>
  1619. %h5 Format:
  1620. %div.sourcecode
  1621. %pre
  1622. %code.html.javascript
  1623. axis: {
  1624. &nbsp;&nbsp;x: {
  1625. &nbsp;&nbsp;&nbsp;&nbsp;tick: {
  1626. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;multiline: true
  1627. &nbsp;&nbsp;&nbsp;}
  1628. &nbsp;&nbsp;}
  1629. }
  1630. %hr
  1631. %section
  1632. %h3
  1633. = partial :reference_item_link, locals: { id: 'axis.x.tick.multilineMax' }
  1634. %p If this option is set and is above <code>0</code>, the number of lines will be adjusted to less than this value and tick's text is ellipsified.
  1635. %br
  1636. %h5 Default:
  1637. <code>0</code>
  1638. %h5 Format:
  1639. %div.sourcecode
  1640. %pre
  1641. %code.html.javascript
  1642. axis: {
  1643. &nbsp;&nbsp;x: {
  1644. &nbsp;&nbsp;&nbsp;&nbsp;tick: {
  1645. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;multiline: true,
  1646. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;multilineMax: 2,
  1647. &nbsp;&nbsp;&nbsp;}
  1648. &nbsp;&nbsp;}
  1649. }
  1650. %hr
  1651. %section
  1652. %h3
  1653. = partial :reference_item_link, locals: { id: 'axis.x.tick.width' }
  1654. %p not yet
  1655. %hr
  1656. %section
  1657. %h3
  1658. = partial :reference_item_link, locals: { id: 'axis.x.max' }
  1659. %p Set max value of x axis range.
  1660. %h5 Default:
  1661. <code>undefined</code>
  1662. %h5 Format:
  1663. %div.sourcecode
  1664. %pre
  1665. %code.html.javascript
  1666. axis: {
  1667. &nbsp;&nbsp;x: {
  1668. &nbsp;&nbsp;&nbsp;&nbsp;max: 100
  1669. &nbsp;&nbsp;}
  1670. }
  1671. %hr
  1672. %section
  1673. %h3
  1674. = partial :reference_item_link, locals: { id: 'axis.x.min' }
  1675. %p Set min value of x axis range.
  1676. %h5 Default:
  1677. <code>undefined</code>
  1678. %h5 Format:
  1679. %div.sourcecode
  1680. %pre
  1681. %code.html.javascript
  1682. axis: {
  1683. &nbsp;&nbsp;x: {
  1684. &nbsp;&nbsp;&nbsp;&nbsp;min: -100
  1685. &nbsp;&nbsp;}
  1686. }
  1687. %hr
  1688. %section
  1689. %h3
  1690. = partial :reference_item_link, locals: { id: 'axis.x.padding' }
  1691. %p Set padding for x axis.
  1692. %br
  1693. %p If this option is set, the range of x axis will increase/decrease according to the values. If no padding is needed in the ragen of x axis, <code>0</code> should be set. On category axis, this option will be ignored.
  1694. %h5 Default:
  1695. <code>{}</code>
  1696. %h5 Format:
  1697. %div.sourcecode
  1698. %pre
  1699. %code.html.javascript
  1700. axis: {
  1701. &nbsp;&nbsp;x: {
  1702. &nbsp;&nbsp;&nbsp;&nbsp;padding: {
  1703. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;left: 0,
  1704. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;right: 0
  1705. &nbsp;&nbsp;&nbsp;&nbsp;}
  1706. &nbsp;&nbsp;}
  1707. }
  1708. %hr
  1709. %section
  1710. %h3
  1711. = partial :reference_item_link, locals: { id: 'axis.x.height' }
  1712. %p Set height of x axis.
  1713. %br
  1714. %p The height of x axis can be set manually by this option. If you need more space for x axis, please use this option for that. The unit is <code>pixel</code>.
  1715. %h5 Default:
  1716. <code>undefined</code>
  1717. %h5 Format:
  1718. %div.sourcecode
  1719. %pre
  1720. %code.html.javascript
  1721. axis: {
  1722. &nbsp;&nbsp;x: {
  1723. &nbsp;&nbsp;&nbsp;&nbsp;height: 20
  1724. &nbsp;&nbsp;}
  1725. }
  1726. %hr
  1727. %section
  1728. %h3
  1729. = partial :reference_item_link, locals: { id: 'axis.x.extent' }
  1730. %p Set default extent for subchart and zoom. This can be an array or function that returns an array.
  1731. %h5 Default:
  1732. <code>undefined</code>
  1733. %h5 Format:
  1734. %div.sourcecode
  1735. %pre
  1736. %code.html.javascript
  1737. axis: {
  1738. &nbsp;&nbsp;x: {
  1739. &nbsp;&nbsp;&nbsp;&nbsp;extent: [5, 10]
  1740. &nbsp;&nbsp;}
  1741. }
  1742. %hr
  1743. %section
  1744. %h3
  1745. = partial :reference_item_link, locals: { id: 'axis.x.label' }
  1746. %p Set label on x axis.
  1747. %br
  1748. %p You can set x axis label and change its position by this option. <code>string</code> and <code>object</code> can be passed and we can change the position by passing <code>object</code> that has <span class="code">position</span> key. Available position differs according to the axis direction (vertical or horizontal). If <code>string</code> set, the position will be the default.
  1749. %br
  1750. %p If it's horizontal axis:
  1751. %ul
  1752. %li inner-right <code>[default]</code>
  1753. %li inner-center
  1754. %li inner-left
  1755. %li outer-right
  1756. %li outer-center
  1757. %li outer-left
  1758. %p If it's vertical axis:
  1759. %ul
  1760. %li inner-top <code>[default]</code>
  1761. %li inner-middle
  1762. %li inner-bottom
  1763. %li outer-top
  1764. %li outer-middle
  1765. %li outer-bottom
  1766. %h5 Default:
  1767. <code>undefined</code>
  1768. %h5 Format:
  1769. %div.sourcecode
  1770. %pre
  1771. %code.html.javascript
  1772. axis: {
  1773. &nbsp;&nbsp;x: {
  1774. &nbsp;&nbsp;&nbsp;&nbsp;label: 'Your X Axis'
  1775. &nbsp;&nbsp;}
  1776. }
  1777. %div.sourcecode
  1778. %pre
  1779. %code.html.javascript
  1780. axis: {
  1781. &nbsp;&nbsp;x: {
  1782. &nbsp;&nbsp;&nbsp;&nbsp;label: {
  1783. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;text: 'Your X Axis',
  1784. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position: 'outer-center'
  1785. &nbsp;&nbsp;&nbsp;&nbsp;}
  1786. &nbsp;&nbsp;}
  1787. }
  1788. %h5 Example:
  1789. %ul
  1790. %li
  1791. %a( href="/samples/axes_label.html" ) Axis Label
  1792. %li
  1793. %a( href="/samples/axes_label_position.html" ) Axis Label Position
  1794. %hr
  1795. %section
  1796. %h3
  1797. = partial :reference_item_link, locals: { id: 'axis.y.show' }
  1798. %p Show or hide y axis.
  1799. %h5 Default:
  1800. <code>true</code>
  1801. %h5 Format:
  1802. %div.sourcecode
  1803. %pre
  1804. %code.html.javascript
  1805. axis: {
  1806. &nbsp;&nbsp;y: {
  1807. &nbsp;&nbsp;&nbsp;&nbsp;show: false
  1808. &nbsp;&nbsp;}
  1809. }
  1810. %hr
  1811. %section
  1812. %h3
  1813. = partial :reference_item_link, locals: { id: 'axis.y.inner' }
  1814. %p Show y axis inside of the chart.
  1815. %h5 Default:
  1816. <code>false</code>
  1817. %h5 Format:
  1818. %div.sourcecode
  1819. %pre
  1820. %code.html.javascript
  1821. axis: {
  1822. &nbsp;&nbsp;y: {
  1823. &nbsp;&nbsp;&nbsp;&nbsp;inner: true
  1824. &nbsp;&nbsp;}
  1825. }
  1826. %hr
  1827. %section
  1828. %h3
  1829. = partial :reference_item_link, locals: { id: 'axis.y.type' }
  1830. %p Scale type for Y axis.
  1831. %h5 Available Values:
  1832. %ul
  1833. %li linear
  1834. %li time¹
  1835. %li timeseries¹
  1836. %li log² <span class="secondary label">Experimental</span>
  1837. %p ¹: The <code>timeseries</code> scale is an alias of <code>time</code>.
  1838. %p ²: The <code>log</code> scale is experimental and may not work in all cases (stacked, etc.)
  1839. %h5 Default:
  1840. <code>linear</code>
  1841. %h5 Format:
  1842. %div.sourcecode
  1843. %pre
  1844. %code.html.javascript
  1845. axis: {
  1846. &nbsp;&nbsp;y: {
  1847. &nbsp;&nbsp;&nbsp;&nbsp;type: 'linear'
  1848. &nbsp;&nbsp;}
  1849. }
  1850. %hr
  1851. %section
  1852. %h3
  1853. = partial :reference_item_link, locals: { id: 'axis.y.max' }
  1854. %p Set max value of y axis.
  1855. %h5 Note:
  1856. %p Padding will be added based on this value, so if you don't need the padding, please set <span class="code">axis.y.padding</span> to disable it (e.g. <span class="code">axis.y.padding = 0</span>).
  1857. %h5 Default:
  1858. <code>undefined</code>
  1859. %h5 Format:
  1860. %div.sourcecode
  1861. %pre
  1862. %code.html.javascript
  1863. axis: {
  1864. &nbsp;&nbsp;y: {
  1865. &nbsp;&nbsp;&nbsp;&nbsp;max: 1000
  1866. &nbsp;&nbsp;}
  1867. }
  1868. %h5 Example:
  1869. %ul
  1870. %li
  1871. %a( href="/samples/axes_y_range.html" ) Y Axis Range
  1872. %hr
  1873. %section
  1874. %h3
  1875. = partial :reference_item_link, locals: { id: 'axis.y.min' }
  1876. %p Set min value of y axis.
  1877. %h5 Note:
  1878. %p Padding will be added based on this value, so if you don't need the padding, please set <span class="code">axis.y.padding</span> to disable it (e.g. <span class="code">axis.y.padding = 0</span>).
  1879. %h5 Default:
  1880. <code>undefined</code>
  1881. %h5 Format:
  1882. %div.sourcecode
  1883. %pre
  1884. %code.html.javascript
  1885. axis: {
  1886. &nbsp;&nbsp;y: {
  1887. &nbsp;&nbsp;&nbsp;&nbsp;min: 1000
  1888. &nbsp;&nbsp;}
  1889. }
  1890. %h5 Example:
  1891. %ul
  1892. %li
  1893. %a( href="/samples/axes_y_range.html" ) Y Axis Range
  1894. %hr
  1895. %section
  1896. %h3
  1897. = partial :reference_item_link, locals: { id: 'axis.y.inverted' }
  1898. %p Change the direction of y axis.
  1899. %br
  1900. %p If <code>true</code> set, the direction will be from the top to the bottom.
  1901. %h5 Default:
  1902. <code>false</code>
  1903. %h5 Format:
  1904. %div.sourcecode
  1905. %pre
  1906. %code.html.javascript
  1907. axis: {
  1908. &nbsp;&nbsp;y: {
  1909. &nbsp;&nbsp;&nbsp;&nbsp;inverted: true
  1910. &nbsp;&nbsp;}
  1911. }
  1912. %hr
  1913. %section
  1914. %h3
  1915. = partial :reference_item_link, locals: { id: 'axis.y.center' }
  1916. %p Set center value of y axis.
  1917. %h5 Default:
  1918. <code>undefined</code>
  1919. %h5 Format:
  1920. %div.sourcecode
  1921. %pre
  1922. %code.html.javascript
  1923. axis: {
  1924. &nbsp;&nbsp;y: {
  1925. &nbsp;&nbsp;&nbsp;&nbsp;center: 0
  1926. &nbsp;&nbsp;}
  1927. }
  1928. %hr
  1929. %section
  1930. %h3
  1931. = partial :reference_item_link, locals: { id: 'axis.y.label' }
  1932. %p Set label on y axis.
  1933. %br
  1934. %p You can set y axis label and change its position by this option. This option works in the same way as <a href="#axis-x-label">axis.x.label</a>.
  1935. %h5 Default:
  1936. <code>undefined</code>
  1937. %h5 Format:
  1938. %div.sourcecode
  1939. %pre
  1940. %code.html.javascript
  1941. axis: {
  1942. &nbsp;&nbsp;y: {
  1943. &nbsp;&nbsp;&nbsp;&nbsp;label: 'Your Y Axis'
  1944. &nbsp;&nbsp;}
  1945. }
  1946. %div.sourcecode
  1947. %pre
  1948. %code.html.javascript
  1949. axis: {
  1950. &nbsp;&nbsp;y: {
  1951. &nbsp;&nbsp;&nbsp;&nbsp;label: {
  1952. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;text: 'Your Y Axis',
  1953. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position: 'outer-middle'
  1954. &nbsp;&nbsp;&nbsp;&nbsp;}
  1955. &nbsp;&nbsp;}
  1956. }
  1957. %h5 Example:
  1958. %ul
  1959. %li
  1960. %a( href="/samples/axes_label.html" ) Axis Label
  1961. %li
  1962. %a( href="/samples/axes_label_position.html" ) Axis Label Position
  1963. %hr
  1964. %section
  1965. %h3
  1966. = partial :reference_item_link, locals: { id: 'axis.y.tick.format' }
  1967. %p Set formatter for y axis tick text.
  1968. %br
  1969. %p This option accepts <span class="code">d3.format</span> object as well as a function you define.
  1970. %h5 Default:
  1971. <code>undefined</code>
  1972. %h5 Format:
  1973. %div.sourcecode
  1974. %pre
  1975. %code.html.javascript
  1976. axis: {
  1977. &nbsp;&nbsp;y: {
  1978. &nbsp;&nbsp;&nbsp;&nbsp;tick: {
  1979. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;format: d3.format('$,')
  1980. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//or format: function (d) { return '$' + d; }
  1981. &nbsp;&nbsp;&nbsp;&nbsp;}
  1982. &nbsp;&nbsp;}
  1983. }
  1984. %h5 Example:
  1985. %ul
  1986. %li
  1987. %a( href="/samples/axes_y_tick_format.html" ) Y Axis Tick Format
  1988. %hr
  1989. %section
  1990. %h3
  1991. = partial :reference_item_link, locals: { id: 'axis.y.tick.outer' }
  1992. %p Show or hide outer tick.
  1993. %h5 Default:
  1994. <code>undefined</code>
  1995. %h5 Format:
  1996. %div.sourcecode
  1997. %pre
  1998. %code.html.javascript
  1999. axis: {
  2000. &nbsp;&nbsp;y: {
  2001. &nbsp;&nbsp;&nbsp;&nbsp;tick: {
  2002. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;outer: false
  2003. &nbsp;&nbsp;&nbsp;&nbsp;}
  2004. &nbsp;&nbsp;}
  2005. }
  2006. %hr
  2007. %section
  2008. %h3
  2009. = partial :reference_item_link, locals: { id: 'axis.y.tick.values' }
  2010. %p Set y axis tick values manually.
  2011. %h5 Default:
  2012. <code>undefined</code>
  2013. %h5 Format:
  2014. %div.sourcecode
  2015. %pre
  2016. %code.html.javascript
  2017. axis: {
  2018. &nbsp;&nbsp;y: {
  2019. &nbsp;&nbsp;&nbsp;&nbsp;tick: {
  2020. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;values: [100, 1000, 10000]
  2021. &nbsp;&nbsp;&nbsp;&nbsp;}
  2022. &nbsp;&nbsp;}
  2023. }
  2024. %hr
  2025. %section
  2026. %h3
  2027. = partial :reference_item_link, locals: { id: 'axis.y.tick.count' }
  2028. %p Set the number of y axis ticks.
  2029. %h5 Note:
  2030. %p The position of the ticks will be calculated precisely, so the values on the ticks will not be rounded nicely. In the case, <span class="code">axis.y.tick.format</span> or <span class="code">axis.y.tick.values</span> will be helpful.
  2031. %h5 Default:
  2032. <code>undefined</code>
  2033. %h5 Format:
  2034. %div.sourcecode
  2035. %pre
  2036. %code.html.javascript
  2037. axis: {
  2038. &nbsp;&nbsp;y: {
  2039. &nbsp;&nbsp;&nbsp;&nbsp;tick: {
  2040. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;count: 5
  2041. &nbsp;&nbsp;&nbsp;&nbsp;}
  2042. &nbsp;&nbsp;}
  2043. }
  2044. %hr
  2045. %section
  2046. %h3
  2047. = partial :reference_item_link, locals: { id: 'axis.y.tick.time.value' }
  2048. %p not yet
  2049. %hr
  2050. %section
  2051. %h3
  2052. = partial :reference_item_link, locals: { id: 'axis.y.tick.time.interval' }
  2053. %p not yet
  2054. %hr
  2055. %section
  2056. %h3
  2057. = partial :reference_item_link, locals: { id: 'axis.y.padding' }
  2058. %p Set padding for y axis.
  2059. %br
  2060. %p You can set padding for y axis to create more space on the edge of the axis. This option accepts <code>object</code> and it can include <span class="code">top</span> and <span class="code">bottom</span>. <span class="code">top</span>, <span class="code">bottom</span> will be treated as pixels.
  2061. %h5 Default:
  2062. <code>undefined</code>
  2063. %h5 Format:
  2064. %div.sourcecode
  2065. %pre
  2066. %code.html.javascript
  2067. axis: {
  2068. &nbsp;&nbsp;y: {
  2069. &nbsp;&nbsp;&nbsp;&nbsp;padding: {
  2070. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;top: 100,
  2071. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bottom: 100
  2072. &nbsp;&nbsp;&nbsp;&nbsp;}
  2073. &nbsp;&nbsp;}
  2074. }
  2075. %h5 Example:
  2076. %ul
  2077. %li
  2078. %a( href="/samples/axes_y_padding.html" ) Y Axis Tick Padding
  2079. %hr
  2080. %section
  2081. %h3
  2082. = partial :reference_item_link, locals: { id: 'axis.y.default' }
  2083. %p Set default range of y axis.
  2084. %br
  2085. %p This option set the default value for y axis when there is no data on init.
  2086. %h5 Default:
  2087. <code>undefined</code>
  2088. %h5 Format:
  2089. %div.sourcecode
  2090. %pre
  2091. %code.html.javascript
  2092. axis: {
  2093. &nbsp;&nbsp;y: {
  2094. &nbsp;&nbsp;&nbsp;&nbsp;default: [0, 1000]
  2095. &nbsp;&nbsp;}
  2096. }
  2097. %hr
  2098. %section
  2099. %h3
  2100. = partial :reference_item_link, locals: { id: 'axis.y2.show' }
  2101. %p Show or hide y2 axis.
  2102. %h5 Default:
  2103. <code>false</code>
  2104. %h5 Format:
  2105. %div.sourcecode
  2106. %pre
  2107. %code.html.javascript
  2108. axis: {
  2109. &nbsp;&nbsp;y2: {
  2110. &nbsp;&nbsp;&nbsp;&nbsp;show: true
  2111. &nbsp;&nbsp;}
  2112. }
  2113. %hr
  2114. %section
  2115. %h3
  2116. = partial :reference_item_link, locals: { id: 'axis.y2.inner' }
  2117. %p Show y2 axis inside of the chart.
  2118. %h5 Default:
  2119. <code>false</code>
  2120. %h5 Format:
  2121. %div.sourcecode
  2122. %pre
  2123. %code.html.javascript
  2124. axis: {
  2125. &nbsp;&nbsp;y2: {
  2126. &nbsp;&nbsp;&nbsp;&nbsp;inner: true
  2127. &nbsp;&nbsp;}
  2128. }
  2129. %hr
  2130. %section
  2131. %h3
  2132. = partial :reference_item_link, locals: { id: 'axis.y2.type' }
  2133. %p Scale type for Y2 axis.
  2134. %h5 Available Values:
  2135. %ul
  2136. %li linear
  2137. %li time¹
  2138. %li timeseries¹
  2139. %li log² <span class="secondary label">Experimental</span>
  2140. %p ¹: The <code>timeseries</code> scale is an alias of <code>time</code>.
  2141. %p ²: The <code>log</code> scale is experimental and may not work in all cases (stacked, etc.)
  2142. %h5 Default:
  2143. <code>linear</code>
  2144. %h5 Format:
  2145. %div.sourcecode
  2146. %pre
  2147. %code.html.javascript
  2148. axis: {
  2149. &nbsp;&nbsp;y2: {
  2150. &nbsp;&nbsp;&nbsp;&nbsp;type: 'linear'
  2151. &nbsp;&nbsp;}
  2152. }
  2153. %hr
  2154. %section
  2155. %h3
  2156. = partial :reference_item_link, locals: { id: 'axis.y2.max' }
  2157. %p Set max value of y2 axis.
  2158. %h5 Default:
  2159. <code>undefined</code>
  2160. %h5 Format:
  2161. %div.sourcecode
  2162. %pre
  2163. %code.html.javascript
  2164. axis: {
  2165. &nbsp;&nbsp;y2: {
  2166. &nbsp;&nbsp;&nbsp;&nbsp;max: 1000
  2167. &nbsp;&nbsp;}
  2168. }
  2169. %hr
  2170. %section
  2171. %h3
  2172. = partial :reference_item_link, locals: { id: 'axis.y2.min' }
  2173. %p Set min value of y2 axis.
  2174. %h5 Default:
  2175. <code>undefined</code>
  2176. %h5 Format:
  2177. %div.sourcecode
  2178. %pre
  2179. %code.html.javascript
  2180. axis: {
  2181. &nbsp;&nbsp;y2: {
  2182. &nbsp;&nbsp;&nbsp;&nbsp;min: -1000
  2183. &nbsp;&nbsp;}
  2184. }
  2185. %hr
  2186. %section
  2187. %h3
  2188. = partial :reference_item_link, locals: { id: 'axis.y2.inverted' }
  2189. %p Change the direction of y2 axis.
  2190. %br
  2191. %p If <code>true</code> set, the direction will be from the top to the bottom.
  2192. %h5 Default:
  2193. <code>false</code>
  2194. %h5 Format:
  2195. %div.sourcecode
  2196. %pre
  2197. %code.html.javascript
  2198. axis: {
  2199. &nbsp;&nbsp;y2: {
  2200. &nbsp;&nbsp;&nbsp;&nbsp;inverted: true
  2201. &nbsp;&nbsp;}
  2202. }
  2203. %hr
  2204. %section
  2205. %h3
  2206. = partial :reference_item_link, locals: { id: 'axis.y2.center' }
  2207. %p Set center value of y2 axis.
  2208. %h5 Default:
  2209. <code>undefined</code>
  2210. %h5 Format:
  2211. %div.sourcecode
  2212. %pre
  2213. %code.html.javascript
  2214. axis: {
  2215. &nbsp;&nbsp;y2: {
  2216. &nbsp;&nbsp;&nbsp;&nbsp;center: 0
  2217. &nbsp;&nbsp;}
  2218. }
  2219. %hr
  2220. %section
  2221. %h3
  2222. = partial :reference_item_link, locals: { id: 'axis.y2.label' }
  2223. %p Set label on y2 axis.
  2224. %br
  2225. %p You can set y2 axis label and change its position by this option. This option works in the same way as <a href="#axis-x-label">axis.x.label</a>.
  2226. %h5 Default:
  2227. <code>undefined</code>
  2228. %h5 Format:
  2229. %div.sourcecode
  2230. %pre
  2231. %code.html.javascript
  2232. axis: {
  2233. &nbsp;&nbsp;y2: {
  2234. &nbsp;&nbsp;&nbsp;&nbsp;label: 'Your Y2 Axis'
  2235. &nbsp;&nbsp;}
  2236. }
  2237. %div.sourcecode
  2238. %pre
  2239. %code.html.javascript
  2240. axis: {
  2241. &nbsp;&nbsp;y2: {
  2242. &nbsp;&nbsp;&nbsp;&nbsp;label: {
  2243. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;text: 'Your Y2 Axis',
  2244. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position: 'outer-middle'
  2245. &nbsp;&nbsp;&nbsp;&nbsp;}
  2246. &nbsp;&nbsp;}
  2247. }
  2248. %h5 Example:
  2249. %ul
  2250. %li
  2251. %a( href="/samples/axes_label.html" ) Axis Label
  2252. %li
  2253. %a( href="/samples/axes_label_position.html" ) Axis Label Position
  2254. %hr
  2255. %section
  2256. %h3
  2257. = partial :reference_item_link, locals: { id: 'axis.y2.tick.format' }
  2258. %p Set formatter for y axis tick text.
  2259. %br
  2260. %p This option works in the same way as <a href="#axis-y-format">axis.y.format</a>.
  2261. %h5 Default:
  2262. <code>undefined</code>
  2263. %h5 Format:
  2264. %div.sourcecode
  2265. %pre
  2266. %code.html.javascript
  2267. axis: {
  2268. &nbsp;&nbsp;y2: {
  2269. &nbsp;&nbsp;&nbsp;&nbsp;tick: {
  2270. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;format: d3.format('$,')
  2271. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//or format: function (d) { return '$' + d; }
  2272. &nbsp;&nbsp;&nbsp;&nbsp;}
  2273. &nbsp;&nbsp;}
  2274. }
  2275. %hr
  2276. %section
  2277. %h3
  2278. = partial :reference_item_link, locals: { id: 'axis.y2.tick.outer' }
  2279. %p Show or hide y2 axis outer tick.
  2280. %h5 Default:
  2281. <code>undefined</code>
  2282. %h5 Format:
  2283. %div.sourcecode
  2284. %pre
  2285. %code.html.javascript
  2286. axis: {
  2287. &nbsp;&nbsp;y2: {
  2288. &nbsp;&nbsp;&nbsp;&nbsp;tick: {
  2289. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;outer: false
  2290. &nbsp;&nbsp;&nbsp;&nbsp;}
  2291. &nbsp;&nbsp;}
  2292. }
  2293. %hr
  2294. %section
  2295. %h3
  2296. = partial :reference_item_link, locals: { id: 'axis.y2.tick.values' }
  2297. %p Set y2 axis tick values manually.
  2298. %h5 Default:
  2299. <code>undefined</code>
  2300. %h5 Format:
  2301. %div.sourcecode
  2302. %pre
  2303. %code.html.javascript
  2304. axis: {
  2305. &nbsp;&nbsp;y2: {
  2306. &nbsp;&nbsp;&nbsp;&nbsp;tick: {
  2307. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;values: [100, 1000, 10000]
  2308. &nbsp;&nbsp;&nbsp;&nbsp;}
  2309. &nbsp;&nbsp;}
  2310. }
  2311. %hr
  2312. %section
  2313. %h3
  2314. = partial :reference_item_link, locals: { id: 'axis.y2.tick.count' }
  2315. %p Set the number of y2 axis ticks.
  2316. %h5 Note:
  2317. %p This works in the same way as <a href="#axis-y-tick-count">axis.y.tick.count</a>.
  2318. %h5 Default:
  2319. <code>undefined</code>
  2320. %h5 Format:
  2321. %div.sourcecode
  2322. %pre
  2323. %code.html.javascript
  2324. axis: {
  2325. &nbsp;&nbsp;y2: {
  2326. &nbsp;&nbsp;&nbsp;&nbsp;tick: {
  2327. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;count: 5
  2328. &nbsp;&nbsp;&nbsp;&nbsp;}
  2329. &nbsp;&nbsp;}
  2330. }
  2331. %hr
  2332. %section
  2333. %h3
  2334. = partial :reference_item_link, locals: { id: 'axis.y2.padding' }
  2335. %p Set padding for y2 axis.
  2336. %br
  2337. %p This works in the same way as <a href="#axis-y-padding">axis.y.padding</a>.
  2338. %h5 Default:
  2339. <code>undefined</code>
  2340. %h5 Format:
  2341. %div.sourcecode
  2342. %pre
  2343. %code.html.javascript
  2344. axis: {
  2345. &nbsp;&nbsp;y2: {
  2346. &nbsp;&nbsp;&nbsp;&nbsp;padding: {
  2347. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;top: 100,
  2348. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bottom: 100
  2349. &nbsp;&nbsp;&nbsp;&nbsp;}
  2350. &nbsp;&nbsp;}
  2351. }
  2352. %hr
  2353. %section
  2354. %h3
  2355. = partial :reference_item_link, locals: { id: 'axis.y2.default' }
  2356. %p Set default range of y2 axis.
  2357. %br
  2358. %p This option set the default value for y2 axis when there is no data on init.
  2359. %h5 Default:
  2360. <code>undefined</code>
  2361. %h5 Format:
  2362. %div.sourcecode
  2363. %pre
  2364. %code.html.javascript
  2365. axis: {
  2366. &nbsp;&nbsp;y2: {
  2367. &nbsp;&nbsp;&nbsp;&nbsp;default: [0, 1000]
  2368. &nbsp;&nbsp;}
  2369. }
  2370. %hr
  2371. %section
  2372. %h3
  2373. = partial :reference_item_link, locals: { id: 'grid.x.show' }
  2374. %p Show grids along x axis.
  2375. %br
  2376. %h5 Default:
  2377. <code>false</code>
  2378. %h5 Format:
  2379. %div.sourcecode
  2380. %pre
  2381. %code.html.javascript
  2382. grid: {
  2383. &nbsp;&nbsp;x: {
  2384. &nbsp;&nbsp;&nbsp;&nbsp;show: true
  2385. &nbsp;&nbsp;}
  2386. }
  2387. %h5 Example:
  2388. %ul
  2389. %li
  2390. %a( href="/samples/options_gridline.html" ) Grid Lines
  2391. %hr
  2392. %section
  2393. %h3
  2394. = partial :reference_item_link, locals: { id: 'grid.x.lines' }
  2395. %p Show additional grid lines along x axis.
  2396. %br
  2397. %p This option accepts <code>array</code> including <code>object</code> that has <span class="code">value</span>, <span class="code">text</span>, <span class="code">position</span> and <span class="code">class</span>. <span class="code">text</span>, <span class="code">position</span> and <span class="code">class</span> are optional. For <span class="code">position</span>, <span class="code">start</span>, <span class="code">middle</span> and <span class="code">end</span> (default) are available.
  2398. %p If x axis is category axis, <span class="code">value</span> can be category name. If x axis is timeseries axis, <span class="code">value</span> can be date string, Date object and unixtime integer.
  2399. %h5 Default:
  2400. <code>[]</code>
  2401. %h5 Format:
  2402. %div.sourcecode
  2403. %pre
  2404. %code.html.javascript
  2405. grid: {
  2406. &nbsp;&nbsp;x: {
  2407. &nbsp;&nbsp;&nbsp;&nbsp;lines: [
  2408. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{value: 2, text: 'Label on 2'},
  2409. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{value: 5, text: 'Label on 5', class: 'label-5'},
  2410. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{value: 6, text: 'Label on 6', position: 'start'}
  2411. &nbsp;&nbsp;&nbsp;&nbsp;]
  2412. &nbsp;&nbsp;}
  2413. }
  2414. %h5 Example:
  2415. %ul
  2416. %li
  2417. %a( href="/samples/grid_x_lines.html" ) Additional X Grid Lines
  2418. %hr
  2419. %section
  2420. %h3
  2421. = partial :reference_item_link, locals: { id: 'grid.y.show' }
  2422. %p Show grids along y axis.
  2423. %br
  2424. %h5 Default:
  2425. <code>false</code>
  2426. %h5 Format:
  2427. %div.sourcecode
  2428. %pre
  2429. %code.html.javascript
  2430. grid: {
  2431. &nbsp;&nbsp;y: {
  2432. &nbsp;&nbsp;&nbsp;&nbsp;show: true
  2433. &nbsp;&nbsp;}
  2434. }
  2435. %h5 Example:
  2436. %ul
  2437. %li
  2438. %a( href="/samples/options_gridline.html" ) Grid Lines
  2439. %hr
  2440. %section
  2441. %h3
  2442. = partial :reference_item_link, locals: { id: 'grid.y.lines' }
  2443. %p Show additional grid lines along y axis.
  2444. %br
  2445. %p This option accepts <code>array</code> including <code>object</code> that has <span class="code">value</span>, <span class="code">text</span>, <span class="code">position</span> and <span class="code">class</span>.
  2446. %h5 Default:
  2447. <code>[]</code>
  2448. %h5 Format:
  2449. %div.sourcecode
  2450. %pre
  2451. %code.html.javascript
  2452. grid: {
  2453. &nbsp;&nbsp;y: {
  2454. &nbsp;&nbsp;&nbsp;&nbsp;lines: [
  2455. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{value: 100, text: 'Label on 100'},
  2456. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{value: 200, text: 'Label on 200', class: 'label-200'},
  2457. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{value: 300, text: 'Label on 300', position: 'middle'}
  2458. &nbsp;&nbsp;&nbsp;&nbsp;]
  2459. &nbsp;&nbsp;}
  2460. }
  2461. %h5 Example:
  2462. %ul
  2463. %li
  2464. %a( href="/samples/grid_y_lines.html" ) Additional Y Grid Lines
  2465. %hr
  2466. %section
  2467. %h3
  2468. = partial :reference_item_link, locals: { id: 'grid.y.ticks' }
  2469. %p not yet
  2470. %hr
  2471. %section
  2472. %h3
  2473. = partial :reference_item_link, locals: { id: 'regions' }
  2474. %p Show rectangles inside the chart.
  2475. %br
  2476. %p This option accepts <code>array</code> including <code>object</code> that has <span class="code">axis</span>, <span class="code">start</span>, <span class="code">end</span> and <span class="code">class</span>. The keys <span class="code">start</span>, <span class="code">end</span> and <span class="code">class</span> are optional.
  2477. %p <span class="code">axis</span> must be <span class="code">x</span>, <span class="code">y</span> or <span class="code">y2</span>. <span class="code">start</span> and <span class="code">end</span> should be the value where regions start and end. If not specified, the edge values will be used. If timeseries x axis, date string, Date object and unixtime integer can be used. If <span class="code">class</span> is set, the region element will have it as class.
  2478. %h5 Default:
  2479. <code>[]</code>
  2480. %h5 Format:
  2481. %div.sourcecode
  2482. %pre
  2483. %code.html.javascript
  2484. regions: [
  2485. &nbsp;&nbsp;{axis: 'x', start: 1, end: 4, class: 'region-1-4'}
  2486. ]
  2487. %h5 Example:
  2488. %ul
  2489. %li
  2490. %a( href="/samples/region.html" ) Regions
  2491. %hr
  2492. %section
  2493. %h3
  2494. = partial :reference_item_link, locals: { id: 'legend.show' }
  2495. %p Show or hide legend.
  2496. %h5 Default:
  2497. <code>true</code>
  2498. %h5 Format:
  2499. %div.sourcecode
  2500. %pre
  2501. %code.html.javascript
  2502. legend: {
  2503. &nbsp;&nbsp;show: true
  2504. }
  2505. %h5 Example:
  2506. %ul
  2507. %li
  2508. %a( href="/samples/options_legend.html" ) Hide Legend
  2509. %hr
  2510. %section
  2511. %h3
  2512. = partial :reference_item_link, locals: { id: 'legend.hide' }
  2513. %p Hide legend
  2514. %br
  2515. %p If <code>true</code> given, all legend will be hidden. If <code>string</code> or <code>array</code> given, only the legend that has the id will be hidden.
  2516. %h5 Default:
  2517. <code>false</code>
  2518. %h5 Format:
  2519. %div.sourcecode
  2520. %pre
  2521. %code.html.javascript
  2522. legend: {
  2523. &nbsp;&nbsp;hide: true
  2524. &nbsp;&nbsp;//or hide: 'data1'
  2525. &nbsp;&nbsp;//or hide: ['data1', 'data2']
  2526. }
  2527. %hr
  2528. %section
  2529. %h3
  2530. = partial :reference_item_link, locals: { id: 'legend.position' }
  2531. %p Change the position of legend.
  2532. %br
  2533. %p Currently <span class="code">bottom</span>, <span class="code">right</span> and <span class="code">inset</span> are supported.
  2534. %h5 Default:
  2535. <code>bottom</code>
  2536. %h5 Format:
  2537. %div.sourcecode
  2538. %pre
  2539. %code.html.javascript
  2540. legend: {
  2541. &nbsp;&nbsp;position: 'bottom'
  2542. }
  2543. %h5 Example:
  2544. %ul
  2545. %li
  2546. %a( href="/samples/legend_position.html" ) Legend Position
  2547. %hr
  2548. %section
  2549. %h3
  2550. = partial :reference_item_link, locals: { id: 'legend.inset' }
  2551. %p Change inset legend attributes.
  2552. %br
  2553. %p This option accepts <code>object</code> that has the keys <span class="code">anchor</span>, <span class="code">x</span>, <span class="code">y</span> and <span class="code">step</span>.
  2554. %p <span class="code">anchor</span> decides the position of the legend. These anchors are available:
  2555. %ul
  2556. %li top-left
  2557. %li top-right
  2558. %li bottom-left
  2559. %li bottom-right
  2560. %p <span class="code">x</span> and <span class="code">y</span> set the position of the legend based on the anchor.
  2561. %p <span class="code">step</span> defines the max step the legend has (e.g. If 2 set and legend has 3 legend item, the legend 2 columns).
  2562. %h5 Default:
  2563. %div.sourcecode
  2564. %pre
  2565. %code.html.javascript
  2566. {
  2567. &nbsp;&nbsp;anchor: 'top-left',
  2568. &nbsp;&nbsp;x: 10,
  2569. &nbsp;&nbsp;y: 0,
  2570. &nbsp;&nbsp;step: undefined
  2571. }
  2572. %h5 Format:
  2573. %div.sourcecode
  2574. %pre
  2575. %code.html.javascript
  2576. legend: {
  2577. &nbsp;&nbsp;inset: {
  2578. &nbsp;&nbsp;&nbsp;&nbsp;anchor: 'top-right',
  2579. &nbsp;&nbsp;&nbsp;&nbsp;x: 20,
  2580. &nbsp;&nbsp;&nbsp;&nbsp;y: 10,
  2581. &nbsp;&nbsp;&nbsp;&nbsp;step: 2
  2582. &nbsp;&nbsp;}
  2583. }
  2584. %hr
  2585. %section
  2586. %h3
  2587. = partial :reference_item_link, locals: { id: 'legend.item.onclick' }
  2588. %p Set click event handler to the legend item.
  2589. %h5 Default:
  2590. <code>undefined</code>
  2591. %h5 Format:
  2592. %div.sourcecode
  2593. %pre
  2594. %code.html.javascript
  2595. legend: {
  2596. &nbsp;&nbsp;item: {
  2597. &nbsp;&nbsp;&nbsp;&nbsp;onclick: function (id) { ... }
  2598. &nbsp;&nbsp;}
  2599. }
  2600. %h5 Example:
  2601. %ul
  2602. %li
  2603. %a( href="/samples/legend_custom.html" ) Custom Legend
  2604. %hr
  2605. %section
  2606. %h3
  2607. = partial :reference_item_link, locals: { id: 'legend.item.onmouseover' }
  2608. %p Set mouseover event handler to the legend item.
  2609. %h5 Default:
  2610. <code>undefined</code>
  2611. %h5 Format:
  2612. %div.sourcecode
  2613. %pre
  2614. %code.html.javascript
  2615. legend: {
  2616. &nbsp;&nbsp;item: {
  2617. &nbsp;&nbsp;&nbsp;&nbsp;onmouseover: function (id) { ... }
  2618. &nbsp;&nbsp;}
  2619. }
  2620. %h5 Example:
  2621. %ul
  2622. %li
  2623. %a( href="/samples/legend_custom.html" ) Custom Legend
  2624. %hr
  2625. %section
  2626. %h3
  2627. = partial :reference_item_link, locals: { id: 'legend.item.onmouseout' }
  2628. %p Set mouseout event handler to the legend item.
  2629. %h5 Default:
  2630. <code>undefined</code>
  2631. %h5 Format:
  2632. %div.sourcecode
  2633. %pre
  2634. %code.html.javascript
  2635. legend: {
  2636. &nbsp;&nbsp;item: {
  2637. &nbsp;&nbsp;&nbsp;&nbsp;onmouseout: function (id) { ... }
  2638. &nbsp;&nbsp;}
  2639. }
  2640. %h5 Example:
  2641. %ul
  2642. %li
  2643. %a( href="/samples/legend_custom.html" ) Custom Legend
  2644. %hr
  2645. %section
  2646. %h3
  2647. = partial :reference_item_link, locals: { id: 'tooltip.show' }
  2648. %p Show or hide tooltip.
  2649. %h5 Default:
  2650. <code>true</code>
  2651. %h5 Format:
  2652. %div.sourcecode
  2653. %pre
  2654. %code.html.javascript
  2655. tooltip: {
  2656. &nbsp;&nbsp;show: false
  2657. }
  2658. %h5 Example:
  2659. %ul
  2660. %li
  2661. %a( href="/samples/tooltip_show.html" ) Hide Tooltip
  2662. %hr
  2663. %section
  2664. %h3
  2665. = partial :reference_item_link, locals: { id: 'tooltip.grouped' }
  2666. %p Set if tooltip is grouped or not for the data points.
  2667. %h5 Default:
  2668. <code>true</code>
  2669. %h5 Format:
  2670. %div.sourcecode
  2671. %pre
  2672. %code.html.javascript
  2673. tooltip: {
  2674. &nbsp;&nbsp;grouped: false
  2675. }
  2676. %h5 Example:
  2677. %ul
  2678. %li
  2679. %a( href="/samples/tooltip_grouped.html" ) Tooltip Grouping
  2680. %hr
  2681. %section
  2682. %h3
  2683. = partial :reference_item_link, locals: { id: 'tooltip.format.title' }
  2684. %p Set format for the title of tooltip.
  2685. %br
  2686. %p Specified function receives <span class="code">x</span> and <span class="code">index</span> of the data point to show.
  2687. %h5 Default:
  2688. <code>undefined</code>
  2689. %h5 Format:
  2690. %div.sourcecode
  2691. %pre
  2692. %code.html.javascript
  2693. tooltip: {
  2694. &nbsp;&nbsp;format: {
  2695. &nbsp;&nbsp;&nbsp;&nbsp;title: function (x, index) { return 'Data ' + x; }
  2696. &nbsp;&nbsp;}
  2697. }
  2698. %h5 Example:
  2699. %ul
  2700. %li
  2701. %a( href="/samples/tooltip_format.html" ) Tooltip Format
  2702. %hr
  2703. %section
  2704. %h3
  2705. = partial :reference_item_link, locals: { id: 'tooltip.format.name' }
  2706. %p Set format for the name of each data in tooltip.
  2707. %br
  2708. %p Specified function receives <span class="code">name</span>, <span class="code">ratio</span>, <span class="code">id</span> and <span class="code">index</span> of the data point to show. <span class="code">ratio</span> will be <code>undefined</code> if the chart is not donut/pie/gauge.
  2709. %h5 Default:
  2710. <code>undefined</code>
  2711. %h5 Format:
  2712. %div.sourcecode
  2713. %pre
  2714. %code.html.javascript
  2715. tooltip: {
  2716. &nbsp;&nbsp;format: {
  2717. &nbsp;&nbsp;&nbsp;&nbsp;name: function (name, ratio, id, index) { return name; }
  2718. &nbsp;&nbsp;}
  2719. }
  2720. %h5 Example:
  2721. %ul
  2722. %li
  2723. %a( href="/samples/tooltip_format.html" ) Tooltip Format
  2724. %hr
  2725. %section
  2726. %h3
  2727. = partial :reference_item_link, locals: { id: 'tooltip.format.value' }
  2728. %p Set format for the value of each data in tooltip.
  2729. %br
  2730. %p Specified function receives <span class="code">name</span>, <span class="code">ratio</span>, <span class="code">id</span> and <span class="code">index</span> of the data point to show. <span class="code">ratio</span> will be <code>undefined</code> if the chart is not donut/pie/gauge.
  2731. %p If <code>undefined</code> returned, the row of that value will be skipped.
  2732. %h5 Default:
  2733. <code>undefined</code>
  2734. %h5 Format:
  2735. %div.sourcecode
  2736. %pre
  2737. %code.html.javascript
  2738. tooltip: {
  2739. &nbsp;&nbsp;format: {
  2740. &nbsp;&nbsp;&nbsp;&nbsp;value: function (value, ratio, id, index) { return ratio; }
  2741. &nbsp;&nbsp;}
  2742. }
  2743. %h5 Example:
  2744. %ul
  2745. %li
  2746. %a( href="/samples/tooltip_format.html" ) Tooltip Format
  2747. %hr
  2748. %section
  2749. %h3
  2750. = partial :reference_item_link, locals: { id: 'tooltip.position' }
  2751. %p Set custom position for the tooltip.
  2752. %br
  2753. %p This option can be used to modify the tooltip position by returning <code>object</code> that has <span class="code">top</span> and <span class="code">left</span>.
  2754. %h5 Default:
  2755. <code>undefined</code>
  2756. %h5 Format:
  2757. %div.sourcecode
  2758. %pre
  2759. %code.html.javascript
  2760. tooltip: {
  2761. &nbsp;&nbsp;position: function (data, width, height, element) {
  2762. &nbsp;&nbsp;&nbsp;&nbsp;return {top: 0, left: 0};
  2763. &nbsp;&nbsp;}
  2764. }
  2765. %h5 Reference:
  2766. %ul
  2767. %li
  2768. %a( href="https://github.com/c3js/c3/pull/833" ) Introduce tooltip.position callback function #833
  2769. %hr
  2770. %section
  2771. %h3
  2772. = partial :reference_item_link, locals: { id: 'tooltip.contents' }
  2773. %p Set custom HTML for the tooltip.
  2774. %br
  2775. %p Specified function receives <span class="code">data</span>, <span class="code">defaultTitleFormat</span>, <span class="code">defaultValueFormat</span> and <span class="code">color</span> of the data point to show. If <span class="code">tooltip.grouped</span> is <code>true</code>, <span class="code">data</span> includes multiple data points.
  2776. %h5 Default:
  2777. <code>undefined</code>
  2778. %h5 Format:
  2779. %div.sourcecode
  2780. %pre
  2781. %code.html.javascript
  2782. tooltip: {
  2783. &nbsp;&nbsp;contents: function (d, defaultTitleFormat, defaultValueFormat, color) {
  2784. &nbsp;&nbsp;&nbsp;&nbsp;return ... // formatted html as you want
  2785. &nbsp;&nbsp;}
  2786. }
  2787. %hr
  2788. %section
  2789. %h3
  2790. = partial :reference_item_link, locals: { id: 'tooltip.horizontal' }
  2791. %p Show the tooltips based on the horizontal position of the mouse.
  2792. %h5 Default:
  2793. <code>undefined</code>
  2794. %h5 Format:
  2795. %div.sourcecode
  2796. %pre
  2797. %code.html.javascript
  2798. tooltip: {
  2799. &nbsp;&nbsp;horizontal: true
  2800. }
  2801. %h5 Example:
  2802. %ul
  2803. %li
  2804. %a( href="/samples/tooltip_horizontal.html" ) Horizontal tooltip
  2805. %hr
  2806. %section
  2807. %h3
  2808. = partial :reference_item_link, locals: { id: 'subchart.show', experimental: true }
  2809. %p Show sub chart on the bottom of the chart.
  2810. %h5 Default:
  2811. <code>false</code>
  2812. %h5 Format:
  2813. %div.sourcecode
  2814. %pre
  2815. %code.html.javascript
  2816. subchart: {
  2817. &nbsp;&nbsp;show: true
  2818. }
  2819. %h5 Example:
  2820. %ul
  2821. %li
  2822. %a( href="/samples/options_subchart.html" ) Subchart
  2823. %hr
  2824. %section
  2825. %h3
  2826. = partial :reference_item_link, locals: { id: 'subchart.size.height', experimental: true }
  2827. %p Change the height of the subchart.
  2828. %h5 Default:
  2829. <code>undefined</code>
  2830. %h5 Format:
  2831. %div.sourcecode
  2832. %pre
  2833. %code.html.javascript
  2834. subchart: {
  2835. &nbsp;&nbsp;size: {
  2836. &nbsp;&nbsp;&nbsp;&nbsp;height: 20
  2837. &nbsp;&nbsp;}
  2838. }
  2839. %hr
  2840. %section
  2841. %h3
  2842. = partial :reference_item_link, locals: { id: 'subchart.onbrush', experimental: true }
  2843. %p Set callback for brush event.
  2844. %br
  2845. %p Specified function receives the current zoomed x domain.
  2846. %h5 Default:
  2847. <code>undefined</code>
  2848. %h5 Format:
  2849. %div.sourcecode
  2850. %pre
  2851. %code.html.javascript
  2852. subchart: {
  2853. &nbsp;&nbsp;onbrush: function (domain) { ... }
  2854. }
  2855. %hr
  2856. %section
  2857. %h3
  2858. = partial :reference_item_link, locals: { id: 'subchart.axis.x.show', experimental: true }
  2859. %p Show or hide x axis of subchart.
  2860. %h5 Default:
  2861. <code>true</code>
  2862. %h5 Format:
  2863. %div.sourcecode
  2864. %pre
  2865. %code.html.javascript
  2866. subchart: {
  2867. &nbsp;&nbsp;axis: {
  2868. &nbsp;&nbsp;&nbsp;&nbsp;x: {
  2869. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;show: true
  2870. &nbsp;&nbsp;&nbsp;&nbsp;}
  2871. &nbsp;&nbsp;}
  2872. }
  2873. %hr
  2874. %section
  2875. %h3
  2876. = partial :reference_item_link, locals: { id: 'zoom.enabled', experimental: true }
  2877. %p Enable zooming.
  2878. %h5 Default:
  2879. <code>false</code>
  2880. %h5 Format:
  2881. %div.sourcecode
  2882. %pre
  2883. %code.html.javascript
  2884. zoom: {
  2885. &nbsp;&nbsp;enabled: false
  2886. }
  2887. %h5 Example:
  2888. %ul
  2889. %li
  2890. %a( href="/samples/interaction_zoom.html" ) Zoom
  2891. %hr
  2892. %section
  2893. %h3
  2894. = partial :reference_item_link, locals: { id: 'zoom.type', experimental: true }
  2895. %p There are two types of zoom behavior: 'scroll' and 'drag'
  2896. %h5 Default:
  2897. <code>'scroll'</code>
  2898. %h5 Format:
  2899. %div.sourcecode
  2900. %pre
  2901. %code.html.javascript
  2902. zoom: {
  2903. &nbsp;&nbsp;type: 'drag'
  2904. }
  2905. %h5 Example:
  2906. %ul
  2907. %li
  2908. %a( href="/samples/interaction_zoom_by_drag.html" ) Zoom by Drag
  2909. %hr
  2910. %section
  2911. %h3
  2912. = partial :reference_item_link, locals: { id: 'zoom.rescale', experimental: true }
  2913. %p Enable to rescale after zooming.
  2914. %br
  2915. %p If <code>true</code> set, y domain will be updated according to the zoomed region.
  2916. %h5 Default:
  2917. <code>false</code>
  2918. %h5 Format:
  2919. %div.sourcecode
  2920. %pre
  2921. %code.html.javascript
  2922. zoom: {
  2923. &nbsp;&nbsp;rescale: true
  2924. }
  2925. %hr
  2926. %section
  2927. %h3
  2928. = partial :reference_item_link, locals: { id: 'zoom.extent', experimental: true }
  2929. %p Change zoom extent.
  2930. %h5 Default:
  2931. <code>[1, 10]</code>
  2932. %h5 Format:
  2933. %div.sourcecode
  2934. %pre
  2935. %code.html.javascript
  2936. zoom: {
  2937. &nbsp;&nbsp;extent: [1, 100] // enable more zooming
  2938. }
  2939. %hr
  2940. %section
  2941. %h3
  2942. = partial :reference_item_link, locals: { id: 'zoom.onzoom', experimental: true }
  2943. %p Set callback that is called when the chart is zooming.
  2944. %br
  2945. %p Specified function receives the zoomed domain.
  2946. %h5 Default:
  2947. <code>undefined</code>
  2948. %h5 Format:
  2949. %div.sourcecode
  2950. %pre
  2951. %code.html.javascript
  2952. zoom: {
  2953. &nbsp;&nbsp;onzoom: function (domain) { ... }
  2954. }
  2955. %hr
  2956. %section
  2957. %h3
  2958. = partial :reference_item_link, locals: { id: 'zoom.onzoomstart', experimental: true }
  2959. %p Set callback that is called when zooming starts.
  2960. %br
  2961. %p Specified function receives the zoom event.
  2962. %h5 Default:
  2963. <code>undefined</code>
  2964. %h5 Format:
  2965. %div.sourcecode
  2966. %pre
  2967. %code.html.javascript
  2968. zoom: {
  2969. &nbsp;&nbsp;onzoomstart: function (event) { ... }
  2970. }
  2971. %hr
  2972. %section
  2973. %h3
  2974. = partial :reference_item_link, locals: { id: 'zoom.onzoomend', experimental: true }
  2975. %p Set callback that is called when zooming ends.
  2976. %br
  2977. %p Specified function receives the zoomed domain.
  2978. %h5 Default:
  2979. <code>undefined</code>
  2980. %h5 Format:
  2981. %div.sourcecode
  2982. %pre
  2983. %code.html.javascript
  2984. zoom: {
  2985. &nbsp;&nbsp;onzoomend: function (domain) { ... }
  2986. }
  2987. %hr
  2988. %section
  2989. %h3
  2990. = partial :reference_item_link, locals: { id: 'zoom.disableDefaultBehavior', experimental: true }
  2991. %p Disable the default animation of zoom. This option is useful when you want to get the zoomed domain by onzoom or onzoomend handlers and override the default animation behavior. See <a href="https://github.com/c3js/c3/pull/2439">#2439</a> for details.
  2992. %h5 Default:
  2993. <code>false</code>
  2994. %h5 Format:
  2995. %div.sourcecode
  2996. %pre
  2997. %code.html.javascript
  2998. zoom: {
  2999. &nbsp;&nbsp;enabled: true,
  3000. &nbsp;&nbsp;disableDefaultBehavior: true,
  3001. &nbsp;&nbsp;onzoomend: d => console.log(d)
  3002. }
  3003. %hr
  3004. %section
  3005. %h3
  3006. = partial :reference_item_link, locals: { id: 'point.show' }
  3007. %p Whether to show each point in line.
  3008. %h5 Default:
  3009. <code>true</code>
  3010. %h5 Format:
  3011. %div.sourcecode
  3012. %pre
  3013. %code.html.javascript
  3014. point: {
  3015. &nbsp;&nbsp;show: false
  3016. }
  3017. %hr
  3018. %section
  3019. %h3
  3020. = partial :reference_item_link, locals: { id: 'point.r' }
  3021. %p The radius size of each point.
  3022. %h5 Default:
  3023. <code>2.5</code>
  3024. %h5 Format:
  3025. %div.sourcecode
  3026. %pre
  3027. %code.html.javascript
  3028. point: {
  3029. &nbsp;&nbsp;r: 5
  3030. }
  3031. %hr
  3032. %section
  3033. %h3
  3034. = partial :reference_item_link, locals: { id: 'point.focus.expand.enabled' }
  3035. %p Whether to expand each point on focus.
  3036. %h5 Default:
  3037. <code>true</code>
  3038. %h5 Format:
  3039. %div.sourcecode
  3040. %pre
  3041. %code.html.javascript
  3042. point: {
  3043. &nbsp;&nbsp;focus: {
  3044. &nbsp;&nbsp;&nbsp;&nbsp;expand: {
  3045. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enabled: true
  3046. &nbsp;&nbsp;&nbsp;&nbsp;}
  3047. &nbsp;&nbsp;}
  3048. }
  3049. %hr
  3050. %section
  3051. %h3
  3052. = partial :reference_item_link, locals: { id: 'point.focus.expand.r' }
  3053. %p The radius size of each point on focus.
  3054. %h5 Default:
  3055. <code>point.r * 1.75</code>
  3056. %h5 Format:
  3057. %div.sourcecode
  3058. %pre
  3059. %code.html.javascript
  3060. point: {
  3061. &nbsp;&nbsp;focus: {
  3062. &nbsp;&nbsp;&nbsp;&nbsp;expand: {
  3063. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r: 1
  3064. &nbsp;&nbsp;&nbsp;&nbsp;}
  3065. &nbsp;&nbsp;}
  3066. }
  3067. %hr
  3068. %section
  3069. %h3
  3070. = partial :reference_item_link, locals: { id: 'point.select.r' }
  3071. %p The radius size of each point on selected.
  3072. %h5 Default:
  3073. <code>point.r * 4</code>
  3074. %h5 Format:
  3075. %div.sourcecode
  3076. %pre
  3077. %code.html.javascript
  3078. point: {
  3079. &nbsp;&nbsp;select: {
  3080. &nbsp;&nbsp;&nbsp;&nbsp;r: 3
  3081. &nbsp;&nbsp;}
  3082. }
  3083. %hr
  3084. %section
  3085. %h3
  3086. = partial :reference_item_link, locals: { id: 'line.connectNull' }
  3087. %p Set if null data point will be connected or not.
  3088. %br
  3089. %p If <code>true</code> set, the region of null data will be connected without any data point. If <code>false</code> set, the region of null data will not be connected and get empty.
  3090. %h5 Default:
  3091. <code>false</code>
  3092. %h5 Format:
  3093. %div.sourcecode
  3094. %pre
  3095. %code.html.javascript
  3096. line: {
  3097. &nbsp;&nbsp;connectNull: true
  3098. }
  3099. %hr
  3100. %section
  3101. %h3
  3102. = partial :reference_item_link, locals: { id: 'line.step.type' }
  3103. %p Change step type for step chart.
  3104. %br
  3105. %p <span class="code">step</span>, <span class="code">step-before</span> and <span class="code">step-after</span> can be used.
  3106. %h5 Default:
  3107. <code>'step'</code>
  3108. %h5 Format:
  3109. %div.sourcecode
  3110. %pre
  3111. %code.html.javascript
  3112. line: {
  3113. &nbsp;&nbsp;step: {
  3114. &nbsp;&nbsp;&nbsp;&nbsp;type: 'step-after'
  3115. &nbsp;&nbsp;}
  3116. }
  3117. %hr
  3118. %section
  3119. %h3
  3120. = partial :reference_item_link, locals: { id: 'area.zerobased' }
  3121. %p Set if min or max value will be 0 on area chart.
  3122. %h5 Default:
  3123. <code>true</code>
  3124. %h5 Format:
  3125. %div.sourcecode
  3126. %pre
  3127. %code.html.javascript
  3128. area: {
  3129. &nbsp;&nbsp;zerobased: false
  3130. }
  3131. %hr
  3132. %section
  3133. %h3
  3134. = partial :reference_item_link, locals: { id: 'bar.width' }
  3135. %p Change the width of bar chart.
  3136. %h5 Default:
  3137. <code>auto</code>
  3138. %h5 Format:
  3139. %div.sourcecode
  3140. %pre
  3141. %code.html.javascript
  3142. bar: {
  3143. &nbsp;&nbsp;width: 10
  3144. }
  3145. %h5 Example:
  3146. %ul
  3147. %li
  3148. %a( href="/samples/chart_bar.html" ) Bar Chart
  3149. %hr
  3150. %section
  3151. %h3
  3152. = partial :reference_item_link, locals: { id: 'bar.width.ratio' }
  3153. %p Change the width of bar chart by ratio.
  3154. %h5 Default:
  3155. <code>0.6</code>
  3156. %h5 Format:
  3157. %div.sourcecode
  3158. %pre
  3159. %code.html.javascript
  3160. bar: {
  3161. &nbsp;&nbsp;width: {
  3162. &nbsp;&nbsp;&nbsp;&nbsp;ratio: 0.2
  3163. &nbsp;&nbsp;}
  3164. }
  3165. %h5 Example:
  3166. %ul
  3167. %li
  3168. %a( href="/samples/chart_bar.html" ) Bar Chart
  3169. %hr
  3170. %section
  3171. %h3
  3172. = partial :reference_item_link, locals: { id: 'bar.zerobased' }
  3173. %p Set if min or max value will be 0 on bar chart.
  3174. %h5 Default:
  3175. <code>true</code>
  3176. %h5 Format:
  3177. %div.sourcecode
  3178. %pre
  3179. %code.html.javascript
  3180. bar: {
  3181. &nbsp;&nbsp;zerobased: false
  3182. }
  3183. %hr
  3184. %section
  3185. %h3
  3186. = partial :reference_item_link, locals: { id: 'pie.label.show' }
  3187. %p Show or hide label on each pie piece.
  3188. %h5 Default:
  3189. <code>true</code>
  3190. %h5 Format:
  3191. %div.sourcecode
  3192. %pre
  3193. %code.html.javascript
  3194. pie: {
  3195. &nbsp;&nbsp;label: {
  3196. &nbsp;&nbsp;&nbsp;&nbsp;show: false
  3197. &nbsp;&nbsp;}
  3198. }
  3199. %hr
  3200. %section
  3201. %h3
  3202. = partial :reference_item_link, locals: { id: 'pie.label.format' }
  3203. %p Set formatter for the label on each pie piece.
  3204. %h5 Default:
  3205. <code>undefined</code>
  3206. %h5 Format:
  3207. %div.sourcecode
  3208. %pre
  3209. %code.html.javascript
  3210. pie: {
  3211. &nbsp;&nbsp;label: {
  3212. &nbsp;&nbsp;&nbsp;&nbsp;format: function (value, ratio, id) {
  3213. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return d3.format('$')(value);
  3214. &nbsp;&nbsp;&nbsp;&nbsp;}
  3215. &nbsp;&nbsp;}
  3216. }
  3217. %h5 Example:
  3218. %ul
  3219. %li
  3220. %a( href="/samples/pie_label_format.html" ) Pie Label Format
  3221. %hr
  3222. %section
  3223. %h3
  3224. = partial :reference_item_link, locals: { id: 'pie.label.threshold' }
  3225. %p Set threshold to show/hide labels.
  3226. %h5 Default:
  3227. <code>0.05</code>
  3228. %h5 Format:
  3229. %div.sourcecode
  3230. %pre
  3231. %code.html.javascript
  3232. pie: {
  3233. &nbsp;&nbsp;label: {
  3234. &nbsp;&nbsp;&nbsp;&nbsp;threshold: 0.1
  3235. &nbsp;&nbsp;}
  3236. }
  3237. %hr
  3238. %section
  3239. %h3
  3240. = partial :reference_item_link, locals: { id: 'pie.expand' }
  3241. %p Enable or disable expanding pie pieces.
  3242. %h5 Default:
  3243. <code>true</code>
  3244. %h5 Format:
  3245. %div.sourcecode
  3246. %pre
  3247. %code.html.javascript
  3248. pie: {
  3249. &nbsp;&nbsp;expand: false
  3250. }
  3251. %hr
  3252. %section
  3253. %h3
  3254. = partial :reference_item_link, locals: { id: 'pie.padAngle' }
  3255. %p Sets the angular separation between each adjacent arc.
  3256. %h5 Default:
  3257. <code>0</code>
  3258. %h5 Format:
  3259. %div.sourcecode
  3260. %pre
  3261. %code.html.javascript
  3262. pie: {
  3263. &nbsp;&nbsp;padAngle: .1
  3264. }
  3265. %hr
  3266. %section
  3267. %h3
  3268. = partial :reference_item_link, locals: { id: 'donut.label.show' }
  3269. %p Show or hide label on each donut piece.
  3270. %h5 Default:
  3271. <code>true</code>
  3272. %h5 Format:
  3273. %div.sourcecode
  3274. %pre
  3275. %code.html.javascript
  3276. donut: {
  3277. &nbsp;&nbsp;label: {
  3278. &nbsp;&nbsp;&nbsp;&nbsp;show: false
  3279. &nbsp;&nbsp;}
  3280. }
  3281. %hr
  3282. %section
  3283. %h3
  3284. = partial :reference_item_link, locals: { id: 'donut.label.format' }
  3285. %p Set formatter for the label on each donut piece.
  3286. %h5 Default:
  3287. <code>undefined</code>
  3288. %h5 Format:
  3289. %div.sourcecode
  3290. %pre
  3291. %code.html.javascript
  3292. donut: {
  3293. &nbsp;&nbsp;label: {
  3294. &nbsp;&nbsp;&nbsp;&nbsp;format: function (value, ratio, id) {
  3295. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return d3.format('$')(value);
  3296. &nbsp;&nbsp;&nbsp;&nbsp;}
  3297. &nbsp;&nbsp;}
  3298. }
  3299. %hr
  3300. %section
  3301. %h3
  3302. = partial :reference_item_link, locals: { id: 'donut.label.threshold' }
  3303. %p Set threshold to show/hide labels.
  3304. %h5 Default:
  3305. <code>0.05</code>
  3306. %h5 Format:
  3307. %div.sourcecode
  3308. %pre
  3309. %code.html.javascript
  3310. donut: {
  3311. &nbsp;&nbsp;label: {
  3312. &nbsp;&nbsp;&nbsp;&nbsp;threshold: 0.1
  3313. &nbsp;&nbsp;}
  3314. }
  3315. %hr
  3316. %section
  3317. %h3
  3318. = partial :reference_item_link, locals: { id: 'donut.expand' }
  3319. %p Enable or disable expanding donut pieces.
  3320. %h5 Default:
  3321. <code>true</code>
  3322. %h5 Format:
  3323. %div.sourcecode
  3324. %pre
  3325. %code.html.javascript
  3326. donut: {
  3327. &nbsp;&nbsp;expand: false
  3328. }
  3329. %hr
  3330. %section
  3331. %h3
  3332. = partial :reference_item_link, locals: { id: 'donut.padAngle' }
  3333. %p Sets the angular separation between each adjacent arc.
  3334. %h5 Default:
  3335. <code>0</code>
  3336. %h5 Format:
  3337. %div.sourcecode
  3338. %pre
  3339. %code.html.javascript
  3340. donut: {
  3341. &nbsp;&nbsp;padAngle: .1
  3342. }
  3343. %hr
  3344. %section
  3345. %h3
  3346. = partial :reference_item_link, locals: { id: 'donut.width' }
  3347. %p Set width of donut chart.
  3348. %h5 Default:
  3349. <code>auto</code>
  3350. %h5 Format:
  3351. %div.sourcecode
  3352. %pre
  3353. %code.html.javascript
  3354. donut: {
  3355. &nbsp;&nbsp;width: 10
  3356. }
  3357. %hr
  3358. %section
  3359. %h3
  3360. = partial :reference_item_link, locals: { id: 'donut.title' }
  3361. %p Set title of donut chart.
  3362. %h5 Default:
  3363. <code>''</code>
  3364. %h5 Format:
  3365. %div.sourcecode
  3366. %pre
  3367. %code.html.javascript
  3368. donut: {
  3369. &nbsp;&nbsp;title: 'Title'
  3370. }
  3371. %hr
  3372. %section
  3373. %h3
  3374. = partial :reference_item_link, locals: { id: 'gauge.label.show' }
  3375. %p Show or hide label on gauge.
  3376. %h5 Default:
  3377. <code>true</code>
  3378. %h5 Format:
  3379. %div.sourcecode
  3380. %pre
  3381. %code.html.javascript
  3382. gauge: {
  3383. &nbsp;&nbsp;label: {
  3384. &nbsp;&nbsp;&nbsp;&nbsp;show: false
  3385. &nbsp;&nbsp;}
  3386. }
  3387. %hr
  3388. %section
  3389. %h3
  3390. = partial :reference_item_link, locals: { id: 'gauge.label.format' }
  3391. %p Set formatter for the label on gauge.
  3392. %h5 Default:
  3393. <code>undefined</code>
  3394. %h5 Format:
  3395. %div.sourcecode
  3396. %pre
  3397. %code.html.javascript
  3398. gauge: {
  3399. &nbsp;&nbsp;label: {
  3400. &nbsp;&nbsp;&nbsp;&nbsp;format: function (value, ratio) {
  3401. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return value;
  3402. &nbsp;&nbsp;&nbsp;&nbsp;}
  3403. &nbsp;&nbsp;}
  3404. }
  3405. %h5 Example:
  3406. %ul
  3407. %li
  3408. %a( href="/samples/chart_gauge.html" ) Gauge Chart
  3409. %hr
  3410. %section
  3411. %h3
  3412. = partial :reference_item_link, locals: { id: 'gauge.expand' }
  3413. %p Enable or disable expanding gauge.
  3414. %h5 Default:
  3415. <code>true</code>
  3416. %h5 Format:
  3417. %div.sourcecode
  3418. %pre
  3419. %code.html.javascript
  3420. gauge: {
  3421. &nbsp;&nbsp;expand: false
  3422. }
  3423. %hr
  3424. %section
  3425. %h3
  3426. = partial :reference_item_link, locals: { id: 'gauge.min' }
  3427. %p Set min value of the gauge.
  3428. %h5 Default:
  3429. <code>0</code>
  3430. %h5 Format:
  3431. %div.sourcecode
  3432. %pre
  3433. %code.html.javascript
  3434. gauge: {
  3435. &nbsp;&nbsp;min: -100
  3436. }
  3437. %hr
  3438. %section
  3439. %h3
  3440. = partial :reference_item_link, locals: { id: 'gauge.max' }
  3441. %p Set max value of the gauge.
  3442. %h5 Default:
  3443. <code>100</code>
  3444. %h5 Format:
  3445. %div.sourcecode
  3446. %pre
  3447. %code.html.javascript
  3448. gauge: {
  3449. &nbsp;&nbsp;max: 200
  3450. }
  3451. %hr
  3452. %section
  3453. %h3
  3454. = partial :reference_item_link, locals: { id: 'gauge.units' }
  3455. %p Set units of the gauge.
  3456. %h5 Default:
  3457. <code>undefined</code>
  3458. %h5 Format:
  3459. %div.sourcecode
  3460. %pre
  3461. %code.html.javascript
  3462. gauge: {
  3463. &nbsp;&nbsp;units: ' %'
  3464. }
  3465. %hr
  3466. %section
  3467. %h3
  3468. = partial :reference_item_link, locals: { id: 'gauge.width' }
  3469. %p Set width of gauge chart.
  3470. %h5 Default:
  3471. <code>auto</code>
  3472. %h5 Format:
  3473. %div.sourcecode
  3474. %pre
  3475. %code.html.javascript
  3476. gauge: {
  3477. &nbsp;&nbsp;width: 10
  3478. }
  3479. %hr
  3480. %section
  3481. %h3
  3482. = partial :reference_item_link, locals: { id: 'spline.interpolation.type' }
  3483. %p Set type of curve interpolation.
  3484. %h5 Default:
  3485. <code>cardinal</code>
  3486. %p Available interpolation are:
  3487. %ul
  3488. %li linear
  3489. %li linear-closed
  3490. %li basis
  3491. %li basis-open
  3492. %li basis-closed
  3493. %li bundle
  3494. %li cardinal <code>[default]</code>
  3495. %li cardinal-open
  3496. %li cardinal-closed
  3497. %li monotone
  3498. %li step
  3499. %li step-before
  3500. %li step-after
  3501. %h5 Format:
  3502. %div.sourcecode
  3503. %pre
  3504. %code.html.javascript
  3505. interpolation: {
  3506. &nbsp;&nbsp;type: "monotone"
  3507. }
  3508. %hr
  3509. %section
  3510. %h3
  3511. = partial :reference_item_link, locals: { id: 'stanford.scaleMin' }
  3512. %p Change the minimum value of the stanford color scale.
  3513. %h5 Default:
  3514. <code>auto</code>
  3515. %h5 Format:
  3516. %div.sourcecode
  3517. %pre
  3518. %code.html.javascript
  3519. stanford: {
  3520. &nbsp;&nbsp;scaleMin: 1
  3521. }
  3522. %h5 Example:
  3523. %ul
  3524. %li
  3525. %a( href="/samples/chart_stanford.html" ) Stanford Chart
  3526. %hr
  3527. %section
  3528. %h3
  3529. = partial :reference_item_link, locals: { id: 'stanford.scaleMax' }
  3530. %p Change the maximum value of the stanford color scale.
  3531. %h5 Default:
  3532. <code>auto</code>
  3533. %h5 Format:
  3534. %div.sourcecode
  3535. %pre
  3536. %code.html.javascript
  3537. stanford: {
  3538. &nbsp;&nbsp;scaleMax: 10000
  3539. }
  3540. %h5 Example:
  3541. %ul
  3542. %li
  3543. %a( href="/samples/chart_stanford.html" ) Stanford Chart
  3544. %hr
  3545. %section
  3546. %h3
  3547. = partial :reference_item_link, locals: { id: 'stanford.scaleWidth' }
  3548. %p Change the width of the stanford color scale.
  3549. %h5 Default:
  3550. <code>20</code>
  3551. %h5 Format:
  3552. %div.sourcecode
  3553. %pre
  3554. %code.html.javascript
  3555. stanford: {
  3556. &nbsp;&nbsp;scaleWidth: 20
  3557. }
  3558. %h5 Example:
  3559. %ul
  3560. %li
  3561. %a( href="/samples/chart_stanford.html" ) Stanford Chart
  3562. %hr
  3563. %section
  3564. %h3
  3565. = partial :reference_item_link, locals: { id: 'stanford.scaleFormat' }
  3566. %p Set formatter for stanford color scale axis tick text.
  3567. %br
  3568. %p This option accepts the string <span class="code">'pow10'</span>, a d3.format object and any function you define.
  3569. %h5 Default:
  3570. <code>d3.format("d")</code> - decimal notation, rounded to integer
  3571. %h5 Format:
  3572. %div.sourcecode
  3573. %pre
  3574. %code.html.javascript
  3575. stanford: {
  3576. &nbsp;&nbsp;scaleFormat: 'pow10'
  3577. &nbsp;&nbsp;// or d3.format("d")
  3578. &nbsp;&nbsp;// or a function
  3579. }
  3580. %h5 Example:
  3581. %ul
  3582. %li
  3583. %a( href="/samples/chart_stanford.html" ) Stanford Chart
  3584. %hr
  3585. %section
  3586. %h3
  3587. = partial :reference_item_link, locals: { id: 'stanford.scaleValues' }
  3588. %p Set the values for stanford color scale axis tick text.
  3589. %br
  3590. %p This option accepts a function that returns an array of numbers.
  3591. %h5 Default:
  3592. <code>undefined</code>
  3593. %h5 Format:
  3594. %div.sourcecode
  3595. %pre
  3596. %code.html.javascript
  3597. stanford: {
  3598. &nbsp;&nbsp;scaleValues: (minValue, maxValue) => {
  3599. &nbsp;&nbsp;&nbsp;&nbsp;const step = (maxValue - minValue) / 10;
  3600. &nbsp;&nbsp;&nbsp;&nbsp;return d3.range(minValue, maxValue + step, step);
  3601. &nbsp;&nbsp;}
  3602. }
  3603. %h5 Example:
  3604. %ul
  3605. %li
  3606. %a( href="/samples/chart_stanford.html" ) Stanford Chart
  3607. %hr
  3608. %section
  3609. %h3
  3610. = partial :reference_item_link, locals: { id: 'stanford.colors' }
  3611. %p Set the color interpolator for stanford color scale.
  3612. %br
  3613. %p This option is a d3.interpolate* object or any function you define that receives a value between 0 and 1, and returns a color as string.
  3614. %h5 Default:
  3615. <code>d3.interpolateHslLong(d3.hsl(250, 1, 0.5), d3.hsl(0, 1, 0.5))</code>
  3616. %h5 Format:
  3617. %div.sourcecode
  3618. %pre
  3619. %code.html.javascript
  3620. stanford: {
  3621. &nbsp;&nbsp;colors: d3.interpolatePlasma
  3622. }
  3623. %h5 Example:
  3624. %ul
  3625. %li
  3626. %a( href="/samples/chart_stanford.html" ) Stanford Chart
  3627. %hr
  3628. %section
  3629. %h3
  3630. = partial :reference_item_link, locals: { id: 'stanford.padding' }
  3631. %p Set the padding for the stanford color scale.
  3632. %p This option accepts <code>array</code> including <code>object</code> that has <span class="code">top</span>, <span class="code">right</span>, <span class="code">bottom</span> and <span class="code">left</span>.
  3633. %h5 Default:
  3634. <code>undefined</code>
  3635. %h5 Format:
  3636. %div.sourcecode
  3637. %pre
  3638. %code.html.javascript
  3639. stanford: {
  3640. &nbsp;&nbsp;padding: {
  3641. &nbsp;&nbsp;&nbsp;&nbsp;top: 15,
  3642. &nbsp;&nbsp;&nbsp;&nbsp;right: 0,
  3643. &nbsp;&nbsp;&nbsp;&nbsp;bottom: 0,
  3644. &nbsp;&nbsp;&nbsp;&nbsp;left: 0
  3645. &nbsp;&nbsp;}
  3646. }
  3647. %h5 Example:
  3648. %ul
  3649. %li
  3650. %a( href="/samples/chart_stanford.html" ) Stanford Chart
  3651. %hr
  3652. %section
  3653. %h3
  3654. = partial :reference_item_link, locals: { id: 'stanford.texts' }
  3655. %p Show text anywhere inside the chart.
  3656. %br
  3657. %p This option accepts <code>array</code> including <code>object</code> that has <span class="code">x</span>, <span class="code">y</span>, <span class="code">content</span> and <span class="code">class</span>. The key <span class="code">class</span> is optional.
  3658. %p <span class="code">x</span> and <span class="code">y</span> are the starting position of the text, <span class="code">content</span> is the text content to show. If <span class="code">class</span> is set, the text element will have it as class.
  3659. %h5 Default:
  3660. <code>[]</code>
  3661. %h5 Format:
  3662. %div.sourcecode
  3663. %pre
  3664. %code.html.javascript
  3665. stanford: {
  3666. &nbsp;&nbsp;texts: [
  3667. &nbsp;&nbsp;&nbsp;&nbsp;{x: 1, y: 4, content: 'my custom text here', class: 'text-1-4'}
  3668. &nbsp;&nbsp;]
  3669. }
  3670. %hr
  3671. %section
  3672. %h3
  3673. = partial :reference_item_link, locals: { id: 'stanford.lines' }
  3674. %p Show lines anywhere inside the chart.
  3675. %br
  3676. %p This option accepts <code>array</code> including <code>object</code> that has <span class="code">value_x1</span>, <span class="code">value_y1</span>, <span class="code">value_x2</span>, <span class="code">value_y2</span> and <span class="code">class</span>. The key <span class="code">class</span> is optional.
  3677. %p <span class="code">value_x1</span> and <span class="code">value_y1</span> are the starting position of the line, <span class="code">value_x2</span> and <span class="code">value_y2</span> are the ending position of the line. If <span class="code">class</span> is set, the line element will have it as class.
  3678. %h5 Default:
  3679. <code>[]</code>
  3680. %h5 Format:
  3681. %div.sourcecode
  3682. %pre
  3683. %code.html.javascript
  3684. stanford: {
  3685. &nbsp;&nbsp;lines: [
  3686. &nbsp;&nbsp;&nbsp;&nbsp;{value_x1: 0, value_y1: 0, value_x2: 65, value_y2: 65, class: "line-0-65"}
  3687. &nbsp;&nbsp;]
  3688. }
  3689. %hr
  3690. %section
  3691. %h3
  3692. = partial :reference_item_link, locals: { id: 'stanford.regions' }
  3693. %p Show regions anywhere inside the chart.
  3694. %br
  3695. %p This option accepts <code>array</code> including <code>object</code> that has <span class="code">points</span>, <span class="code">text</span>, <span class="code">opacity</span> and <span class="code">class</span>. The keys <span class="code">text</span>, <span class="code">opacity</span> and <span class="code">class</span> are optional.
  3696. %p <span class="code">points</span> accepts <code>array</code> including <code>object</code> that has <span class="code">x</span> and <span class="code">y</span> that represent the coordinates of each point.
  3697. %p <span class="code">text</span> accepts <code>function</code> that returns a <code>string</code> with the text to show. If the current chart type is stanford the function receives <span class="code">value</span> and <span class="code">percentage</span> as parameters that represent the number of points in this region.
  3698. %p <span class="code">opacity</span> accepts a number between 0 and 1, the default <span class="code">opacity</span> is 0.2.
  3699. %p If <span class="code">class</span> is set, the line element will have it as class.
  3700. %b
  3701. %h5 Note:
  3702. %p Points should be added in a counter-clockwise direction to close the polygon.
  3703. %h5 Default:
  3704. <code>[]</code>
  3705. %h5 Format:
  3706. %div.sourcecode
  3707. %pre
  3708. %code.html.javascript
  3709. stanford: {
  3710. &nbsp;&nbsp;regions: [
  3711. &nbsp;&nbsp;&nbsp;&nbsp;{
  3712. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;points: [ // add points counter-clockwise
  3713. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{x: 0, y: 0},
  3714. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{x: 40, y: 40},
  3715. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{x: 0, y: 40}
  3716. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;],
  3717. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;text: function (value, percentage) {
  3718. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return "Normal Operations: " + value + " (" + percentage + "%)";
  3719. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
  3720. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;opacity: 0.2, // 0 to 1
  3721. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;class: "region-triangle-1"
  3722. &nbsp;&nbsp;&nbsp;&nbsp;}
  3723. &nbsp;&nbsp;]
  3724. }
  3725. %hr
  3726. %br
  3727. %section
  3728. %h2 API
  3729. %hr
  3730. %section
  3731. %h3
  3732. = partial :reference_item_link, locals: { id: 'api.focus' }
  3733. %p This API highlights specified targets and fade out the others.
  3734. %br
  3735. %p You can specify multiple targets by giving an array that includes <span class="code">id</span> as <code>String</code>. If no argument is given, all of targets will be highlighted.
  3736. %h5 Arguments:
  3737. %div.sourcecode
  3738. %pre
  3739. %code.html.javascript
  3740. \.focus(targetIds)
  3741. %p <span class="code">targetIds</span>&nbsp;&nbsp;<code>String</code> or <code>Array</code>
  3742. %p Target ids to be highlighted.
  3743. %h5 Example:
  3744. %div.sourcecode
  3745. %pre
  3746. %code.html.javascript
  3747. \// data1 will be highlighted and the others will be faded out
  3748. chart.focus('data1');
  3749. \
  3750. \// data1 and data2 will be highlighted and the others will be faded out
  3751. chart.focus(['data1', 'data2']);
  3752. \
  3753. \// all targets will be highlighted
  3754. chart.focus();
  3755. %hr
  3756. %section
  3757. %h3
  3758. = partial :reference_item_link, locals: { id: 'api.defocus' }
  3759. %p This API fades out specified targets and reverts the others.
  3760. %br
  3761. %p You can specify multiple targets by giving an array that includes <span class="code">id</span> as <code>String</code>. If no argument is given, all of targets will be faded out.
  3762. %h5 Arguments:
  3763. %div.sourcecode
  3764. %pre
  3765. %code.html.javascript
  3766. \.defocus(targetIds)
  3767. %p <span class="code">targetIds</span>&nbsp;&nbsp;<code>String</code> or <code>Array</code>
  3768. %p Target ids to be faded out.
  3769. %h5 Example:
  3770. %div.sourcecode
  3771. %pre
  3772. %code.html.javascript
  3773. \// data1 will be faded out and the others will be reverted.
  3774. chart.defocus('data1');
  3775. \
  3776. \// data1 and data2 will be faded out and the others will be reverted.
  3777. chart.defocus(['data1', 'data2']);
  3778. \
  3779. \// all targets will be faded out.
  3780. chart.defocus();
  3781. %hr
  3782. %section
  3783. %h3
  3784. = partial :reference_item_link, locals: { id: 'api.revert' }
  3785. %p This API reverts specified targets.
  3786. %br
  3787. %p You can specify multiple targets by giving an array that includes <span class="code">id</span> as <code>String</code>. If no argument is given, all of targets will be reverted.
  3788. %h5 Arguments:
  3789. %div.sourcecode
  3790. %pre
  3791. %code.html.javascript
  3792. \.revert(targetIds)
  3793. %p <span class="code">targetIds</span>&nbsp;&nbsp;<code>String</code> or <code>Array</code>
  3794. %p Target ids to be reverted.
  3795. %h5 Example:
  3796. %div.sourcecode
  3797. %pre
  3798. %code.html.javascript
  3799. \// data1 will be reverted.
  3800. chart.revert('data1');
  3801. \
  3802. \// data1 and data2 will be reverted.
  3803. chart.revert(['data1', 'data2']);
  3804. \
  3805. \// all targets will be reverted.
  3806. chart.revert();
  3807. %hr
  3808. %section
  3809. %h3
  3810. = partial :reference_item_link, locals: { id: 'api.show' }
  3811. %p This API shows specified targets.
  3812. %br
  3813. %p You can specify multiple targets by giving an array that includes <span class="code">id</span> as <code>String</code>. If no argument is given, all of targets will be shown.
  3814. %h5 Arguments:
  3815. %div.sourcecode
  3816. %pre
  3817. %code.html.javascript
  3818. \.show(targetIds, options)
  3819. %p <span class="code">targetIds</span>&nbsp;&nbsp;<code>String</code> or <code>Array</code>
  3820. %p Target ids to be shown.
  3821. %br
  3822. %p <span class="code">options</span>&nbsp;&nbsp;<code>Object</code>
  3823. %p If <span class="code">withLegend</span> is set <code>true</code>, legend will be shown together with the specified data.
  3824. %h5 Example:
  3825. %div.sourcecode
  3826. %pre
  3827. %code.html.javascript
  3828. \// data1 will be shown.
  3829. chart.show('data1');
  3830. \
  3831. \// data1 and data2 will be shown.
  3832. chart.show(['data1', 'data2']);
  3833. \
  3834. \// all targets will be shown.
  3835. chart.show();
  3836. \
  3837. \// data1 will be shown together with its legend.
  3838. chart.show('data1', {withLegend: true});
  3839. %hr
  3840. %section
  3841. %h3
  3842. = partial :reference_item_link, locals: { id: 'api.hide' }
  3843. %p This API hides specified targets.
  3844. %br
  3845. %p You can specify multiple targets by giving an array that includes <span class="code">id</span> as <code>String</code>. If no argument is given, all of targets will be hidden.
  3846. %h5 Arguments:
  3847. %div.sourcecode
  3848. %pre
  3849. %code.html.javascript
  3850. \.hide(targetIds, options)
  3851. %p <span class="code">targetIds</span>&nbsp;&nbsp;<code>String</code> or <code>Array</code>
  3852. %p Target ids to be hidden.
  3853. %br
  3854. %p <span class="code">options</span>&nbsp;&nbsp;<code>Object</code>
  3855. %p If <span class="code">withLegend</span> is set <code>true</code>, legend will be hidden together with the specified data.
  3856. %h5 Example:
  3857. %div.sourcecode
  3858. %pre
  3859. %code.html.javascript
  3860. \// data1 will be hidden.
  3861. chart.hide('data1');
  3862. \
  3863. \// data1 and data2 will be hidden.
  3864. chart.hide(['data1', 'data2']);
  3865. \
  3866. \// all targets will be hidden.
  3867. chart.hide();
  3868. \
  3869. \// data1 will be hidden together with its legend.
  3870. chart.hide('data1', {withLegend: true});
  3871. %hr
  3872. %section
  3873. %h3
  3874. = partial :reference_item_link, locals: { id: 'api.toggle' }
  3875. %p This API toggles (shows or hides) specified targets.
  3876. %br
  3877. %p You can specify multiple targets by giving an array that includes <span class="code">id</span> as <code>String</code>. If no argument is given, all of targets will be toggles.
  3878. %h5 Arguments:
  3879. %div.sourcecode
  3880. %pre
  3881. %code.html.javascript
  3882. \.toggle(targetIds, options)
  3883. %p <span class="code">targetIds</span>&nbsp;&nbsp;<code>String</code> or <code>Array</code>
  3884. %p Target ids to be toggled.
  3885. %br
  3886. %p <span class="code">options</span>&nbsp;&nbsp;<code>Object</code>
  3887. %p If <span class="code">withLegend</span> is set <code>true</code>, legend will be toggled together with the specified data.
  3888. %h5 Example:
  3889. %div.sourcecode
  3890. %pre
  3891. %code.html.javascript
  3892. \// data1 will be toggled.
  3893. chart.toggle('data1');
  3894. \
  3895. \// data1 and data2 will be toggled.
  3896. chart.toggle(['data1', 'data2']);
  3897. \
  3898. \// all targets will be toggled.
  3899. chart.toggle();
  3900. \
  3901. \// data1 will be toggled together with its legend.
  3902. chart.toggle('data1', {withLegend: true});
  3903. %hr
  3904. %section
  3905. %h3
  3906. = partial :reference_item_link, locals: { id: 'api.load' }
  3907. %p Load data to the chart.
  3908. %br
  3909. %p You can specify multiple targets by giving an array that includes <span class="code">id</span> as <code>String</code>. If no argument is given, all of targets will be toggles.
  3910. %h5 Arguments:
  3911. %div.sourcecode
  3912. %pre
  3913. %code.html.javascript
  3914. \.load(args)
  3915. %p <span class="code">args</span>&nbsp;&nbsp;<code>Object</code>
  3916. %p If <span class="code">url</span>, <span class="code">json</span>, <span class="code">rows</span> and <span class="code">columns</span> given, the data will be loaded. If data that has the same target id is given, the chart will be updated. Otherwise, new target will be added.
  3917. %br
  3918. %p If <span class="code">classes</span> given, the classes specified by <span class="code">data.classes</span> will be updated. <span class="code">classes</span> must be <code>Object</code> that has target id as keys.
  3919. %br
  3920. %p If <span class="code">categories</span> given, the categories specified by <span class="code">axis.x.categories</span> or <span class="code">data.x</span> will be updated. <span class="code">categories</span> must be <code>Array</code>.
  3921. %br
  3922. %p If <span class="code">axes</span> given, the axes specified by <span class="code">data.axes</span> will be updated. <span class="code">axes</span> must be <code>Object</code> that has target id as keys.
  3923. %br
  3924. %p If <span class="code">colors</span> given, the colors specified by <span class="code">data.colors</span> will be updated. <span class="code">colors</span> must be <code>Object</code> that has target id as keys.
  3925. %br
  3926. %p If <span class="code">type</span> or <span class="code">types</span> given, the type of targets will be updated. <span class="code">type</span> must be <code>String</code> and <span class="code">types</span> must be <code>Object</code>.
  3927. %br
  3928. %p If <span class="code">unload</span> given, data will be unloaded before loading new data. If <code>true</code> given, all of data will be unloaded. If target ids given as <code>String</code> or <code>Array</code>, specified targets will be unloaded.
  3929. %br
  3930. %p If <span class="code">done</span> given, the specified function will be called after data loded.
  3931. %h5 Note:
  3932. %p <span class="code">unload</span> should be used if some data needs to be unloaded simultaneously. If you call <span class="code">unload</span> API soon after/before <span class="code">load</span> instead of <span class="code">unload</span> param, chart will not be rendered properly because of cancel of animation.
  3933. %br
  3934. %p <span class="code">done</span> will be called after data loaded, but it's not after rendering. It's because rendering will finish after some transition and there is some time lag between loading and rendering.
  3935. %h5 Example:
  3936. %div.sourcecode
  3937. %pre
  3938. %code.html.javascript
  3939. \// Load data1 and unload data2 and data3
  3940. chart.load({
  3941. &nbsp;&nbsp;columns: [
  3942. &nbsp;&nbsp;&nbsp;&nbsp;['data1', 100, 200, 150, ...],
  3943. &nbsp;&nbsp;&nbsp;&nbsp;...
  3944. &nbsp;&nbsp;],
  3945. &nbsp;&nbsp;unload: ['data2', 'data3']
  3946. });
  3947. %ul
  3948. %li
  3949. %a( href="/samples/data_load.html" ) Load Data
  3950. %li
  3951. %a( href="/samples/data_stringx.html" ) Load Category Data
  3952. %hr
  3953. %section
  3954. %h3
  3955. = partial :reference_item_link, locals: { id: 'api.unload' }
  3956. %p Unload data to the chart.
  3957. %br
  3958. %p You can specify multiple targets by giving an array that includes <span class="code">id</span> as <code>String</code>. If no argument is given, all of targets will be toggles.
  3959. %h5 Arguments:
  3960. %div.sourcecode
  3961. %pre
  3962. %code.html.javascript
  3963. \.unload(args)
  3964. %p <span class="code">args</span>&nbsp;&nbsp;<code>Object</code>
  3965. %p If <span class="code">ids</span> given, the data that has specified target id will be unloaded. <span class="code">ids</span> should be <code>String</code> or <code>Array</code>. If <span class="code">ids</span> is not specified, all data will be unloaded.
  3966. %br
  3967. %p If <span class="code">done</span> given, the specified function will be called after data loded.
  3968. %h5 Note:
  3969. %p If you call <span class="code">load</span> API soon after/before <span class="code">unload</span>, <span class="code">unload</span> param of <span class="code">load</span> should be used. Otherwise chart will not be rendered properly because of cancel of animation.
  3970. %br
  3971. %p <span class="code">done</span> will be called after data loaded, but it's not after rendering. It's because rendering will finish after some transition and there is some time lag between loading and rendering.
  3972. %h5 Example:
  3973. %div.sourcecode
  3974. %pre
  3975. %code.html.javascript
  3976. \// Unload data2 and data3
  3977. chart.unload({
  3978. &nbsp;&nbsp;ids: ['data2', 'data3']
  3979. });
  3980. %hr
  3981. %section
  3982. %h3
  3983. = partial :reference_item_link, locals: { id: 'api.flow' }
  3984. %p Flow data to the chart.
  3985. %br
  3986. %p By this API, you can append new data points to the chart.
  3987. %h5 Arguments:
  3988. %div.sourcecode
  3989. %pre
  3990. %code.html.javascript
  3991. \.flow(args)
  3992. %p <span class="code">args</span>&nbsp;&nbsp;<code>Object</code>
  3993. %p If <span class="code">json</span>, <span class="code">rows</span> and <span class="code">columns</span> given, the data will be loaded. If data that has the same target id is given, the chart will be appended. Otherwise, new target will be added. One of these is required when calling. If <span class="code">json</span> specified, <span class="code">keys</span> is required as well as <a href="#data-json">data.json</a>
  3994. %br
  3995. %p If <span class="code">to</span> is given, the lower x edge will move to that point. If not given, the lower x edge will move by the number of given data points.
  3996. %br
  3997. %p If <span class="code">length</span> is given, the lower x edge will move by the number of this argument.
  3998. %br
  3999. %p If <span class="code">duration</span> is given, the duration of the transition will be specified value. If not given, <a href="#transition-duration">transition.duration</a> will be used as default.
  4000. %br
  4001. %p If <span class="code">done</span> is given, the specified function will be called when flow ends.
  4002. %h5 Example:
  4003. %div.sourcecode
  4004. %pre
  4005. %code.html.javascript
  4006. \// 2 data points will be apprended to the tail and popped from the head.
  4007. \// After that, 4 data points will be appended and no data points will be poppoed.
  4008. chart.flow({
  4009. &nbsp;&nbsp;columns: [
  4010. &nbsp;&nbsp;&nbsp;&nbsp;['x', '2013-01-11', '2013-01-21'],
  4011. &nbsp;&nbsp;&nbsp;&nbsp;['data1', 500, 200],
  4012. &nbsp;&nbsp;&nbsp;&nbsp;['data2', 100, 300],
  4013. &nbsp;&nbsp;&nbsp;&nbsp;['data3', 200, 120]
  4014. &nbsp;&nbsp;],
  4015. &nbsp;&nbsp;done: function () {
  4016. &nbsp;&nbsp;&nbsp;&nbsp;chart.flow({
  4017. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;columns: [
  4018. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;['x', '2013-02-11', '2013-02-12', '2013-02-13', '2013-02-14'],
  4019. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;['data1', 200, 300, 100, 250],
  4020. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;['data2', 100, 90, 40, 120],
  4021. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;['data3', 100, 100, 300, 500]
  4022. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;],
  4023. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;length: 0
  4024. &nbsp;&nbsp;&nbsp;&nbsp;});
  4025. &nbsp;&nbsp;}
  4026. });
  4027. %ul
  4028. %li
  4029. %a( href="/samples/api_flow.html" ) Flow
  4030. %hr
  4031. %section
  4032. %h3
  4033. = partial :reference_item_link, locals: { id: 'api.select' }
  4034. %p Change data point state to selected.
  4035. %br
  4036. %p By this API, you can select data points. To use this API, <a href="#data-selection-enabled">data.selection.enabled</a> needs to be set <code>true</code>.
  4037. %h5 Arguments:
  4038. %div.sourcecode
  4039. %pre
  4040. %code.html.javascript
  4041. \.select(ids, indices, resetOthers)
  4042. %p <span class="code">ids</span>&nbsp;&nbsp;<code>Array</code>
  4043. %p Specify target ids to be selected. If this argument is not given, all targets will be the candidate.
  4044. %br
  4045. %p <span class="code">indices</span>&nbsp;&nbsp;<code>Array</code>
  4046. %p Specify indices to be selected. If this argument is not given, all data points will be the candidate.
  4047. %br
  4048. %p <span class="code">resetOthers</span>&nbsp;&nbsp;<code>boolean</code>
  4049. %p If this argument is set <code>true</code>, the data points that are not specified by <span class="code">ids</span>, <span class="code">indices</span> will be unselected.
  4050. %h5 Example:
  4051. %div.sourcecode
  4052. %pre
  4053. %code.html.javascript
  4054. \// all data points of data1 will be selected.
  4055. chart.select(['data1']);
  4056. \
  4057. \// 3 data points on index 1, 3, 5 of data1 will be selected.
  4058. chart.select(['data1'], [1,3,5]);
  4059. %hr
  4060. %section
  4061. %h3
  4062. = partial :reference_item_link, locals: { id: 'api.unselect' }
  4063. %p Change data point state to unselected.
  4064. %br
  4065. %p By this API, you can unselect data points. To use this API, <a href="#data-selection-enabled">data.selection.enabled</a> needs to be set <code>true</code>.
  4066. %h5 Arguments:
  4067. %div.sourcecode
  4068. %pre
  4069. %code.html.javascript
  4070. \.unselect(ids, indices)
  4071. %p <span class="code">ids</span>&nbsp;&nbsp;<code>Array</code>
  4072. %p Specify target ids to be unselected. If this argument is not given, all targets will be the candidate.
  4073. %br
  4074. %p <span class="code">indices</span>&nbsp;&nbsp;<code>Array</code>
  4075. %p Specify indices to be unselected. If this argument is not given, all data points will be the candidate.
  4076. %h5 Example:
  4077. %div.sourcecode
  4078. %pre
  4079. %code.html.javascript
  4080. \// all data points of data1 will be unselected.
  4081. chart.unselect(['data1']);
  4082. \
  4083. \// 3 data points on index 1, 3, 5 of data1 will be unselected.
  4084. chart.unselect(['data1'], [1,3,5]);
  4085. %hr
  4086. %section
  4087. %h3
  4088. = partial :reference_item_link, locals: { id: 'api.selected' }
  4089. %p Get selected data points.
  4090. %br
  4091. %p By this API, you can get selected data points information. To use this API, <a href="#data-selection-enabled">data.selection.enabled</a> needs to be set <code>true</code>.
  4092. %h5 Arguments:
  4093. %div.sourcecode
  4094. %pre
  4095. %code.html.javascript
  4096. \.selected(targetId)
  4097. %p <span class="code">targetId</span>&nbsp;&nbsp;<code>String</code>
  4098. %p You can filter the result by giving target id that you want to get. If not given, all of data points will be returned.
  4099. %h5 Example:
  4100. %div.sourcecode
  4101. %pre
  4102. %code.html.javascript
  4103. \// all selected data points will be returned.
  4104. chart.selected();
  4105. \
  4106. \// all selected data points of data1 will be returned.
  4107. chart.selected('data1');
  4108. %hr
  4109. %section
  4110. %h3
  4111. = partial :reference_item_link, locals: { id: 'api.transform' }
  4112. %p Change the type of the chart.
  4113. %h5 Arguments:
  4114. %div.sourcecode
  4115. %pre
  4116. %code.html.javascript
  4117. \.transform(type, targetIds)
  4118. %p <span class="code">type</span>&nbsp;&nbsp;<code>String</code>
  4119. %p Specify the type to be transformed. The types listed in <a href="#data-type">data.type</a> can be used.
  4120. %br
  4121. %p <span class="code">targetIds</span>&nbsp;&nbsp;<code>String</code> or <code>Array</code>
  4122. %p Specify targets to be transformed. If not given, all targets will be the candidate.
  4123. %h5 Example:
  4124. %div.sourcecode
  4125. %pre
  4126. %code.html.javascript
  4127. \// all targets will be bar chart.
  4128. chart.transform('bar');
  4129. \
  4130. \// only data1 will be bar chart.
  4131. chart.transform('bar', 'data1');
  4132. \
  4133. \// only data1 and data2 will be bar chart.
  4134. chart.transform('bar', ['data1', 'data2']);
  4135. %ul
  4136. %li
  4137. %a( href="/samples/transform_line.html" ) Transform to Line Chart
  4138. %a( href="/samples/transform_bar.html" ) Transform to Bar Chart
  4139. %a( href="/samples/transform_pie.html" ) Transform to Pie Chart
  4140. %hr
  4141. %section
  4142. %h3
  4143. = partial :reference_item_link, locals: { id: 'api.groups' }
  4144. %p Update groups for the targets.
  4145. %h5 Arguments:
  4146. %div.sourcecode
  4147. %pre
  4148. %code.html.javascript
  4149. \.groups(groups)
  4150. %p <span class="code">groups</span>&nbsp;&nbsp;<code>Array</code>
  4151. %p This argument needs to be an <code>Array</code> that includes one or more <code>Array</code> that includes target ids to be grouped.
  4152. %h5 Example:
  4153. %div.sourcecode
  4154. %pre
  4155. %code.html.javascript
  4156. \// data1 and data2 will be a new group.
  4157. chart.groups([['data1', 'data2']]);
  4158. %ul
  4159. %li
  4160. %a( href="/samples/chart_bar_stacked.html" ) Stacked Bar Chart
  4161. %hr
  4162. %section
  4163. %h3
  4164. = partial :reference_item_link, locals: { id: 'api.xgrids' }
  4165. %p Update x grid lines.
  4166. %h5 Arguments:
  4167. %div.sourcecode
  4168. %pre
  4169. %code.html.javascript
  4170. \.xgrids(grids)
  4171. %p <span class="code">grids</span>&nbsp;&nbsp;<code>Array</code>
  4172. %p X grid lines will be replaced with this argument. The format of this argument is the same as <a href="#grid-x-lines">grid.x.lines</a>.
  4173. %h5 Example:
  4174. %div.sourcecode
  4175. %pre
  4176. %code.html.javascript
  4177. \// Show 2 x grid lines
  4178. chart.xgrids([
  4179. &nbsp;&nbsp;{value: 1, text:'Label 1'},
  4180. &nbsp;&nbsp;{value: 4, text: 'Label 4'}
  4181. ]);
  4182. %ul
  4183. %li
  4184. %a( href="/samples/api_grid_x.html" ) X Grids
  4185. %hr
  4186. %section
  4187. %h3
  4188. = partial :reference_item_link, locals: { id: 'api.xgrids.add' }
  4189. %p Add x grid lines.
  4190. %br
  4191. %p This API adds new x grid lines instead of replacing like <a href="#api-xgrids">xgrids</a>.
  4192. %h5 Arguments:
  4193. %div.sourcecode
  4194. %pre
  4195. %code.html.javascript
  4196. \.xgrids.add(grids)
  4197. %p <span class="code">grids</span>&nbsp;&nbsp;<code>Array</code> or <code>Object</code>
  4198. %p New x grid lines will be added. The format of this argument is the same as <a href="#grid-x-lines">grid.x.lines</a> and it's possible to give an <code>Object</code> if only one line will be added.
  4199. %h5 Example:
  4200. %div.sourcecode
  4201. %pre
  4202. %code.html.javascript
  4203. \// Add a new x grid line
  4204. chart.xgrids.add(
  4205. &nbsp;&nbsp;{value: 4, text: 'Label 4'}
  4206. );
  4207. \
  4208. \// Add new x grid lines
  4209. chart.xgrids.add([
  4210. &nbsp;&nbsp;{value: 2, text: 'Label 2'},
  4211. &nbsp;&nbsp;{value: 4, text: 'Label 4'}
  4212. ]);
  4213. %ul
  4214. %li
  4215. %a( href="/samples/api_grid_x.html" ) X Grids
  4216. %hr
  4217. %section
  4218. %h3
  4219. = partial :reference_item_link, locals: { id: 'api.xgrids.remove' }
  4220. %p Remove x grid lines.
  4221. %br
  4222. %p This API removes x grid lines.
  4223. %h5 Arguments:
  4224. %div.sourcecode
  4225. %pre
  4226. %code.html.javascript
  4227. \.xgrids.remove(args)
  4228. %p <span class="code">args</span>&nbsp;&nbsp;<code>Object</code>
  4229. %p This argument should include <span class="code">value</span> or <span class="code">class</span>. If <span class="code">value</span> is given, the x grid lines that have specified x value will be removed. If <span class="code">class</span> is given, the x grid lines that have specified class will be removed. If <span class="code">args</span> is not given, all of x grid lines will be removed.
  4230. %h5 Example:
  4231. %div.sourcecode
  4232. %pre
  4233. %code.html.javascript
  4234. \// x grid line on x = 2 will be removed
  4235. chart.xgrids.remove({value: 2});
  4236. \
  4237. \// x grid lines that have 'grid-A' will be removed
  4238. chart.xgrids.remove({class: 'grid-A'});
  4239. \
  4240. \// all of x grid lines will be removed
  4241. chart.xgrids.remove();
  4242. %ul
  4243. %li
  4244. %a( href="/samples/api_grid_x.html" ) X Grids
  4245. %hr
  4246. %section
  4247. %h3
  4248. = partial :reference_item_link, locals: { id: 'api.ygrids' }
  4249. %p Update y grid lines.
  4250. %h5 Arguments:
  4251. %div.sourcecode
  4252. %pre
  4253. %code.html.javascript
  4254. \.ygrids(grids)
  4255. %p <span class="code">grids</span>&nbsp;&nbsp;<code>Array</code>
  4256. %p X grid lines will be replaced with this argument. The format of this argument is the same as <a href="#grid-y-lines">grid.y.lines</a>.
  4257. %h5 Example:
  4258. %div.sourcecode
  4259. %pre
  4260. %code.html.javascript
  4261. \// Show 2 y grid lines
  4262. chart.ygrids([
  4263. &nbsp;&nbsp;{value: 100, text:'Label 1'},
  4264. &nbsp;&nbsp;{value: 400, text: 'Label 4'}
  4265. ]);
  4266. %hr
  4267. %section
  4268. %h3
  4269. = partial :reference_item_link, locals: { id: 'api.ygrids.add' }
  4270. %p Add y grid lines.
  4271. %br
  4272. %p This API adds new y grid lines instead of replacing like <a href="#api-ygrids">ygrids</a>.
  4273. %h5 Arguments:
  4274. %div.sourcecode
  4275. %pre
  4276. %code.html.javascript
  4277. \.ygrids.add(grids)
  4278. %p <span class="code">grids</span>&nbsp;&nbsp;<code>Array</code> or <code>Object</code>
  4279. %p New y grid lines will be added. The format of this argument is the same as <a href="#grid-y-lines">grid.y.lines</a> and it's possible to give an <code>Object</code> if only one line will be added.
  4280. %h5 Example:
  4281. %div.sourcecode
  4282. %pre
  4283. %code.html.javascript
  4284. \// Add a new y grid line
  4285. chart.ygrids.add(
  4286. &nbsp;&nbsp;{value: 400, text: 'Label 4'}
  4287. );
  4288. \
  4289. \// Add new y grid lines
  4290. chart.ygrids.add([
  4291. &nbsp;&nbsp;{value: 200, text: 'Label 2'},
  4292. &nbsp;&nbsp;{value: 400, text: 'Label 4'}
  4293. ]);
  4294. %hr
  4295. %section
  4296. %h3
  4297. = partial :reference_item_link, locals: { id: 'api.ygrids.remove' }
  4298. %p Remove y grid lines.
  4299. %br
  4300. %p This API removes y grid lines.
  4301. %h5 Arguments:
  4302. %div.sourcecode
  4303. %pre
  4304. %code.html.javascript
  4305. \.ygrids.remove(args)
  4306. %p <span class="code">args</span>&nbsp;&nbsp;<code>Object</code>
  4307. %p This argument should include <span class="code">value</span> or <span class="code">class</span>. If <span class="code">value</span> is given, the y grid lines that have specified y value will be removed. If <span class="code">class</span> is given, the y grid lines that have specified class will be removed. If <span class="code">args</span> is not given, all of y grid lines will be removed.
  4308. %h5 Example:
  4309. %div.sourcecode
  4310. %pre
  4311. %code.html.javascript
  4312. \// y grid line on y = 200 will be removed
  4313. chart.ygrids.remove({value: 200});
  4314. \
  4315. \// y grid lines that have 'grid-A' will be removed
  4316. chart.ygrids.remove({class: 'grid-A'});
  4317. \
  4318. \// all of y grid lines will be removed
  4319. chart.ygrids.remove();
  4320. %hr
  4321. %section
  4322. %h3
  4323. = partial :reference_item_link, locals: { id: 'api.regions' }
  4324. %p Update regions.
  4325. %h5 Arguments:
  4326. %div.sourcecode
  4327. %pre
  4328. %code.html.javascript
  4329. \.regions(regions)
  4330. %p <span class="code">regions</span>&nbsp;&nbsp;<code>Array</code>
  4331. %p Regions will be replaced with this argument. The format of this argument is the same as <a href="#regions">regions</a>.
  4332. %h5 Example:
  4333. %div.sourcecode
  4334. %pre
  4335. %code.html.javascript
  4336. \// Show 2 regions
  4337. chart.regions([
  4338. &nbsp;&nbsp;{axis: 'x', start: 5, class: 'regionX'},
  4339. &nbsp;&nbsp;{axis: 'y', end: 50, class: 'regionY'}
  4340. ]);
  4341. %hr
  4342. %section
  4343. %h3
  4344. = partial :reference_item_link, locals: { id: 'api.regions.add' }
  4345. %p Add new region.
  4346. %br
  4347. %p This API adds new region instead of replacing like <a href="#api-regions">regions</a>.
  4348. %h5 Arguments:
  4349. %div.sourcecode
  4350. %pre
  4351. %code.html.javascript
  4352. \.regions.add(regions)
  4353. %p <span class="code">regions</span>&nbsp;&nbsp;<code>Array</code> or <code>Object</code>
  4354. %p New region will be added. The format of this argument is the same as <a href="#regions">regions</a> and it's possible to give an <code>Object</code> if only one region will be added.
  4355. %h5 Example:
  4356. %div.sourcecode
  4357. %pre
  4358. %code.html.javascript
  4359. \// Add a new region
  4360. chart.regions.add(
  4361. &nbsp;&nbsp;{axis: 'x', start: 5, class: 'regionX'}
  4362. );
  4363. \
  4364. \// Add new regions
  4365. chart.regions.add([
  4366. &nbsp;&nbsp;{axis: 'x', start: 5, class: 'regionX'},
  4367. &nbsp;&nbsp;{axis: 'y', end: 50, class: 'regionY'}
  4368. ]);
  4369. %hr
  4370. %section
  4371. %h3
  4372. = partial :reference_item_link, locals: { id: 'api.regions.remove' }
  4373. %p Remove regions.
  4374. %br
  4375. %p This API removes regions.
  4376. %h5 Arguments:
  4377. %div.sourcecode
  4378. %pre
  4379. %code.html.javascript
  4380. \.regions.remove(args)
  4381. %p <span class="code">args</span>&nbsp;&nbsp;<code>Object</code>
  4382. %p This argument should include <span class="code">classes</span>. If <span class="code">classes</span> is given, the regions that have one of the specified classes will be removed. If <span class="code">args</span> is not given, all of regions will be removed.
  4383. %h5 Example:
  4384. %div.sourcecode
  4385. %pre
  4386. %code.html.javascript
  4387. \// regions that have 'region-A' or 'region-B' will be removed.
  4388. chart.regions.remove({classes: ['region-A', 'region-B']});
  4389. \
  4390. \// all of regions will be removed.
  4391. chart.regions.remove();
  4392. %hr
  4393. %section
  4394. %h3
  4395. = partial :reference_item_link, locals: { id: 'api.data' }
  4396. %p Get data loaded in the chart.
  4397. %h5 Arguments:
  4398. %div.sourcecode
  4399. %pre
  4400. %code.html.javascript
  4401. \.data(targetIds)
  4402. %p <span class="code">targetIds</span>&nbsp;&nbsp;<code>String</code> or <code>Array</code>
  4403. %p If this argument is given, this API returns the specified target data. If this argument is not given, all of data will be returned.
  4404. %h5 Example:
  4405. %div.sourcecode
  4406. %pre
  4407. %code.html.javascript
  4408. \// Get only data1 data
  4409. chart.data('data1');
  4410. \
  4411. \// Get data1 and data2 data
  4412. chart.data(['data1', 'data2']);
  4413. \
  4414. \// Get all data
  4415. chart.data();
  4416. %hr
  4417. %section
  4418. %h3
  4419. = partial :reference_item_link, locals: { id: 'api.data.shown' }
  4420. %p Get data shown in the chart.
  4421. %h5 Arguments:
  4422. %div.sourcecode
  4423. %pre
  4424. %code.html.javascript
  4425. \.data.shown(targetIds)
  4426. %p <span class="code">targetIds</span>&nbsp;&nbsp;<code>String</code> or <code>Array</code>
  4427. %p If this argument is given, this API filters the data with specified target ids. If this argument is not given, all shown data will be returned.
  4428. %h5 Example:
  4429. %div.sourcecode
  4430. %pre
  4431. %code.html.javascript
  4432. \// Get shown data by filtering to include only data1 data
  4433. chart.data.shown('data1');
  4434. \
  4435. \// Get shown data by filtering to include data1 and data2 data
  4436. chart.data.shown(['data1', 'data2']);
  4437. \
  4438. \// Get all shown data
  4439. chart.data.shown();
  4440. %hr
  4441. %section
  4442. %h3
  4443. = partial :reference_item_link, locals: { id: 'api.data.values' }
  4444. %p Get values of the data loaded in the chart.
  4445. %h5 Arguments:
  4446. %div.sourcecode
  4447. %pre
  4448. %code.html.javascript
  4449. \.data.values(targetId)
  4450. %p <span class="code">targetId</span>&nbsp;&nbsp;<code>String</code>
  4451. %p This API returns the values of specified target. If this argument is not given, <code>null</code> will be retruned.
  4452. %h5 Example:
  4453. %div.sourcecode
  4454. %pre
  4455. %code.html.javascript
  4456. \// Get data1 values
  4457. chart.data.values('data1');
  4458. %hr
  4459. %section
  4460. %h3
  4461. = partial :reference_item_link, locals: { id: 'api.data.names' }
  4462. %p Get and set names of the data loaded in the chart.
  4463. %h5 Arguments:
  4464. %div.sourcecode
  4465. %pre
  4466. %code.html.javascript
  4467. \.data.names(names)
  4468. %p <span class="code">names</span>&nbsp;&nbsp;<code>Object</code>
  4469. %p If this argument is given, the names of data will be updated. If not given, the current names will be returned. The format of this argument is the same as <a href="#data-names">data.names</a>.
  4470. %h5 Example:
  4471. %div.sourcecode
  4472. %pre
  4473. %code.html.javascript
  4474. \// Get current names
  4475. chart.data.names();
  4476. \
  4477. \// Update names
  4478. chart.data.names({
  4479. &nbsp;&nbsp;data1: 'New Name 1',
  4480. &nbsp;&nbsp;data2: 'New Name 2'
  4481. });
  4482. %hr
  4483. %section
  4484. %h3
  4485. = partial :reference_item_link, locals: { id: 'api.data.colors' }
  4486. %p Get and set colors of the data loaded in the chart.
  4487. %h5 Arguments:
  4488. %div.sourcecode
  4489. %pre
  4490. %code.html.javascript
  4491. \.data.colors(colors)
  4492. %p <span class="code">colors</span>&nbsp;&nbsp;<code>Object</code>
  4493. %p If this argument is given, the colors of data will be updated. If not given, the current colors will be returned. The format of this argument is the same as <a href="#data-colors">data.colors</a>.
  4494. %h5 Example:
  4495. %div.sourcecode
  4496. %pre
  4497. %code.html.javascript
  4498. \// Get current colors
  4499. chart.data.colors();
  4500. \
  4501. \// Update colors
  4502. chart.data.colors({
  4503. &nbsp;&nbsp;data1: '#FFFFFF',
  4504. &nbsp;&nbsp;data2: '#000000'
  4505. });
  4506. %hr
  4507. %section
  4508. %h3
  4509. = partial :reference_item_link, locals: { id: 'api.data.axes' }
  4510. %p Get and set axes of the data loaded in the chart.
  4511. %h5 Arguments:
  4512. %div.sourcecode
  4513. %pre
  4514. %code.html.javascript
  4515. \.data.axes(axes)
  4516. %p <span class="code">axes</span>&nbsp;&nbsp;<code>Object</code>
  4517. %p If this argument is given, the axes of data will be updated. If not given, the current axes will be returned. The format of this argument is the same as <a href="#data-axes">data.axes</a>.
  4518. %h5 Example:
  4519. %div.sourcecode
  4520. %pre
  4521. %code.html.javascript
  4522. \// Get current axes
  4523. chart.data.axes();
  4524. \
  4525. \// Update axes
  4526. chart.data.axes({
  4527. &nbsp;&nbsp;data1: 'y',
  4528. &nbsp;&nbsp;data2: 'y2'
  4529. });
  4530. %hr
  4531. %section
  4532. %h3
  4533. = partial :reference_item_link, locals: { id: 'api.x' }
  4534. %p Get and set x values for the chart.
  4535. %h5 Arguments:
  4536. %div.sourcecode
  4537. %pre
  4538. %code.html.javascript
  4539. \.x(x)
  4540. %p <span class="code">x</span>&nbsp;&nbsp;<code>Array</code>
  4541. %p If <span class="code">x</span> is given, x values of every target will be updated. If no argument is given, current x values will be returned as an <code>Object</code> whose keys are the target ids.
  4542. %h5 Example:
  4543. %div.sourcecode
  4544. %pre
  4545. %code.html.javascript
  4546. \// Get current x values
  4547. chart.x();
  4548. \
  4549. \// Update x values for all targets
  4550. chart.x([100, 200, 300, 400, ...]);
  4551. %hr
  4552. %section
  4553. %h3
  4554. = partial :reference_item_link, locals: { id: 'api.xs' }
  4555. %p Get and set x values for the chart.
  4556. %h5 Arguments:
  4557. %div.sourcecode
  4558. %pre
  4559. %code.html.javascript
  4560. \.xs(xs)
  4561. %p <span class="code">xs</span>&nbsp;&nbsp;<code>Object</code>
  4562. %p If <span class="code">xs</span> is given, specified target's x values will be updated. If no argument is given, current x values will be returned as an <code>Object</code> whose keys are the target ids.
  4563. %h5 Example:
  4564. %div.sourcecode
  4565. %pre
  4566. %code.html.javascript
  4567. \// Get current x values
  4568. chart.xs();
  4569. \
  4570. \// Update x values for all targets
  4571. chart.xs({
  4572. &nbsp;&nbsp;data1: [10, 20, 30, 40, ...],
  4573. &nbsp;&nbsp;data2: [100, 200, 300, 400, ...]
  4574. });
  4575. %hr
  4576. %section
  4577. %h3
  4578. = partial :reference_item_link, locals: { id: 'api.axis.labels' }
  4579. %p Get and set axis labels.
  4580. %h5 Arguments:
  4581. %div.sourcecode
  4582. %pre
  4583. %code.html.javascript
  4584. \.axis.labels(labels)
  4585. %p <span class="code">labels</span>&nbsp;&nbsp;<code>Object</code>
  4586. %p If <span class="code">labels</span> is given, specified axis' label will be updated.
  4587. %h5 Example:
  4588. %div.sourcecode
  4589. %pre
  4590. %code.html.javascript
  4591. \// Update axis' label
  4592. chart.axis.labels({
  4593. &nbsp;&nbsp;x: 'New X Axis Label',
  4594. &nbsp;&nbsp;y: 'New Y Axis Label'
  4595. });
  4596. %ul
  4597. %li
  4598. %a( href="/samples/api_axis_label.html" ) Update Axis Label
  4599. %hr
  4600. %section
  4601. %h3
  4602. = partial :reference_item_link, locals: { id: 'api.axis.min' }
  4603. %p Get and set axis min value.
  4604. %h5 Arguments:
  4605. %div.sourcecode
  4606. %pre
  4607. %code.html.javascript
  4608. \.axis.min(min)
  4609. %p <span class="code">min</span>&nbsp;&nbsp;<code>Object</code>
  4610. %p If <span class="code">min</span> is given, specified axis' min value will be updated. If no argument is given, the current min values for each axis will be returned.
  4611. %h5 Example:
  4612. %div.sourcecode
  4613. %pre
  4614. %code.html.javascript
  4615. \// Update axis' min
  4616. chart.axis.min({
  4617. &nbsp;&nbsp;x: -10,
  4618. &nbsp;&nbsp;y: 1000,
  4619. &nbsp;&nbsp;y2: 100
  4620. });
  4621. %ul
  4622. %li
  4623. %a( href="/samples/api_axis_range.html" ) Update Axis Range
  4624. %hr
  4625. %section
  4626. %h3
  4627. = partial :reference_item_link, locals: { id: 'api.axis.max' }
  4628. %p Get and set axis max value.
  4629. %h5 Arguments:
  4630. %div.sourcecode
  4631. %pre
  4632. %code.html.javascript
  4633. \.axis.max(max)
  4634. %p <span class="code">max</span>&nbsp;&nbsp;<code>Object</code>
  4635. %p If <span class="code">max</span> is given, specified axis' max value will be updated. If no argument is given, the current max values for each axis will be returned.
  4636. %h5 Example:
  4637. %div.sourcecode
  4638. %pre
  4639. %code.html.javascript
  4640. \// Update axis' max
  4641. chart.axis.max({
  4642. &nbsp;&nbsp;x: 100,
  4643. &nbsp;&nbsp;y: 1000,
  4644. &nbsp;&nbsp;y2: 10000
  4645. });
  4646. %ul
  4647. %li
  4648. %a( href="/samples/api_axis_range.html" ) Update Axis Range
  4649. %hr
  4650. %section
  4651. %h3
  4652. = partial :reference_item_link, locals: { id: 'api.axis.range' }
  4653. %p Get and set axis min and max value.
  4654. %h5 Arguments:
  4655. %div.sourcecode
  4656. %pre
  4657. %code.html.javascript
  4658. \.axis.range(range)
  4659. %p <span class="code">range</span>&nbsp;&nbsp;<code>Object</code>
  4660. %p If <span class="code">range</span> is given, specified axis' min and max value will be updated. If no argument is given, the current min and max values for each axis will be returned.
  4661. %h5 Example:
  4662. %div.sourcecode
  4663. %pre
  4664. %code.html.javascript
  4665. \// Update axis' min and max values
  4666. chart.axis.range({
  4667. &nbsp;&nbsp;min: {
  4668. &nbsp;&nbsp;&nbsp;&nbsp;x: -10,
  4669. &nbsp;&nbsp;&nbsp;&nbsp;y: -1000,
  4670. &nbsp;&nbsp;&nbsp;&nbsp;y2: -10000
  4671. &nbsp;&nbsp;},
  4672. &nbsp;&nbsp;max: {
  4673. &nbsp;&nbsp;&nbsp;&nbsp;x: 100,
  4674. &nbsp;&nbsp;&nbsp;&nbsp;y: 1000,
  4675. &nbsp;&nbsp;&nbsp;&nbsp;y2: 10000
  4676. &nbsp;&nbsp;}
  4677. });
  4678. %ul
  4679. %li
  4680. %a( href="/samples/api_axis_range.html" ) Update Axis Range
  4681. %hr
  4682. %section
  4683. %h3
  4684. = partial :reference_item_link, locals: { id: 'api.axis.types' }
  4685. %p Get and set axis y/y2 types.
  4686. %h5 Arguments:
  4687. %div.sourcecode
  4688. %pre
  4689. %code.html.javascript
  4690. \.axis.types(types)
  4691. %p <span class="code">types</span>&nbsp;&nbsp;<code>Object</code>
  4692. %p If <span class="code">types</span> is given, specified axis' type value will be updated. If no argument is given, the current types for y/y2 axis will be returned.
  4693. %h5 Example:
  4694. %div.sourcecode
  4695. %pre
  4696. %code.html.javascript
  4697. \// Update axis' types
  4698. chart.axis.types({
  4699. &nbsp;&nbsp;y: 'linear',
  4700. &nbsp;&nbsp;y2: 'log'
  4701. });
  4702. %hr
  4703. %section
  4704. %h3
  4705. = partial :reference_item_link, locals: { id: 'api.legend.show' }
  4706. %p Show legend for each target.
  4707. %h5 Arguments:
  4708. %div.sourcecode
  4709. %pre
  4710. %code.html.javascript
  4711. \.legend.show(targetIds)
  4712. %p <span class="code">targetIds</span>&nbsp;&nbsp;<code>Array</code> or <code>String</code>
  4713. %p If <span class="code">targetIds</span> is given, specified target's legend will be shown. If only one target is the candidate, <code>String</code> can be passed. If no argument is given, all of target's legend will be shown.
  4714. %h5 Example:
  4715. %div.sourcecode
  4716. %pre
  4717. %code.html.javascript
  4718. \// Show legend for data1.
  4719. chart.legend.show('data1');
  4720. \
  4721. \// Show legend for data1 and data2.
  4722. chart.legend.show(['data1', 'data2']);
  4723. \
  4724. \// Show all legend.
  4725. chart.legend.show();
  4726. %hr
  4727. %section
  4728. %h3
  4729. = partial :reference_item_link, locals: { id: 'api.legend.hide' }
  4730. %p Hide legend for each target.
  4731. %div.sourcecode
  4732. %pre
  4733. %code.html.javascript
  4734. \.legend.hide(targetIds)
  4735. %p <span class="code">targetIds</span>&nbsp;&nbsp;<code>Array</code> or <code>String</code>
  4736. %p If <span class="code">targetIds</span> is given, specified target's legend will be hidden. If only one target is the candidate, <code>String</code> can be passed. If no argument is given, all of target's legend will be hidden.
  4737. %h5 Example:
  4738. %div.sourcecode
  4739. %pre
  4740. %code.html.javascript
  4741. \// Hide legend for data1.
  4742. chart.legend.hide('data1');
  4743. \
  4744. \// Hide legend for data1 and data2.
  4745. chart.legend.hide(['data1', 'data2']);
  4746. \
  4747. \// Hide all legend.
  4748. chart.legend.hide();
  4749. %hr
  4750. %section
  4751. %h3
  4752. = partial :reference_item_link, locals: { id: 'api.subchart.isShown' }
  4753. %p Returns <code>true</code> if the sub chart is shown.
  4754. %h5 Example:
  4755. %div.sourcecode
  4756. %pre
  4757. %code.html.javascript
  4758. if (chart.subchart.isShown()) {
  4759. &nbsp;&nbsp;// Sub chart is shown
  4760. }
  4761. %hr
  4762. %section
  4763. %h3
  4764. = partial :reference_item_link, locals: { id: 'api.subchart.show' }
  4765. %p Shows sub chart at the bottom of the chart.
  4766. %h5 Example:
  4767. %div.sourcecode
  4768. %pre
  4769. %code.html.javascript
  4770. \// Show sub chart
  4771. chart.subchart.show();
  4772. %hr
  4773. %section
  4774. %h3
  4775. = partial :reference_item_link, locals: { id: 'api.subchart.hide' }
  4776. %p Hides sub chart.
  4777. %h5 Example:
  4778. %div.sourcecode
  4779. %pre
  4780. %code.html.javascript
  4781. \// Hide sub chart
  4782. chart.subchart.hide();
  4783. %hr
  4784. %section
  4785. %h3
  4786. = partial :reference_item_link, locals: { id: 'api.zoom' }
  4787. %p Zoom by giving x domain.
  4788. %h5 Arguments:
  4789. %div.sourcecode
  4790. %pre
  4791. %code.html.javascript
  4792. \.zoom(domain)
  4793. %p <span class="code">domain</span>&nbsp;&nbsp;<code>Array</code>
  4794. %p If <span class="code">domain</span> is given, the chart will be zoomed to the given domain. If no argument is given, the current zoomed domain will be returned.
  4795. %h5 Example:
  4796. %div.sourcecode
  4797. %pre
  4798. %code.html.javascript
  4799. \// Zoom to specified domain
  4800. chart.zoom([10, 20]);
  4801. \
  4802. \// Get the current zoomed domain
  4803. chart.zoom();
  4804. %hr
  4805. %section
  4806. %h3
  4807. = partial :reference_item_link, locals: { id: 'api.unzoom' }
  4808. %p Unzoom to the original domain.
  4809. %h5 Arguments:
  4810. %div.sourcecode
  4811. %pre
  4812. %code.html.javascript
  4813. \.unzoom()
  4814. %h5 Example:
  4815. %div.sourcecode
  4816. %pre
  4817. %code.html.javascript
  4818. \// Unzoom to the original domain
  4819. chart.unzoom();
  4820. %hr
  4821. %section
  4822. %h3
  4823. = partial :reference_item_link, locals: { id: 'api.zoom.enable' }
  4824. %p Enable and disable zooming.
  4825. %h5 Arguments:
  4826. %div.sourcecode
  4827. %pre
  4828. %code.html.javascript
  4829. \.zoom.enable(enabled)
  4830. %p <span class="code">enabled</span>&nbsp;&nbsp;<code>Boolean</code>
  4831. %p If <span class="code">enabled</span> is <code>true</code>, the feature of zooming will be enabled. If <code>false</code> is given, it will be disabled.
  4832. %h5 Example:
  4833. %div.sourcecode
  4834. %pre
  4835. %code.html.javascript
  4836. \// Enable zooming
  4837. chart.zoom.enable(true);
  4838. %hr
  4839. %section
  4840. %h3
  4841. = partial :reference_item_link, locals: { id: 'api.resize' }
  4842. %p Resize the chart.
  4843. %h5 Arguments:
  4844. %div.sourcecode
  4845. %pre
  4846. %code.html.javascript
  4847. \.resize(size)
  4848. %p <span class="code">size</span>&nbsp;&nbsp;<code>Object</code>
  4849. %p This argument should include <span class="code">width</span> and <span class="code">height</span> in pixels.
  4850. %h5 Example:
  4851. %div.sourcecode
  4852. %pre
  4853. %code.html.javascript
  4854. \// Resize to 640x480
  4855. chart.resize({
  4856. &nbsp;&nbsp;height: 640,
  4857. &nbsp;&nbsp;width: 480
  4858. });
  4859. %hr
  4860. %section
  4861. %h3
  4862. = partial :reference_item_link, locals: { id: 'api.flush' }
  4863. %p Force to redraw.
  4864. %h5 Arguments:
  4865. %div.sourcecode
  4866. %pre
  4867. %code.html.javascript
  4868. \.flush()
  4869. %h5 Example:
  4870. %div.sourcecode
  4871. %pre
  4872. %code.html.javascript
  4873. \// Force to redraw
  4874. chart.flush();
  4875. %hr
  4876. %section
  4877. %h3
  4878. = partial :reference_item_link, locals: { id: 'api.destroy' }
  4879. %p Reset the chart object and remove element and events completely.
  4880. %h5 Arguments:
  4881. %div.sourcecode
  4882. %pre
  4883. %code.html.javascript
  4884. \.destroy()
  4885. %h5 Example:
  4886. %div.sourcecode
  4887. %pre
  4888. %code.html.javascript
  4889. \// Destroy the chart
  4890. chart.destroy();
  4891. \
  4892. \// If you have a reference to the chart make sure to call destroy in the following manner
  4893. chart = chart.destroy();
  4894. %hr
  4895. %br
  4896. %section
  4897. %h2 CLASS
  4898. %hr
  4899. %section
  4900. %h3
  4901. = partial :reference_item_link, locals: { id: 'class.c3-chart' }
  4902. %p ...
  4903. %hr
  4904. %section
  4905. %h3
  4906. = partial :reference_item_link, locals: { id: 'class.c3-chart-line' }
  4907. %p ...
  4908. %hr
  4909. %section
  4910. %h3
  4911. = partial :reference_item_link, locals: { id: 'class.c3-chart-lines' }
  4912. %p ...
  4913. %hr
  4914. %section
  4915. %h3
  4916. = partial :reference_item_link, locals: { id: 'class.c3-chart-bar' }
  4917. %p ...
  4918. %hr
  4919. %section
  4920. %h3
  4921. = partial :reference_item_link, locals: { id: 'class.c3-chart-bars' }
  4922. %p ...
  4923. %hr
  4924. %section
  4925. %h3
  4926. = partial :reference_item_link, locals: { id: 'class.c3-chart-text' }
  4927. %p ...
  4928. %hr
  4929. %section
  4930. %h3
  4931. = partial :reference_item_link, locals: { id: 'class.c3-chart-texts' }
  4932. %p ...
  4933. %hr
  4934. %section
  4935. %h3
  4936. = partial :reference_item_link, locals: { id: 'class.c3-chart-arc' }
  4937. %p ...
  4938. %hr
  4939. %section
  4940. %h3
  4941. = partial :reference_item_link, locals: { id: 'class.c3-chart-arcs' }
  4942. %p ...
  4943. %hr
  4944. %section
  4945. %h3
  4946. = partial :reference_item_link, locals: { id: 'class.c3-chart-arcs-title' }
  4947. %p ...
  4948. %hr
  4949. %section
  4950. %h3
  4951. = partial :reference_item_link, locals: { id: 'class.c3-chart-arcs-background' }
  4952. %p ...
  4953. %hr
  4954. %section
  4955. %h3
  4956. = partial :reference_item_link, locals: { id: 'class.c3-chart-arcs-gauge-unit' }
  4957. %p ...
  4958. %hr
  4959. %section
  4960. %h3
  4961. = partial :reference_item_link, locals: { id: 'class.c3-chart-arcs-gauge-max' }
  4962. %p ...
  4963. %hr
  4964. %section
  4965. %h3
  4966. = partial :reference_item_link, locals: { id: 'class.c3-chart-arcs-gauge-min' }
  4967. %p ...
  4968. %hr
  4969. %section
  4970. %h3
  4971. = partial :reference_item_link, locals: { id: 'class.c3-selected-circle' }
  4972. %p ...
  4973. %hr
  4974. %section
  4975. %h3
  4976. = partial :reference_item_link, locals: { id: 'class.c3-selected-circles' }
  4977. %p ...
  4978. %hr
  4979. %section
  4980. %h3
  4981. = partial :reference_item_link, locals: { id: 'class.c3-event-rect' }
  4982. %p ...
  4983. %hr
  4984. %section
  4985. %h3
  4986. = partial :reference_item_link, locals: { id: 'class.c3-event-rects' }
  4987. %p ...
  4988. %hr
  4989. %section
  4990. %h3
  4991. = partial :reference_item_link, locals: { id: 'class.c3-event-rects-single' }
  4992. %p ...
  4993. %hr
  4994. %section
  4995. %h3
  4996. = partial :reference_item_link, locals: { id: 'class.c3-event-rects-multiple' }
  4997. %p ...
  4998. %hr
  4999. %section
  5000. %h3
  5001. = partial :reference_item_link, locals: { id: 'class.c3-zoom-rect' }
  5002. %p ...
  5003. %hr
  5004. %section
  5005. %h3
  5006. = partial :reference_item_link, locals: { id: 'class.c3-brush' }
  5007. %p ...
  5008. %hr
  5009. %section
  5010. %h3
  5011. = partial :reference_item_link, locals: { id: 'class.c3-focused' }
  5012. %p ...
  5013. %hr
  5014. %section
  5015. %h3
  5016. = partial :reference_item_link, locals: { id: 'class.c3-region' }
  5017. %p ...
  5018. %hr
  5019. %section
  5020. %h3
  5021. = partial :reference_item_link, locals: { id: 'class.c3-regions' }
  5022. %p ...
  5023. %hr
  5024. %section
  5025. %h3
  5026. = partial :reference_item_link, locals: { id: 'class.c3-tooltip' }
  5027. %p ...
  5028. %hr
  5029. %section
  5030. %h3
  5031. = partial :reference_item_link, locals: { id: 'class.c3-tooltip-name' }
  5032. %p ...
  5033. %hr
  5034. %section
  5035. %h3
  5036. = partial :reference_item_link, locals: { id: 'class.c3-shape' }
  5037. %p ...
  5038. %hr
  5039. %section
  5040. %h3
  5041. = partial :reference_item_link, locals: { id: 'class.c3-shapes' }
  5042. %p ...
  5043. %hr
  5044. %section
  5045. %h3
  5046. = partial :reference_item_link, locals: { id: 'class.c3-line' }
  5047. %p ...
  5048. %hr
  5049. %section
  5050. %h3
  5051. = partial :reference_item_link, locals: { id: 'class.c3-lines' }
  5052. %p ...
  5053. %hr
  5054. %section
  5055. %h3
  5056. = partial :reference_item_link, locals: { id: 'class.c3-bar' }
  5057. %p ...
  5058. %hr
  5059. %section
  5060. %h3
  5061. = partial :reference_item_link, locals: { id: 'class.c3-bars' }
  5062. %p ...
  5063. %hr
  5064. %section
  5065. %h3
  5066. = partial :reference_item_link, locals: { id: 'class.c3-circle' }
  5067. %p ...
  5068. %hr
  5069. %section
  5070. %h3
  5071. = partial :reference_item_link, locals: { id: 'class.c3-circles' }
  5072. %p ...
  5073. %hr
  5074. %section
  5075. %h3
  5076. = partial :reference_item_link, locals: { id: 'class.c3-arc' }
  5077. %p ...
  5078. %hr
  5079. %section
  5080. %h3
  5081. = partial :reference_item_link, locals: { id: 'class.c3-arcs' }
  5082. %p ...
  5083. %hr
  5084. %section
  5085. %h3
  5086. = partial :reference_item_link, locals: { id: 'class.c3-area' }
  5087. %p ...
  5088. %hr
  5089. %section
  5090. %h3
  5091. = partial :reference_item_link, locals: { id: 'class.c3-areas' }
  5092. %p ...
  5093. %hr
  5094. %section
  5095. %h3
  5096. = partial :reference_item_link, locals: { id: 'class.c3-empty' }
  5097. %p ...
  5098. %hr
  5099. %section
  5100. %h3
  5101. = partial :reference_item_link, locals: { id: 'class.c3-text' }
  5102. %p ...
  5103. %hr
  5104. %section
  5105. %h3
  5106. = partial :reference_item_link, locals: { id: 'class.c3-texts' }
  5107. %p ...
  5108. %hr
  5109. %section
  5110. %h3
  5111. = partial :reference_item_link, locals: { id: 'class.c3-gauge-value' }
  5112. %p ...
  5113. %hr
  5114. %section
  5115. %h3
  5116. = partial :reference_item_link, locals: { id: 'class.c3-grid' }
  5117. %p ...
  5118. %hr
  5119. %section
  5120. %h3
  5121. = partial :reference_item_link, locals: { id: 'class.c3-xgrid' }
  5122. %p ...
  5123. %hr
  5124. %section
  5125. %h3
  5126. = partial :reference_item_link, locals: { id: 'class.c3-xgrids' }
  5127. %p ...
  5128. %hr
  5129. %section
  5130. %h3
  5131. = partial :reference_item_link, locals: { id: 'class.c3-xgrid-line' }
  5132. %p ...
  5133. %hr
  5134. %section
  5135. %h3
  5136. = partial :reference_item_link, locals: { id: 'class.c3-xgrid-lines' }
  5137. %p ...
  5138. %hr
  5139. %section
  5140. %h3
  5141. = partial :reference_item_link, locals: { id: 'class.c3-xgrid-focus' }
  5142. %p ...
  5143. %hr
  5144. %section
  5145. %h3
  5146. = partial :reference_item_link, locals: { id: 'class.c3-ygrid' }
  5147. %p ...
  5148. %hr
  5149. %section
  5150. %h3
  5151. = partial :reference_item_link, locals: { id: 'class.c3-ygrids' }
  5152. %p ...
  5153. %hr
  5154. %section
  5155. %h3
  5156. = partial :reference_item_link, locals: { id: 'class.c3-ygrid-line' }
  5157. %p ...
  5158. %hr
  5159. %section
  5160. %h3
  5161. = partial :reference_item_link, locals: { id: 'class.c3-ygrid-lines' }
  5162. %p ...
  5163. %hr
  5164. %section
  5165. %h3
  5166. = partial :reference_item_link, locals: { id: 'class.c3-stanford-elements' }
  5167. %p ...
  5168. %hr
  5169. %section
  5170. %h3
  5171. = partial :reference_item_link, locals: { id: 'class.c3-stanford-line' }
  5172. %p ...
  5173. %hr
  5174. %section
  5175. %h3
  5176. = partial :reference_item_link, locals: { id: 'class.c3-stanford-lines' }
  5177. %p ...
  5178. %hr
  5179. %section
  5180. %h3
  5181. = partial :reference_item_link, locals: { id: 'class.c3-stanford-region' }
  5182. %p ...
  5183. %hr
  5184. %section
  5185. %h3
  5186. = partial :reference_item_link, locals: { id: 'class.c3-stanford-regions' }
  5187. %p ...
  5188. %hr
  5189. %section
  5190. %h3
  5191. = partial :reference_item_link, locals: { id: 'class.c3-stanford-text' }
  5192. %p ...
  5193. %hr
  5194. %section
  5195. %h3
  5196. = partial :reference_item_link, locals: { id: 'class.c3-stanford-texts' }
  5197. %p ...
  5198. %hr
  5199. %section
  5200. %h3
  5201. = partial :reference_item_link, locals: { id: 'class.c3-axis' }
  5202. %p ...
  5203. %hr
  5204. %section
  5205. %h3
  5206. = partial :reference_item_link, locals: { id: 'class.c3-axis-x' }
  5207. %p ...
  5208. %hr
  5209. %section
  5210. %h3
  5211. = partial :reference_item_link, locals: { id: 'class.c3-axis-x-label' }
  5212. %p ...
  5213. %hr
  5214. %section
  5215. %h3
  5216. = partial :reference_item_link, locals: { id: 'class.c3-axis-y' }
  5217. %p ...
  5218. %hr
  5219. %section
  5220. %h3
  5221. = partial :reference_item_link, locals: { id: 'class.c3-axis-y-label' }
  5222. %p ...
  5223. %hr
  5224. %section
  5225. %h3
  5226. = partial :reference_item_link, locals: { id: 'class.c3-axis-y2' }
  5227. %p ...
  5228. %hr
  5229. %section
  5230. %h3
  5231. = partial :reference_item_link, locals: { id: 'class.c3-axis-y2-label' }
  5232. %p ...
  5233. %hr
  5234. %section
  5235. %h3
  5236. = partial :reference_item_link, locals: { id: 'class.c3-legend-item' }
  5237. %p ...
  5238. %hr
  5239. %section
  5240. %h3
  5241. = partial :reference_item_link, locals: { id: 'class.c3-legend-item-event' }
  5242. %p ...
  5243. %hr
  5244. %section
  5245. %h3
  5246. = partial :reference_item_link, locals: { id: 'class.c3-legend-item-tile' }
  5247. %p ...
  5248. %hr
  5249. %section
  5250. %h3
  5251. = partial :reference_item_link, locals: { id: 'class.c3-legend-item-hidden' }
  5252. %p ...
  5253. %hr
  5254. %section
  5255. %h3
  5256. = partial :reference_item_link, locals: { id: 'class.c3-legend-item-focused' }
  5257. %p ...
  5258. %hr
  5259. = partial :footer
  5260. = partial :script
  5261. = partial :script_scroll