123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475 |
- require({cache:{
- 'dojox/charting/plot2d/_PlotEvents':function(){
- define("dojox/charting/plot2d/_PlotEvents", ["dojo/_base/lang", "dojo/_base/array", "dojo/_base/declare", "dojo/_base/connect"],
- function(lang, arr, declare, hub){
- return declare("dojox.charting.plot2d._PlotEvents", null, {
- constructor: function(){
- this._shapeEvents = [];
- this._eventSeries = {};
- },
- destroy: function(){
-
-
- this.resetEvents();
- this.inherited(arguments);
- },
- plotEvent: function(o){
-
-
-
-
- },
- raiseEvent: function(o){
-
-
-
-
- this.plotEvent(o);
- var t = lang.delegate(o);
- t.originalEvent = o.type;
- t.originalPlot = o.plot;
- t.type = "onindirect";
- arr.forEach(this.chart.stack, function(plot){
- if(plot !== this && plot.plotEvent){
- t.plot = plot;
- plot.plotEvent(t);
- }
- }, this);
- },
- connect: function(object, method){
-
-
-
-
-
-
-
-
- this.dirty = true;
- return hub.connect(this, "plotEvent", object, method);
- },
- events: function(){
-
-
-
-
- return !!this.plotEvent.after;
- },
- resetEvents: function(){
-
-
- if(this._shapeEvents.length){
- arr.forEach(this._shapeEvents, function(item){
- item.shape.disconnect(item.handle);
- });
- this._shapeEvents = [];
- }
- this.raiseEvent({type: "onplotreset", plot: this});
- },
- _connectSingleEvent: function(o, eventName){
- this._shapeEvents.push({
- shape: o.eventMask,
- handle: o.eventMask.connect(eventName, this, function(e){
- o.type = eventName;
- o.event = e;
- this.raiseEvent(o);
- o.event = null;
- })
- });
- },
- _connectEvents: function(o){
- if(o){
- o.chart = this.chart;
- o.plot = this;
- o.hAxis = this.hAxis || null;
- o.vAxis = this.vAxis || null;
- o.eventMask = o.eventMask || o.shape;
- this._connectSingleEvent(o, "onmouseover");
- this._connectSingleEvent(o, "onmouseout");
- this._connectSingleEvent(o, "onclick");
- }
- },
- _reconnectEvents: function(seriesName){
- var a = this._eventSeries[seriesName];
- if(a){
- arr.forEach(a, this._connectEvents, this);
- }
- },
- fireEvent: function(seriesName, eventName, index, eventObject){
-
-
-
-
-
-
-
-
-
-
-
-
- var s = this._eventSeries[seriesName];
- if(s && s.length && index < s.length){
- var o = s[index];
- o.type = eventName;
- o.event = eventObject || null;
- this.raiseEvent(o);
- o.event = null;
- }
- }
- });
- });
- },
- 'dojo/uacss':function(){
- define(["./dom-geometry", "./_base/lang", "./ready", "./_base/sniff", "./_base/window"],
- function(geometry, lang, ready, has, baseWindow){
-
-
-
-
-
-
-
-
-
-
-
- var
- html = baseWindow.doc.documentElement,
- ie = has("ie"),
- opera = has("opera"),
- maj = Math.floor,
- ff = has("ff"),
- boxModel = geometry.boxModel.replace(/-/,''),
- classes = {
- "dj_quirks": has("quirks"),
-
- "dj_opera": opera,
- "dj_khtml": has("khtml"),
- "dj_webkit": has("webkit"),
- "dj_safari": has("safari"),
- "dj_chrome": has("chrome"),
- "dj_gecko": has("mozilla")
- };
- if(ie){
- classes["dj_ie"] = true;
- classes["dj_ie" + maj(ie)] = true;
- classes["dj_iequirks"] = has("quirks");
- }
- if(ff){
- classes["dj_ff" + maj(ff)] = true;
- }
- classes["dj_" + boxModel] = true;
-
- var classStr = "";
- for(var clz in classes){
- if(classes[clz]){
- classStr += clz + " ";
- }
- }
- html.className = lang.trim(html.className + " " + classStr);
-
-
-
- ready(90, function(){
- if(!geometry.isBodyLtr()){
- var rtlClassStr = "dj_rtl dijitRtl " + classStr.replace(/ /g, "-rtl ");
- html.className = lang.trim(html.className + " " + rtlClassStr + "dj_rtl dijitRtl " + classStr.replace(/ /g, "-rtl "));
- }
- });
- return has;
- });
- },
- 'dojox/charting/axis2d/Invisible':function(){
- define("dojox/charting/axis2d/Invisible", ["dojo/_base/lang", "dojo/_base/declare", "./Base", "../scaler/linear",
- "dojox/gfx", "dojox/lang/utils", "dojox/lang/functional", "dojo/string"],
- function(lang, declare, Base, lin, g, du, df, dstring){
-
- var merge = du.merge,
- labelGap = 4,
- centerAnchorLimit = 45;
- return declare("dojox.charting.axis2d.Invisible", Base, {
-
-
-
-
-
-
-
-
- defaultParams: {
- vertical: false,
- fixUpper: "none",
- fixLower: "none",
- natural: false,
- leftBottom: true,
- includeZero: false,
- fixed: true,
- majorLabels: true,
- minorTicks: true,
- minorLabels: true,
- microTicks: false,
- rotation: 0
- },
- optionalParams: {
- min: 0,
- max: 1,
- from: 0,
- to: 1,
- majorTickStep: 4,
- minorTickStep: 2,
- microTickStep: 1,
- labels: [],
-
-
- labelFunc: null,
- maxLabelSize: 0,
- maxLabelCharCount: 0,
- trailingSymbol: null
-
-
- },
- constructor: function(chart, kwArgs){
-
-
-
-
-
-
- this.opt = lang.clone(this.defaultParams);
- du.updateWithObject(this.opt, kwArgs);
- du.updateWithPattern(this.opt, kwArgs, this.optionalParams);
- },
- dependOnData: function(){
-
-
- return !("min" in this.opt) || !("max" in this.opt);
- },
- clear: function(){
-
-
-
-
- delete this.scaler;
- delete this.ticks;
- this.dirty = true;
- return this;
- },
- initialized: function(){
-
-
-
-
- return "scaler" in this && !(this.dirty && this.dependOnData());
- },
- setWindow: function(scale, offset){
-
-
-
-
-
-
-
-
- this.scale = scale;
- this.offset = offset;
- return this.clear();
- },
- getWindowScale: function(){
-
-
- return "scale" in this ? this.scale : 1;
- },
- getWindowOffset: function(){
-
-
- return "offset" in this ? this.offset : 0;
- },
- _groupLabelWidth: function(labels, font, wcLimit){
- if(!labels.length){
- return 0;
- }
- if(lang.isObject(labels[0])){
- labels = df.map(labels, function(label){ return label.text; });
- }
- if (wcLimit) {
- labels = df.map(labels, function(label){
- return lang.trim(label).length == 0 ? "" : label.substring(0, wcLimit) + this.trailingSymbol;
- }, this);
- }
- var s = labels.join("<br>");
- return g._base._getTextBox(s, {font: font}).w || 0;
- },
- calculate: function(min, max, span, labels){
-
-
-
-
-
-
-
-
-
-
-
-
- if(this.initialized()){
- return this;
- }
- var o = this.opt;
- this.labels = "labels" in o ? o.labels : labels;
- this.scaler = lin.buildScaler(min, max, span, o);
- var tsb = this.scaler.bounds;
- if("scale" in this){
-
- o.from = tsb.lower + this.offset;
- o.to = (tsb.upper - tsb.lower) / this.scale + o.from;
-
- if( !isFinite(o.from) ||
- isNaN(o.from) ||
- !isFinite(o.to) ||
- isNaN(o.to) ||
- o.to - o.from >= tsb.upper - tsb.lower
- ){
-
- delete o.from;
- delete o.to;
- delete this.scale;
- delete this.offset;
- }else{
-
- if(o.from < tsb.lower){
- o.to += tsb.lower - o.from;
- o.from = tsb.lower;
- }else if(o.to > tsb.upper){
- o.from += tsb.upper - o.to;
- o.to = tsb.upper;
- }
-
- this.offset = o.from - tsb.lower;
- }
-
- this.scaler = lin.buildScaler(min, max, span, o);
- tsb = this.scaler.bounds;
-
- if(this.scale == 1 && this.offset == 0){
- delete this.scale;
- delete this.offset;
- }
- }
- var ta = this.chart.theme.axis, labelWidth = 0, rotation = o.rotation % 360,
-
- taFont = o.font || (ta.majorTick && ta.majorTick.font) || (ta.tick && ta.tick.font),
- size = taFont ? g.normalizedLength(g.splitFontString(taFont).size) : 0,
- cosr = Math.abs(Math.cos(rotation * Math.PI / 180)),
- sinr = Math.abs(Math.sin(rotation * Math.PI / 180));
- if(rotation < 0){
- rotation += 360;
- }
- if(size){
- if(this.vertical ? rotation != 0 && rotation != 180 : rotation != 90 && rotation != 270){
-
- if(this.labels){
- labelWidth = this._groupLabelWidth(this.labels, taFont, o.maxLabelCharCount);
- }else{
- var labelLength = Math.ceil(
- Math.log(
- Math.max(
- Math.abs(tsb.from),
- Math.abs(tsb.to)
- )
- ) / Math.LN10
- ),
- t = [];
- if(tsb.from < 0 || tsb.to < 0){
- t.push("-");
- }
- t.push(dstring.rep("9", labelLength));
- var precision = Math.floor(
- Math.log( tsb.to - tsb.from ) / Math.LN10
- );
- if(precision > 0){
- t.push(".");
- t.push(dstring.rep("9", precision));
- }
- labelWidth = g._base._getTextBox(
- t.join(""),
- { font: taFont }
- ).w;
- }
- labelWidth = o.maxLabelSize ? Math.min(o.maxLabelSize, labelWidth) : labelWidth;
- }else{
- labelWidth = size;
- }
- switch(rotation){
- case 0:
- case 90:
- case 180:
- case 270:
-
- break;
- default:
-
- var gap1 = Math.sqrt(labelWidth * labelWidth + size * size),
- gap2 = this.vertical ? size * cosr + labelWidth * sinr : labelWidth * cosr + size * sinr;
- labelWidth = Math.min(gap1, gap2);
- break;
- }
- }
- this.scaler.minMinorStep = labelWidth + labelGap;
- this.ticks = lin.buildTicks(this.scaler, o);
- return this;
- },
- getScaler: function(){
-
-
- return this.scaler;
- },
- getTicks: function(){
-
-
- return this.ticks;
- }
- });
- });
- },
- 'dojox/lang/utils':function(){
- define("dojox/lang/utils", ["..", "dojo/_base/lang"],
- function(dojox, lang){
- var du = lang.getObject("lang.utils", true, dojox);
-
- var empty = {}, opts = Object.prototype.toString;
- var clone = function(o){
- if(o){
- switch(opts.call(o)){
- case "[object Array]":
- return o.slice(0);
- case "[object Object]":
- return lang.delegate(o);
- }
- }
- return o;
- }
-
- lang.mixin(du, {
- coerceType: function(target, source){
-
-
-
- switch(typeof target){
- case "number": return Number(eval("(" + source + ")"));
- case "string": return String(source);
- case "boolean": return Boolean(eval("(" + source + ")"));
- }
- return eval("(" + source + ")");
- },
-
- updateWithObject: function(target, source, conv){
-
-
-
-
- if(!source){ return target; }
- for(var x in target){
- if(x in source && !(x in empty)){
- var t = target[x];
- if(t && typeof t == "object"){
- du.updateWithObject(t, source[x], conv);
- }else{
- target[x] = conv ? du.coerceType(t, source[x]) : clone(source[x]);
- }
- }
- }
- return target;
- },
-
- updateWithPattern: function(target, source, pattern, conv){
-
-
-
-
-
- if(!source || !pattern){ return target; }
- for(var x in pattern){
- if(x in source && !(x in empty)){
- target[x] = conv ? du.coerceType(pattern[x], source[x]) : clone(source[x]);
- }
- }
- return target;
- },
-
- merge: function(object, mixin){
-
-
-
- if(mixin){
- var otype = opts.call(object), mtype = opts.call(mixin), t, i, l, m;
- switch(mtype){
- case "[object Array]":
- if(mtype == otype){
- t = new Array(Math.max(object.length, mixin.length));
- for(i = 0, l = t.length; i < l; ++i){
- t[i] = du.merge(object[i], mixin[i]);
- }
- return t;
- }
- return mixin.slice(0);
- case "[object Object]":
- if(mtype == otype && object){
- t = lang.delegate(object);
- for(i in mixin){
- if(i in object){
- l = object[i];
- m = mixin[i];
- if(m !== l){
- t[i] = du.merge(l, m);
- }
- }else{
- t[i] = lang.clone(mixin[i]);
- }
- }
- return t;
- }
- return lang.clone(mixin);
- }
- }
- return mixin;
- }
- });
-
- return du;
- });
- },
- 'dojox/charting/plot2d/Pie':function(){
- define("dojox/charting/plot2d/Pie", ["dojo/_base/lang", "dojo/_base/array" ,"dojo/_base/declare",
- "../Element", "./_PlotEvents", "./common", "../axis2d/common",
- "dojox/gfx", "dojox/gfx/matrix", "dojox/lang/functional", "dojox/lang/utils"],
- function(lang, arr, declare, Element, PlotEvents, dc, da, g, m, df, du){
-
- var FUDGE_FACTOR = 0.2;
- return declare("dojox.charting.plot2d.Pie", [Element, PlotEvents], {
-
-
- defaultParams: {
- labels: true,
- ticks: false,
- fixed: true,
- precision: 1,
- labelOffset: 20,
- labelStyle: "default",
- htmlLabels: true,
- radGrad: "native",
- fanSize: 5,
- startAngle: 0
- },
- optionalParams: {
- radius: 0,
-
- stroke: {},
- outline: {},
- shadow: {},
- fill: {},
- font: "",
- fontColor: "",
- labelWiring: {}
- },
- constructor: function(chart, kwArgs){
-
-
- this.opt = lang.clone(this.defaultParams);
- du.updateWithObject(this.opt, kwArgs);
- du.updateWithPattern(this.opt, kwArgs, this.optionalParams);
- this.run = null;
- this.dyn = [];
- },
- clear: function(){
-
-
-
-
- this.dirty = true;
- this.dyn = [];
- this.run = null;
- return this;
- },
- setAxis: function(axis){
-
-
-
-
- return this;
- },
- addSeries: function(run){
-
-
-
-
- this.run = run;
- return this;
- },
- getSeriesStats: function(){
-
-
-
-
- return lang.delegate(dc.defaultStats);
- },
- initializeScalers: function(){
-
-
- return this;
- },
- getRequiredColors: function(){
-
-
- return this.run ? this.run.data.length : 0;
- },
- render: function(dim, offsets){
-
-
-
-
-
-
-
-
- if(!this.dirty){ return this; }
- this.resetEvents();
- this.dirty = false;
- this._eventSeries = {};
- this.cleanGroup();
- var s = this.group, t = this.chart.theme;
- if(!this.run || !this.run.data.length){
- return this;
- }
-
- var rx = (dim.width - offsets.l - offsets.r) / 2,
- ry = (dim.height - offsets.t - offsets.b) / 2,
- r = Math.min(rx, ry),
- taFont = "font" in this.opt ? this.opt.font : t.axis.font,
- size = taFont ? g.normalizedLength(g.splitFontString(taFont).size) : 0,
- taFontColor = "fontColor" in this.opt ? this.opt.fontColor : t.axis.fontColor,
- startAngle = m._degToRad(this.opt.startAngle),
- start = startAngle, step, filteredRun, slices, labels, shift, labelR,
- run = this.run.data,
- events = this.events();
- if(typeof run[0] == "number"){
- filteredRun = df.map(run, "x ? Math.max(x, 0) : 0");
- if(df.every(filteredRun, "<= 0")){
- return this;
- }
- slices = df.map(filteredRun, "/this", df.foldl(filteredRun, "+", 0));
- if(this.opt.labels){
- labels = arr.map(slices, function(x){
- return x > 0 ? this._getLabel(x * 100) + "%" : "";
- }, this);
- }
- }else{
- filteredRun = df.map(run, "x ? Math.max(x.y, 0) : 0");
- if(df.every(filteredRun, "<= 0")){
- return this;
- }
- slices = df.map(filteredRun, "/this", df.foldl(filteredRun, "+", 0));
- if(this.opt.labels){
- labels = arr.map(slices, function(x, i){
- if(x <= 0){ return ""; }
- var v = run[i];
- return "text" in v ? v.text : this._getLabel(x * 100) + "%";
- }, this);
- }
- }
- var themes = df.map(run, function(v, i){
- if(v === null || typeof v == "number"){
- return t.next("slice", [this.opt, this.run], true);
- }
- return t.next("slice", [this.opt, this.run, v], true);
- }, this);
- if(this.opt.labels){
- shift = df.foldl1(df.map(labels, function(label, i){
- var font = themes[i].series.font;
- return g._base._getTextBox(label, {font: font}).w;
- }, this), "Math.max(a, b)") / 2;
- if(this.opt.labelOffset < 0){
- r = Math.min(rx - 2 * shift, ry - size) + this.opt.labelOffset;
- }
- labelR = r - this.opt.labelOffset;
- }
- if("radius" in this.opt){
- r = this.opt.radius;
- labelR = r - this.opt.labelOffset;
- }
- var circle = {
- cx: offsets.l + rx,
- cy: offsets.t + ry,
- r: r
- };
- this.dyn = [];
-
- var eventSeries = new Array(slices.length);
- arr.some(slices, function(slice, i){
- if(slice < 0){
-
- return false;
- }
- if(slice == 0){
- this.dyn.push({fill: null, stroke: null});
- return false;
- }
- var v = run[i], theme = themes[i], specialFill;
- if(slice >= 1){
-
- specialFill = this._plotFill(theme.series.fill, dim, offsets);
- specialFill = this._shapeFill(specialFill,
- {
- x: circle.cx - circle.r, y: circle.cy - circle.r,
- width: 2 * circle.r, height: 2 * circle.r
- });
- specialFill = this._pseudoRadialFill(specialFill, {x: circle.cx, y: circle.cy}, circle.r);
- var shape = s.createCircle(circle).setFill(specialFill).setStroke(theme.series.stroke);
- this.dyn.push({fill: specialFill, stroke: theme.series.stroke});
- if(events){
- var o = {
- element: "slice",
- index: i,
- run: this.run,
- shape: shape,
- x: i,
- y: typeof v == "number" ? v : v.y,
- cx: circle.cx,
- cy: circle.cy,
- cr: r
- };
- this._connectEvents(o);
- eventSeries[i] = o;
- }
- return true;
- }
-
- var end = start + slice * 2 * Math.PI;
- if(i + 1 == slices.length){
- end = startAngle + 2 * Math.PI;
- }
- var step = end - start,
- x1 = circle.cx + r * Math.cos(start),
- y1 = circle.cy + r * Math.sin(start),
- x2 = circle.cx + r * Math.cos(end),
- y2 = circle.cy + r * Math.sin(end);
-
- var fanSize = m._degToRad(this.opt.fanSize);
- if(theme.series.fill && theme.series.fill.type === "radial" && this.opt.radGrad === "fan" && step > fanSize){
- var group = s.createGroup(), nfans = Math.ceil(step / fanSize), delta = step / nfans;
- specialFill = this._shapeFill(theme.series.fill,
- {x: circle.cx - circle.r, y: circle.cy - circle.r, width: 2 * circle.r, height: 2 * circle.r});
- for(var j = 0; j < nfans; ++j){
- var fansx = j == 0 ? x1 : circle.cx + r * Math.cos(start + (j - FUDGE_FACTOR) * delta),
- fansy = j == 0 ? y1 : circle.cy + r * Math.sin(start + (j - FUDGE_FACTOR) * delta),
- fanex = j == nfans - 1 ? x2 : circle.cx + r * Math.cos(start + (j + 1 + FUDGE_FACTOR) * delta),
- faney = j == nfans - 1 ? y2 : circle.cy + r * Math.sin(start + (j + 1 + FUDGE_FACTOR) * delta),
- fan = group.createPath().
- moveTo(circle.cx, circle.cy).
- lineTo(fansx, fansy).
- arcTo(r, r, 0, delta > Math.PI, true, fanex, faney).
- lineTo(circle.cx, circle.cy).
- closePath().
- setFill(this._pseudoRadialFill(specialFill, {x: circle.cx, y: circle.cy}, r, start + (j + 0.5) * delta, start + (j + 0.5) * delta));
- }
- group.createPath().
- moveTo(circle.cx, circle.cy).
- lineTo(x1, y1).
- arcTo(r, r, 0, step > Math.PI, true, x2, y2).
- lineTo(circle.cx, circle.cy).
- closePath().
- setStroke(theme.series.stroke);
- shape = group;
- }else{
- shape = s.createPath().
- moveTo(circle.cx, circle.cy).
- lineTo(x1, y1).
- arcTo(r, r, 0, step > Math.PI, true, x2, y2).
- lineTo(circle.cx, circle.cy).
- closePath().
- setStroke(theme.series.stroke);
- var specialFill = theme.series.fill;
- if(specialFill && specialFill.type === "radial"){
- specialFill = this._shapeFill(specialFill, {x: circle.cx - circle.r, y: circle.cy - circle.r, width: 2 * circle.r, height: 2 * circle.r});
- if(this.opt.radGrad === "linear"){
- specialFill = this._pseudoRadialFill(specialFill, {x: circle.cx, y: circle.cy}, r, start, end);
- }
- }else if(specialFill && specialFill.type === "linear"){
- specialFill = this._plotFill(specialFill, dim, offsets);
- specialFill = this._shapeFill(specialFill, shape.getBoundingBox());
- }
- shape.setFill(specialFill);
- }
- this.dyn.push({fill: specialFill, stroke: theme.series.stroke});
- if(events){
- var o = {
- element: "slice",
- index: i,
- run: this.run,
- shape: shape,
- x: i,
- y: typeof v == "number" ? v : v.y,
- cx: circle.cx,
- cy: circle.cy,
- cr: r
- };
- this._connectEvents(o);
- eventSeries[i] = o;
- }
- start = end;
- return false;
- }, this);
-
- if(this.opt.labels){
- if(this.opt.labelStyle == "default"){
- start = startAngle;
- arr.some(slices, function(slice, i){
- if(slice <= 0){
-
- return false;
- }
- var theme = themes[i];
- if(slice >= 1){
-
- var v = run[i], elem = da.createText[this.opt.htmlLabels && g.renderer != "vml" ? "html" : "gfx"](
- this.chart, s, circle.cx, circle.cy + size / 2, "middle", labels[i],
- theme.series.font, theme.series.fontColor);
- if(this.opt.htmlLabels){
- this.htmlElements.push(elem);
- }
- return true;
- }
-
- var end = start + slice * 2 * Math.PI, v = run[i];
- if(i + 1 == slices.length){
- end = startAngle + 2 * Math.PI;
- }
- var labelAngle = (start + end) / 2,
- x = circle.cx + labelR * Math.cos(labelAngle),
- y = circle.cy + labelR * Math.sin(labelAngle) + size / 2;
-
- var elem = da.createText[this.opt.htmlLabels && g.renderer != "vml" ? "html" : "gfx"]
- (this.chart, s, x, y, "middle", labels[i], theme.series.font, theme.series.fontColor);
- if(this.opt.htmlLabels){
- this.htmlElements.push(elem);
- }
- start = end;
- return false;
- }, this);
- }else if(this.opt.labelStyle == "columns"){
- start = startAngle;
-
- var labeledSlices = [];
- arr.forEach(slices, function(slice, i){
- var end = start + slice * 2 * Math.PI;
- if(i + 1 == slices.length){
- end = startAngle + 2 * Math.PI;
- }
- var labelAngle = (start + end) / 2;
- labeledSlices.push({
- angle: labelAngle,
- left: Math.cos(labelAngle) < 0,
- theme: themes[i],
- index: i,
- omit: end - start < 0.001
- });
- start = end;
- });
-
- var labelHeight = g._base._getTextBox("a",{font:taFont}).h;
- this._getProperLabelRadius(labeledSlices, labelHeight, circle.r * 1.1);
-
- arr.forEach(labeledSlices, function(slice, i){
- if (!slice.omit) {
- var leftColumn = circle.cx - circle.r * 2,
- rightColumn = circle.cx + circle.r * 2,
- labelWidth = g._base._getTextBox(labels[i], {font: taFont}).w,
- x = circle.cx + slice.labelR * Math.cos(slice.angle),
- y = circle.cy + slice.labelR * Math.sin(slice.angle),
- jointX = (slice.left) ? (leftColumn + labelWidth) : (rightColumn - labelWidth),
- labelX = (slice.left) ? leftColumn : jointX;
- var wiring = s.createPath().moveTo(circle.cx + circle.r * Math.cos(slice.angle), circle.cy + circle.r * Math.sin(slice.angle))
- if (Math.abs(slice.labelR * Math.cos(slice.angle)) < circle.r * 2 - labelWidth) {
- wiring.lineTo(x, y);
- }
- wiring.lineTo(jointX, y).setStroke(slice.theme.series.labelWiring);
- var elem = da.createText[this.opt.htmlLabels && g.renderer != "vml" ? "html" : "gfx"](
- this.chart, s, labelX, y, "left", labels[i], slice.theme.series.font, slice.theme.series.fontColor);
- if (this.opt.htmlLabels) {
- this.htmlElements.push(elem);
- }
- }
- },this);
- }
- }
-
- var esi = 0;
- this._eventSeries[this.run.name] = df.map(run, function(v){
- return v <= 0 ? null : eventSeries[esi++];
- });
- return this;
- },
-
- _getProperLabelRadius: function(slices, labelHeight, minRidius){
- var leftCenterSlice = {},rightCenterSlice = {},leftMinSIN = 1, rightMinSIN = 1;
- if (slices.length == 1) {
- slices[0].labelR = minRidius;
- return;
- }
- for(var i = 0;i<slices.length;i++){
- var tempSIN = Math.abs(Math.sin(slices[i].angle));
- if(slices[i].left){
- if(leftMinSIN >= tempSIN){
- leftMinSIN = tempSIN;
- leftCenterSlice = slices[i];
- }
- }else{
- if(rightMinSIN >= tempSIN){
- rightMinSIN = tempSIN;
- rightCenterSlice = slices[i];
- }
- }
- }
- leftCenterSlice.labelR = rightCenterSlice.labelR = minRidius;
- this._calculateLabelR(leftCenterSlice,slices,labelHeight);
- this._calculateLabelR(rightCenterSlice,slices,labelHeight);
- },
- _calculateLabelR: function(firstSlice,slices,labelHeight){
- var i = firstSlice.index,length = slices.length,
- currentLabelR = firstSlice.labelR;
- while(!(slices[i%length].left ^ slices[(i+1)%length].left)){
- if (!slices[(i + 1) % length].omit) {
- var nextLabelR = (Math.sin(slices[i % length].angle) * currentLabelR + ((slices[i % length].left) ? (-labelHeight) : labelHeight)) /
- Math.sin(slices[(i + 1) % length].angle);
- currentLabelR = (nextLabelR < firstSlice.labelR) ? firstSlice.labelR : nextLabelR;
- slices[(i + 1) % length].labelR = currentLabelR;
- }
- i++;
- }
- i = firstSlice.index;
- var j = (i == 0)?length-1 : i - 1;
- while(!(slices[i].left ^ slices[j].left)){
- if (!slices[j].omit) {
- var nextLabelR = (Math.sin(slices[i].angle) * currentLabelR + ((slices[i].left) ? labelHeight : (-labelHeight))) /
- Math.sin(slices[j].angle);
- currentLabelR = (nextLabelR < firstSlice.labelR) ? firstSlice.labelR : nextLabelR;
- slices[j].labelR = currentLabelR;
- }
- i--;j--;
- i = (i < 0)?i+slices.length:i;
- j = (j < 0)?j+slices.length:j;
- }
- },
-
- _getLabel: function(number){
- return dc.getLabel(number, this.opt.fixed, this.opt.precision);
- }
- });
- });
- },
- 'dijit/hccss':function(){
- define("dijit/hccss", [
- "require",
- "dojo/_base/config",
- "dojo/dom-class",
- "dojo/dom-construct",
- "dojo/dom-style",
- "dojo/ready",
- "dojo/_base/sniff",
- "dojo/_base/window"
- ], function(require, config, domClass, domConstruct, domStyle, ready, has, win){
-
-
-
-
- if(has("ie") || has("mozilla")){
-
- ready(90, function(){
-
-
-
- var div = domConstruct.create("div",{
- id: "a11yTestNode",
- style:{
- cssText:'border: 1px solid;'
- + 'border-color:red green;'
- + 'position: absolute;'
- + 'height: 5px;'
- + 'top: -999px;'
- + 'background-image: url("' + (config.blankGif || require.toUrl("dojo/resources/blank.gif")) + '");'
- }
- }, win.body());
-
- var cs = domStyle.getComputedStyle(div);
- if(cs){
- var bkImg = cs.backgroundImage;
- var needsA11y = (cs.borderTopColor == cs.borderRightColor) || (bkImg != null && (bkImg == "none" || bkImg == "url(invalid-url:)" ));
- if(needsA11y){
- domClass.add(win.body(), "dijit_a11y");
- }
- if(has("ie")){
- div.outerHTML = "";
- }else{
- win.body().removeChild(div);
- }
- }
- });
- }
- });
- },
- 'dojox/charting/action2d/Shake':function(){
- define(["dojo/_base/connect", "dojo/_base/declare", "./PlotAction",
- "dojo/fx", "dojo/fx/easing", "dojox/gfx/matrix", "dojox/gfx/fx"],
- function(hub, declare, PlotAction, df, dfe, m, gf){
-
- var DEFAULT_SHIFT = 3;
- return declare("dojox.charting.action2d.Shake", PlotAction, {
-
-
-
- defaultParams: {
- duration: 400,
- easing: dfe.backOut,
- shiftX: DEFAULT_SHIFT,
- shiftY: DEFAULT_SHIFT
- },
- optionalParams: {},
- constructor: function(chart, plot, kwArgs){
-
-
-
-
-
-
-
-
- if(!kwArgs){ kwArgs = {}; }
- this.shiftX = typeof kwArgs.shiftX == "number" ? kwArgs.shiftX : DEFAULT_SHIFT;
- this.shiftY = typeof kwArgs.shiftY == "number" ? kwArgs.shiftY : DEFAULT_SHIFT;
- this.connect();
- },
- process: function(o){
-
-
-
-
- if(!o.shape || !(o.type in this.overOutEvents)){ return; }
- var runName = o.run.name, index = o.index, vector = [], anim,
- shiftX = o.type == "onmouseover" ? this.shiftX : -this.shiftX,
- shiftY = o.type == "onmouseover" ? this.shiftY : -this.shiftY;
- if(runName in this.anim){
- anim = this.anim[runName][index];
- }else{
- this.anim[runName] = {};
- }
- if(anim){
- anim.action.stop(true);
- }else{
- this.anim[runName][index] = anim = {};
- }
- var kwArgs = {
- shape: o.shape,
- duration: this.duration,
- easing: this.easing,
- transform: [
- {name: "translate", start: [this.shiftX, this.shiftY], end: [0, 0]},
- m.identity
- ]
- };
- if(o.shape){
- vector.push(gf.animateTransform(kwArgs));
- }
- if(o.oultine){
- kwArgs.shape = o.outline;
- vector.push(gf.animateTransform(kwArgs));
- }
- if(o.shadow){
- kwArgs.shape = o.shadow;
- vector.push(gf.animateTransform(kwArgs));
- }
- if(!vector.length){
- delete this.anim[runName][index];
- return;
- }
- anim.action = df.combine(vector);
- if(o.type == "onmouseout"){
- hub.connect(anim.action, "onEnd", this, function(){
- if(this.anim[runName]){
- delete this.anim[runName][index];
- }
- });
- }
- anim.action.play();
- }
- });
- });
- },
- 'dojox/lang/functional/lambda':function(){
- define("dojox/lang/functional/lambda", ["../..", "dojo/_base/kernel", "dojo/_base/lang", "dojo/_base/array"], function(dojox, dojo, lang, arr){
- var df = lang.getObject("lang.functional", true, dojox);
- var lcache = {};
-
- var split = "ab".split(/a*/).length > 1 ? String.prototype.split :
- function(sep){
- var r = this.split.call(this, sep),
- m = sep.exec(this);
- if(m && m.index == 0){ r.unshift(""); }
- return r;
- };
-
- var lambda = function(/*String*/ s){
- var args = [], sects = split.call(s, /\s*->\s*/m);
- if(sects.length > 1){
- while(sects.length){
- s = sects.pop();
- args = sects.pop().split(/\s*,\s*|\s+/m);
- if(sects.length){ sects.push("(function(" + args + "){return (" + s + ")})"); }
- }
- }else if(s.match(/\b_\b/)){
- args = ["_"];
- }else{
- var l = s.match(/^\s*(?:[+*\/%&|\^\.=<>]|!=)/m),
- r = s.match(/[+\-*\/%&|\^\.=<>!]\s*$/m);
- if(l || r){
- if(l){
- args.push("$1");
- s = "$1" + s;
- }
- if(r){
- args.push("$2");
- s = s + "$2";
- }
- }else{
-
-
- var vars = s.
- replace(/(?:\b[A-Z]|\.[a-zA-Z_$])[a-zA-Z_$\d]*|[a-zA-Z_$][a-zA-Z_$\d]*:|this|true|false|null|undefined|typeof|instanceof|in|delete|new|void|arguments|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|isFinite|isNaN|parseFloat|parseInt|unescape|dojo|dijit|dojox|window|document|'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"/g, "").
- match(/([a-z_$][a-z_$\d]*)/gi) || [], t = {};
- arr.forEach(vars, function(v){
- if(!(v in t)){
- args.push(v);
- t[v] = 1;
- }
- });
- }
- }
- return {args: args, body: s};
- };
- var compose = function(/*Array*/ a){
- return a.length ?
- function(){
- var i = a.length - 1, x = df.lambda(a[i]).apply(this, arguments);
- for(--i; i >= 0; --i){ x = df.lambda(a[i]).call(this, x); }
- return x;
- }
- :
-
- function(x){ return x; };
- };
- lang.mixin(df, {
-
- rawLambda: function(/*String*/ s){
-
-
-
-
-
-
-
-
-
- return lambda(s);
- },
- buildLambda: function(/*String*/ s){
-
-
-
-
-
-
-
-
- s = lambda(s);
- return "function(" + s.args.join(",") + "){return (" + s.body + ");}";
- },
- lambda: function(/*Function|String|Array*/ s){
-
-
-
-
-
-
-
-
- if(typeof s == "function"){ return s; }
- if(s instanceof Array){ return compose(s); }
- if(s in lcache){ return lcache[s]; }
- s = lambda(s);
- return lcache[s] = new Function(s.args, "return (" + s.body + ");");
- },
- clearLambdaCache: function(){
-
-
- lcache = {};
- }
- });
-
- return df;
- });
- },
- 'dojox/lang/functional/reversed':function(){
- define("dojox/lang/functional/reversed", ["dojo/_base/lang", "dojo/_base/window" ,"./lambda"],
- function(lang, win, df){
- lang.mixin(df, {
-
-
- filterRev: function(/*Array|String*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
-
-
- if(typeof a == "string"){ a = a.split(""); }
- o = o || win.global; f = df.lambda(f);
- var t = [], v, i = a.length - 1;
- for(; i >= 0; --i){
- v = a[i];
- if(f.call(o, v, i, a)){ t.push(v); }
- }
- return t;
- },
- forEachRev: function(/*Array|String*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
-
- if(typeof a == "string"){ a = a.split(""); }
- o = o || win.global; f = df.lambda(f);
- for(var i = a.length - 1; i >= 0; f.call(o, a[i], i, a), --i);
- },
- mapRev: function(/*Array|String*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
-
-
- if(typeof a == "string"){ a = a.split(""); }
- o = o || win.global; f = df.lambda(f);
- var n = a.length, t = new Array(n), i = n - 1, j = 0;
- for(; i >= 0; t[j++] = f.call(o, a[i], i, a), --i);
- return t;
- },
- everyRev: function(/*Array|String*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
-
-
- if(typeof a == "string"){ a = a.split(""); }
- o = o || win.global; f = df.lambda(f);
- for(var i = a.length - 1; i >= 0; --i){
- if(!f.call(o, a[i], i, a)){
- return false;
- }
- }
- return true;
- },
- someRev: function(/*Array|String*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
-
-
- if(typeof a == "string"){ a = a.split(""); }
- o = o || win.global; f = df.lambda(f);
- for(var i = a.length - 1; i >= 0; --i){
- if(f.call(o, a[i], i, a)){
- return true;
- }
- }
- return false;
- }
- });
-
- return df;
- });
- },
- 'dojox/charting/scaler/primitive':function(){
- define("dojox/charting/scaler/primitive", ["dojo/_base/lang"],
- function(lang){
- var primitive = lang.getObject("dojox.charting.scaler.primitive", true);
- return lang.mixin(primitive, {
- buildScaler: function(/*Number*/ min, /*Number*/ max, /*Number*/ span, /*Object*/ kwArgs){
- if(min == max){
-
- min -= 0.5;
- max += 0.5;
-
- }
- return {
- bounds: {
- lower: min,
- upper: max,
- from: min,
- to: max,
- scale: span / (max - min),
- span: span
- },
- scaler: primitive
- };
- },
- buildTicks: function(/*Object*/ scaler, /*Object*/ kwArgs){
- return {major: [], minor: [], micro: []};
- },
- getTransformerFromModel: function(/*Object*/ scaler){
- var offset = scaler.bounds.from, scale = scaler.bounds.scale;
- return function(x){ return (x - offset) * scale; };
- },
- getTransformerFromPlot: function(/*Object*/ scaler){
- var offset = scaler.bounds.from, scale = scaler.bounds.scale;
- return function(x){ return x / scale + offset; };
- }
- });
- });
- },
- 'dojox/charting/plot2d/Candlesticks':function(){
- define("dojox/charting/plot2d/Candlesticks", ["dojo/_base/lang", "dojo/_base/declare", "dojo/_base/array", "./Base", "./common",
- "dojox/lang/functional", "dojox/lang/functional/reversed", "dojox/lang/utils", "dojox/gfx/fx"],
- function(lang, declare, arr, Base, dc, df, dfr, du, fx){
- var purgeGroup = dfr.lambda("item.purgeGroup()");
-
-
-
-
-
- return declare("dojox.charting.plot2d.Candlesticks", Base, {
-
-
-
-
-
-
- defaultParams: {
- hAxis: "x",
- vAxis: "y",
- gap: 2,
- animate: null
- },
- optionalParams: {
- minBarSize: 1,
- maxBarSize: 1,
-
- stroke: {},
- outline: {},
- shadow: {},
- fill: {},
- font: "",
- fontColor: ""
- },
- constructor: function(chart, kwArgs){
-
-
-
-
-
-
- this.opt = lang.clone(this.defaultParams);
- du.updateWithObject(this.opt, kwArgs);
- du.updateWithPattern(this.opt, kwArgs, this.optionalParams);
- this.series = [];
- this.hAxis = this.opt.hAxis;
- this.vAxis = this.opt.vAxis;
- this.animate = this.opt.animate;
- },
- collectStats: function(series){
-
-
-
-
-
-
-
-
-
-
- var stats = lang.delegate(dc.defaultStats);
- for(var i=0; i<series.length; i++){
- var run = series[i];
- if(!run.data.length){ continue; }
- var old_vmin = stats.vmin, old_vmax = stats.vmax;
- if(!("ymin" in run) || !("ymax" in run)){
- arr.forEach(run.data, function(val, idx){
- if(val !== null){
- var x = val.x || idx + 1;
- stats.hmin = Math.min(stats.hmin, x);
- stats.hmax = Math.max(stats.hmax, x);
- stats.vmin = Math.min(stats.vmin, val.open, val.close, val.high, val.low);
- stats.vmax = Math.max(stats.vmax, val.open, val.close, val.high, val.low);
- }
- });
- }
- if("ymin" in run){ stats.vmin = Math.min(old_vmin, run.ymin); }
- if("ymax" in run){ stats.vmax = Math.max(old_vmax, run.ymax); }
- }
- return stats;
- },
- getSeriesStats: function(){
-
-
-
-
- var stats = this.collectStats(this.series);
- stats.hmin -= 0.5;
- stats.hmax += 0.5;
- return stats;
- },
- render: function(dim, offsets){
-
-
-
-
-
-
-
-
- if(this.zoom && !this.isDataDirty()){
- return this.performZoom(dim, offsets);
- }
- this.resetEvents();
- this.dirty = this.isDirty();
- if(this.dirty){
- arr.forEach(this.series, purgeGroup);
- this._eventSeries = {};
- this.cleanGroup();
- var s = this.group;
- df.forEachRev(this.series, function(item){ item.cleanGroup(s); });
- }
- var t = this.chart.theme, f, gap, width,
- ht = this._hScaler.scaler.getTransformerFromModel(this._hScaler),
- vt = this._vScaler.scaler.getTransformerFromModel(this._vScaler),
- baseline = Math.max(0, this._vScaler.bounds.lower),
- baselineHeight = vt(baseline),
- events = this.events();
- f = dc.calculateBarSize(this._hScaler.bounds.scale, this.opt);
- gap = f.gap;
- width = f.size;
- for(var i = this.series.length - 1; i >= 0; --i){
- var run = this.series[i];
- if(!this.dirty && !run.dirty){
- t.skip();
- this._reconnectEvents(run.name);
- continue;
- }
- run.cleanGroup();
- var theme = t.next("candlestick", [this.opt, run]), s = run.group,
- eventSeries = new Array(run.data.length);
- for(var j = 0; j < run.data.length; ++j){
- var v = run.data[j];
- if(v !== null){
- var finalTheme = t.addMixin(theme, "candlestick", v, true);
-
- var x = ht(v.x || (j+0.5)) + offsets.l + gap,
- y = dim.height - offsets.b,
- open = vt(v.open),
- close = vt(v.close),
- high = vt(v.high),
- low = vt(v.low);
- if("mid" in v){
- var mid = vt(v.mid);
- }
- if(low > high){
- var tmp = high;
- high = low;
- low = tmp;
- }
- if(width >= 1){
-
- var doFill = open > close;
- var line = { x1: width/2, x2: width/2, y1: y - high, y2: y - low },
- rect = {
- x: 0, y: y-Math.max(open, close),
- width: width, height: Math.max(doFill ? open-close : close-open, 1)
- };
- var shape = s.createGroup();
- shape.setTransform({dx: x, dy: 0 });
- var inner = shape.createGroup();
- inner.createLine(line).setStroke(finalTheme.series.stroke);
- inner.createRect(rect).setStroke(finalTheme.series.stroke).
- setFill(doFill ? finalTheme.series.fill : "white");
- if("mid" in v){
-
- inner.createLine({
- x1: (finalTheme.series.stroke.width||1), x2: width - (finalTheme.series.stroke.width || 1),
- y1: y - mid, y2: y - mid
- }).setStroke(doFill ? "white" : finalTheme.series.stroke);
- }
-
- run.dyn.fill = finalTheme.series.fill;
- run.dyn.stroke = finalTheme.series.stroke;
- if(events){
- var o = {
- element: "candlestick",
- index: j,
- run: run,
- shape: inner,
- x: x,
- y: y-Math.max(open, close),
- cx: width/2,
- cy: (y-Math.max(open, close)) + (Math.max(doFill ? open-close : close-open, 1)/2),
- width: width,
- height: Math.max(doFill ? open-close : close-open, 1),
- data: v
- };
- this._connectEvents(o);
- eventSeries[j] = o;
- }
- }
- if(this.animate){
- this._animateCandlesticks(shape, y - low, high - low);
- }
- }
- }
- this._eventSeries[run.name] = eventSeries;
- run.dirty = false;
- }
- this.dirty = false;
- return this;
- },
- _animateCandlesticks: function(shape, voffset, vsize){
- fx.animateTransform(lang.delegate({
- shape: shape,
- duration: 1200,
- transform: [
- {name: "translate", start: [0, voffset - (voffset/vsize)], end: [0, 0]},
- {name: "scale", start: [1, 1/vsize], end: [1, 1]},
- {name: "original"}
- ]
- }, this.animate)).play();
- }
- });
- });
- },
- 'dojox/charting/widget/Sparkline':function(){
- define("dojox/charting/widget/Sparkline", ["dojo/_base/lang", "dojo/_base/array", "dojo/_base/declare", "dojo/_base/html", "dojo/query",
- "./Chart", "../themes/GreySkies", "../plot2d/Lines", "dojo/dom-prop"],
- function(lang, arrayUtil, declare, html, query, Chart, GreySkies, Lines, domProp){
- declare("dojox.charting.widget.Sparkline", Chart, {
- theme: GreySkies,
- margins: { l: 0, r: 0, t: 0, b: 0 },
- type: "Lines",
- valueFn: "Number(x)",
- store: "",
- field: "",
- query: "",
- queryOptions: "",
- start: "0",
- count: "Infinity",
- sort: "",
- data: "",
- name: "default",
- buildRendering: function(){
- var n = this.srcNodeRef;
- if( !n.childNodes.length ||
- !query("> .axis, > .plot, > .action, > .series", n).length){
- var plot = document.createElement("div");
- domProp.set(plot, {
- "class": "plot",
- "name": "default",
- "type": this.type
- });
- n.appendChild(plot);
- var series = document.createElement("div");
- domProp.set(series, {
- "class": "series",
- plot: "default",
- name: this.name,
- start: this.start,
- count: this.count,
- valueFn: this.valueFn
- });
- arrayUtil.forEach(
- ["store", "field", "query", "queryOptions", "sort", "data"],
- function(i){
- if(this[i].length){
- domProp.set(series, i, this[i]);
- }
- },
- this
- );
- n.appendChild(series);
- }
- this.inherited(arguments);
- }
- }
- );
- });
- },
- 'dojox/gfx/matrix':function(){
- define("dojox/gfx/matrix", ["./_base","dojo/_base/lang"],
- function(g, lang){
- var m = g.matrix = {};
-
-
- var _degToRadCache = {};
- m._degToRad = function(degree){
- return _degToRadCache[degree] || (_degToRadCache[degree] = (Math.PI * degree / 180));
- };
- m._radToDeg = function(radian){ return radian / Math.PI * 180; };
- m.Matrix2D = function(arg){
-
-
-
-
-
-
- if(arg){
- if(typeof arg == "number"){
- this.xx = this.yy = arg;
- }else if(arg instanceof Array){
- if(arg.length > 0){
- var matrix = m.normalize(arg[0]);
-
- for(var i = 1; i < arg.length; ++i){
- var l = matrix, r = m.normalize(arg[i]);
- matrix = new m.Matrix2D();
- matrix.xx = l.xx * r.xx + l.xy * r.yx;
- matrix.xy = l.xx * r.xy + l.xy * r.yy;
- matrix.yx = l.yx * r.xx + l.yy * r.yx;
- matrix.yy = l.yx * r.xy + l.yy * r.yy;
- matrix.dx = l.xx * r.dx + l.xy * r.dy + l.dx;
- matrix.dy = l.yx * r.dx + l.yy * r.dy + l.dy;
- }
- lang.mixin(this, matrix);
- }
- }else{
- lang.mixin(this, arg);
- }
- }
- };
-
- lang.extend(m.Matrix2D, {xx: 1, xy: 0, yx: 0, yy: 1, dx: 0, dy: 0});
- lang.mixin(m, {
-
-
-
-
- identity: new m.Matrix2D(),
-
-
- flipX: new m.Matrix2D({xx: -1}),
-
-
- flipY: new m.Matrix2D({yy: -1}),
-
-
- flipXY: new m.Matrix2D({xx: -1, yy: -1}),
-
- translate: function(a, b){
-
-
-
-
- if(arguments.length > 1){
- return new m.Matrix2D({dx: a, dy: b});
- }
-
-
-
- return new m.Matrix2D({dx: a.x, dy: a.y});
- },
- scale: function(a, b){
-
-
-
-
- if(arguments.length > 1){
- return new m.Matrix2D({xx: a, yy: b});
- }
- if(typeof a == "number"){
-
-
-
- return new m.Matrix2D({xx: a, yy: a});
- }
-
-
-
- return new m.Matrix2D({xx: a.x, yy: a.y});
- },
- rotate: function(angle){
-
-
-
-
- var c = Math.cos(angle);
- var s = Math.sin(angle);
- return new m.Matrix2D({xx: c, xy: -s, yx: s, yy: c});
- },
- rotateg: function(degree){
-
-
-
-
-
- return m.rotate(m._degToRad(degree));
- },
- skewX: function(angle) {
-
-
-
-
- return new m.Matrix2D({xy: Math.tan(angle)});
- },
- skewXg: function(degree){
-
-
-
-
-
- return m.skewX(m._degToRad(degree));
- },
- skewY: function(angle){
-
-
-
-
- return new m.Matrix2D({yx: Math.tan(angle)});
- },
- skewYg: function(degree){
-
-
-
-
-
- return m.skewY(m._degToRad(degree));
- },
- reflect: function(a, b){
-
-
-
-
-
- if(arguments.length == 1){
- b = a.y;
- a = a.x;
- }
-
-
-
-
- var a2 = a * a, b2 = b * b, n2 = a2 + b2, xy = 2 * a * b / n2;
- return new m.Matrix2D({xx: 2 * a2 / n2 - 1, xy: xy, yx: xy, yy: 2 * b2 / n2 - 1});
- },
- project: function(a, b){
-
-
-
-
-
- if(arguments.length == 1){
- b = a.y;
- a = a.x;
- }
-
-
-
-
- var a2 = a * a, b2 = b * b, n2 = a2 + b2, xy = a * b / n2;
- return new m.Matrix2D({xx: a2 / n2, xy: xy, yx: xy, yy: b2 / n2});
- },
-
- normalize: function(matrix){
-
-
-
-
- return (matrix instanceof m.Matrix2D) ? matrix : new m.Matrix2D(matrix);
- },
-
- clone: function(matrix){
-
-
- var obj = new m.Matrix2D();
- for(var i in matrix){
- if(typeof(matrix[i]) == "number" && typeof(obj[i]) == "number" && obj[i] != matrix[i]) obj[i] = matrix[i];
- }
- return obj;
- },
- invert: function(matrix){
-
-
- var M = m.normalize(matrix),
- D = M.xx * M.yy - M.xy * M.yx;
- M = new m.Matrix2D({
- xx: M.yy/D, xy: -M.xy/D,
- yx: -M.yx/D, yy: M.xx/D,
- dx: (M.xy * M.dy - M.yy * M.dx) / D,
- dy: (M.yx * M.dx - M.xx * M.dy) / D
- });
- return M;
- },
- _multiplyPoint: function(matrix, x, y){
-
-
-
-
- return {x: matrix.xx * x + matrix.xy * y + matrix.dx, y: matrix.yx * x + matrix.yy * y + matrix.dy};
- },
- multiplyPoint: function(matrix, /* Number||Point */ a, /* Number? */ b){
-
-
-
-
- var M = m.normalize(matrix);
- if(typeof a == "number" && typeof b == "number"){
- return m._multiplyPoint(M, a, b);
- }
-
-
-
-
- return m._multiplyPoint(M, a.x, a.y);
- },
- multiply: function(matrix){
-
-
-
- var M = m.normalize(matrix);
-
- for(var i = 1; i < arguments.length; ++i){
- var l = M, r = m.normalize(arguments[i]);
- M = new m.Matrix2D();
- M.xx = l.xx * r.xx + l.xy * r.yx;
- M.xy = l.xx * r.xy + l.xy * r.yy;
- M.yx = l.yx * r.xx + l.yy * r.yx;
- M.yy = l.yx * r.xy + l.yy * r.yy;
- M.dx = l.xx * r.dx + l.xy * r.dy + l.dx;
- M.dy = l.yx * r.dx + l.yy * r.dy + l.dy;
- }
- return M;
- },
-
- _sandwich: function(matrix, x, y){
-
-
-
-
- return m.multiply(m.translate(x, y), matrix, m.translate(-x, -y));
- },
- scaleAt: function(a, b, c, d){
-
-
-
-
-
-
-
-
-
-
-
- switch(arguments.length){
- case 4:
-
- return m._sandwich(m.scale(a, b), c, d);
- case 3:
- if(typeof c == "number"){
-
-
-
-
-
- return m._sandwich(m.scale(a), b, c);
- }
-
-
-
-
-
- return m._sandwich(m.scale(a, b), c.x, c.y);
- }
-
-
-
-
-
- return m._sandwich(m.scale(a), b.x, b.y);
- },
- rotateAt: function(angle, a, b){
-
-
-
-
-
-
-
-
- if(arguments.length > 2){
- return m._sandwich(m.rotate(angle), a, b);
- }
-
-
-
-
- return m._sandwich(m.rotate(angle), a.x, a.y);
- },
- rotategAt: function(degree, a, b){
-
-
-
-
-
-
-
-
- if(arguments.length > 2){
- return m._sandwich(m.rotateg(degree), a, b);
- }
-
-
-
-
- return m._sandwich(m.rotateg(degree), a.x, a.y);
- },
- skewXAt: function(angle, a, b){
-
-
-
-
-
-
-
-
- if(arguments.length > 2){
- return m._sandwich(m.skewX(angle), a, b);
- }
-
-
-
-
- return m._sandwich(m.skewX(angle), a.x, a.y);
- },
- skewXgAt: function(degree, a, b){
-
-
-
-
-
-
-
-
- if(arguments.length > 2){
- return m._sandwich(m.skewXg(degree), a, b);
- }
-
-
-
-
- return m._sandwich(m.skewXg(degree), a.x, a.y);
- },
- skewYAt: function(angle, a, b){
-
-
-
-
-
-
-
-
- if(arguments.length > 2){
- return m._sandwich(m.skewY(angle), a, b);
- }
-
-
-
-
- return m._sandwich(m.skewY(angle), a.x, a.y);
- },
- skewYgAt: function(/* Number */ degree, /* Number||Point */ a, /* Number? */ b){
-
-
-
-
-
-
-
-
- if(arguments.length > 2){
- return m._sandwich(m.skewYg(degree), a, b);
- }
-
-
-
-
- return m._sandwich(m.skewYg(degree), a.x, a.y);
- }
-
- });
-
- g.Matrix2D = m.Matrix2D;
- return m;
- });
- },
- 'dojox/charting/plot2d/Scatter':function(){
- define("dojox/charting/plot2d/Scatter", ["dojo/_base/lang", "dojo/_base/array", "dojo/_base/declare", "./Base", "./common",
- "dojox/lang/functional", "dojox/lang/functional/reversed", "dojox/lang/utils", "dojox/gfx/fx", "dojox/gfx/gradutils"],
- function(lang, arr, declare, Base, dc, df, dfr, du, fx, gradutils){
- var purgeGroup = dfr.lambda("item.purgeGroup()");
- return declare("dojox.charting.plot2d.Scatter", Base, {
-
-
- defaultParams: {
- hAxis: "x",
- vAxis: "y",
- shadows: null,
- animate: null
- },
- optionalParams: {
-
- markerStroke: {},
- markerOutline: {},
- markerShadow: {},
- markerFill: {},
- markerFont: "",
- markerFontColor: ""
- },
- constructor: function(chart, kwArgs){
-
-
-
-
-
-
- this.opt = lang.clone(this.defaultParams);
- du.updateWithObject(this.opt, kwArgs);
- du.updateWithPattern(this.opt, kwArgs, this.optionalParams);
- this.series = [];
- this.hAxis = this.opt.hAxis;
- this.vAxis = this.opt.vAxis;
- this.animate = this.opt.animate;
- },
- render: function(dim, offsets){
-
-
-
-
-
-
-
-
- if(this.zoom && !this.isDataDirty()){
- return this.performZoom(dim, offsets);
- }
- this.resetEvents();
- this.dirty = this.isDirty();
- if(this.dirty){
- arr.forEach(this.series, purgeGroup);
- this._eventSeries = {};
- this.cleanGroup();
- var s = this.group;
- df.forEachRev(this.series, function(item){ item.cleanGroup(s); });
- }
- var t = this.chart.theme, events = this.events();
- for(var i = this.series.length - 1; i >= 0; --i){
- var run = this.series[i];
- if(!this.dirty && !run.dirty){
- t.skip();
- this._reconnectEvents(run.name);
- continue;
- }
- run.cleanGroup();
- if(!run.data.length){
- run.dirty = false;
- t.skip();
- continue;
- }
- var theme = t.next("marker", [this.opt, run]), s = run.group, lpoly,
- ht = this._hScaler.scaler.getTransformerFromModel(this._hScaler),
- vt = this._vScaler.scaler.getTransformerFromModel(this._vScaler);
- if(typeof run.data[0] == "number"){
- lpoly = arr.map(run.data, function(v, i){
- return {
- x: ht(i + 1) + offsets.l,
- y: dim.height - offsets.b - vt(v)
- };
- }, this);
- }else{
- lpoly = arr.map(run.data, function(v, i){
- return {
- x: ht(v.x) + offsets.l,
- y: dim.height - offsets.b - vt(v.y)
- };
- }, this);
- }
- var shadowMarkers = new Array(lpoly.length),
- frontMarkers = new Array(lpoly.length),
- outlineMarkers = new Array(lpoly.length);
- arr.forEach(lpoly, function(c, i){
- var finalTheme = typeof run.data[i] == "number" ?
- t.post(theme, "marker") :
- t.addMixin(theme, "marker", run.data[i], true),
- path = "M" + c.x + " " + c.y + " " + finalTheme.symbol;
- if(finalTheme.marker.shadow){
- shadowMarkers[i] = s.createPath("M" + (c.x + finalTheme.marker.shadow.dx) + " " +
- (c.y + finalTheme.marker.shadow.dy) + " " + finalTheme.symbol).
- setStroke(finalTheme.marker.shadow).setFill(finalTheme.marker.shadow.color);
- if(this.animate){
- this._animateScatter(shadowMarkers[i], dim.height - offsets.b);
- }
- }
- if(finalTheme.marker.outline){
- var outline = dc.makeStroke(finalTheme.marker.outline);
- outline.width = 2 * outline.width + finalTheme.marker.stroke.width;
- outlineMarkers[i] = s.createPath(path).setStroke(outline);
- if(this.animate){
- this._animateScatter(outlineMarkers[i], dim.height - offsets.b);
- }
- }
- var stroke = dc.makeStroke(finalTheme.marker.stroke),
- fill = this._plotFill(finalTheme.marker.fill, dim, offsets);
- if(fill && (fill.type === "linear" || fill.type == "radial")){
- var color = gradutils.getColor(fill, {x: c.x, y: c.y});
- if(stroke){
- stroke.color = color;
- }
- frontMarkers[i] = s.createPath(path).setStroke(stroke).setFill(color);
- }else{
- frontMarkers[i] = s.createPath(path).setStroke(stroke).setFill(fill);
- }
- if(this.animate){
- this._animateScatter(frontMarkers[i], dim.height - offsets.b);
- }
- }, this);
- if(frontMarkers.length){
- run.dyn.stroke = frontMarkers[frontMarkers.length - 1].getStroke();
- run.dyn.fill = frontMarkers[frontMarkers.length - 1].getFill();
- }
- if(events){
- var eventSeries = new Array(frontMarkers.length);
- arr.forEach(frontMarkers, function(s, i){
- var o = {
- element: "marker",
- index: i,
- run: run,
- shape: s,
- outline: outlineMarkers && outlineMarkers[i] || null,
- shadow: shadowMarkers && shadowMarkers[i] || null,
- cx: lpoly[i].x,
- cy: lpoly[i].y
- };
- if(typeof run.data[0] == "number"){
- o.x = i + 1;
- o.y = run.data[i];
- }else{
- o.x = run.data[i].x;
- o.y = run.data[i].y;
- }
- this._connectEvents(o);
- eventSeries[i] = o;
- }, this);
- this._eventSeries[run.name] = eventSeries;
- }else{
- delete this._eventSeries[run.name];
- }
- run.dirty = false;
- }
- this.dirty = false;
- return this;
- },
- _animateScatter: function(shape, offset){
- fx.animateTransform(lang.delegate({
- shape: shape,
- duration: 1200,
- transform: [
- {name: "translate", start: [0, offset], end: [0, 0]},
- {name: "scale", start: [0, 0], end: [1, 1]},
- {name: "original"}
- ]
- }, this.animate)).play();
- }
- });
- });
- },
- 'dojox/lang/functional/scan':function(){
- define("dojox/lang/functional/scan", ["dojo/_base/kernel", "dojo/_base/lang", "./lambda"], function(d, darray, df){
- var empty = {};
- d.mixin(df, {
-
- scanl: function(/*Array|String|Object*/ a, /*Function|String|Array*/ f, /*Object*/ z, /*Object?*/ o){
-
-
-
- if(typeof a == "string"){ a = a.split(""); }
- o = o || d.global; f = df.lambda(f);
- var t, n, i;
- if(d.isArray(a)){
-
- t = new Array((n = a.length) + 1);
- t[0] = z;
- for(i = 0; i < n; z = f.call(o, z, a[i], i, a), t[++i] = z);
- }else if(typeof a.hasNext == "function" && typeof a.next == "function"){
-
- t = [z];
- for(i = 0; a.hasNext(); t.push(z = f.call(o, z, a.next(), i++, a)));
- }else{
-
- t = [z];
- for(i in a){
- if(!(i in empty)){
- t.push(z = f.call(o, z, a[i], i, a));
- }
- }
- }
- return t;
- },
- scanl1: function(/*Array|String|Object*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
-
-
-
- if(typeof a == "string"){ a = a.split(""); }
- o = o || d.global; f = df.lambda(f);
- var t, n, z, first = true;
- if(d.isArray(a)){
-
- t = new Array(n = a.length);
- t[0] = z = a[0];
- for(var i = 1; i < n; t[i] = z = f.call(o, z, a[i], i, a), ++i);
- }else if(typeof a.hasNext == "function" && typeof a.next == "function"){
-
- if(a.hasNext()){
- t = [z = a.next()];
- for(i = 1; a.hasNext(); t.push(z = f.call(o, z, a.next(), i++, a)));
- }
- }else{
-
- for(i in a){
- if(!(i in empty)){
- if(first){
- t = [z = a[i]];
- first = false;
- }else{
- t.push(z = f.call(o, z, a[i], i, a));
- }
- }
- }
- }
- return t;
- },
- scanr: function(/*Array|String*/ a, /*Function|String|Array*/ f, /*Object*/ z, /*Object?*/ o){
-
-
-
- if(typeof a == "string"){ a = a.split(""); }
- o = o || d.global; f = df.lambda(f);
- var n = a.length, t = new Array(n + 1), i = n;
- t[n] = z;
- for(; i > 0; --i, z = f.call(o, z, a[i], i, a), t[i] = z);
- return t;
- },
- scanr1: function(/*Array|String*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
-
-
-
- if(typeof a == "string"){ a = a.split(""); }
- o = o || d.global; f = df.lambda(f);
- var n = a.length, t = new Array(n), z = a[n - 1], i = n - 1;
- t[i] = z;
- for(; i > 0; --i, z = f.call(o, z, a[i], i, a), t[i] = z);
- return t;
- }
- });
- });
- },
- 'dijit/Viewport':function(){
- define("dijit/Viewport", [
- "dojo/Evented",
- "dojo/on",
- "dojo/ready",
- "dojo/_base/sniff",
- "dojo/_base/window",
- "dojo/window"
- ], function(Evented, on, ready, has, win, winUtils){
-
-
-
- var Viewport = new Evented();
- var focusedNode;
- ready(200, function(){
- var oldBox = winUtils.getBox();
- Viewport._rlh = on(win.global, "resize", function(){
- var newBox = winUtils.getBox();
- if(oldBox.h == newBox.h && oldBox.w == newBox.w){ return; }
- oldBox = newBox;
- Viewport.emit("resize");
- });
-
- if(has("ie") == 8){
- var deviceXDPI = screen.deviceXDPI;
- setInterval(function(){
- if(screen.deviceXDPI != deviceXDPI){
- deviceXDPI = screen.deviceXDPI;
- Viewport.emit("resize");
- }
- }, 500);
- }
-
- if(has("ios")){
- on(document, "focusin", function(evt){
- focusedNode = evt.target;
- });
- on(document, "focusout", function(evt){
- focusedNode = null;
- });
- }
- });
- Viewport.getEffectiveBox = function(/*Document*/ doc){
-
-
-
- var box = winUtils.getBox(doc);
-
- var tag = focusedNode && focusedNode.tagName && focusedNode.tagName.toLowerCase();
- if(has("ios") && focusedNode && !focusedNode.readOnly && (tag == "textarea" || (tag == "input" &&
- /^(color|email|number|password|search|tel|text|url)$/.test(focusedNode.type)))){
-
-
- box.h *= (orientation == 0 || orientation == 180 ? 0.66 : 0.40);
-
-
-
- var rect = focusedNode.getBoundingClientRect();
- box.h = Math.max(box.h, rect.top + rect.height);
- }
- return box;
- };
- return Viewport;
- });
- },
- 'dojox/color/_base':function(){
- define("dojox/color/_base", ["dojo/_base/kernel", "../main", "dojo/_base/lang", "dojo/_base/Color", "dojo/colors"],
- function(dojo, dojox, lang, Color, colors){
- var cx = lang.getObject("dojox.color", true);
-
- cx.Color=Color;
- cx.blend=Color.blendColors;
- cx.fromRgb=Color.fromRgb;
- cx.fromHex=Color.fromHex;
- cx.fromArray=Color.fromArray;
- cx.fromString=Color.fromString;
- cx.greyscale=colors.makeGrey;
- lang.mixin(cx,{
- fromCmy: function(/* Object|Array|int */cyan, /*int*/magenta, /*int*/yellow){
-
-
-
-
- if(lang.isArray(cyan)){
- magenta=cyan[1], yellow=cyan[2], cyan=cyan[0];
- } else if(lang.isObject(cyan)){
- magenta=cyan.m, yellow=cyan.y, cyan=cyan.c;
- }
- cyan/=100, magenta/=100, yellow/=100;
-
- var r=1-cyan, g=1-magenta, b=1-yellow;
- return new Color({ r:Math.round(r*255), g:Math.round(g*255), b:Math.round(b*255) });
- },
-
- fromCmyk: function(/* Object|Array|int */cyan, /*int*/magenta, /*int*/yellow, /*int*/black){
-
-
-
-
- if(lang.isArray(cyan)){
- magenta=cyan[1], yellow=cyan[2], black=cyan[3], cyan=cyan[0];
- } else if(lang.isObject(cyan)){
- magenta=cyan.m, yellow=cyan.y, black=cyan.b, cyan=cyan.c;
- }
- cyan/=100, magenta/=100, yellow/=100, black/=100;
- var r,g,b;
- r = 1-Math.min(1, cyan*(1-black)+black);
- g = 1-Math.min(1, magenta*(1-black)+black);
- b = 1-Math.min(1, yellow*(1-black)+black);
- return new Color({ r:Math.round(r*255), g:Math.round(g*255), b:Math.round(b*255) });
- },
-
- fromHsl: function(/* Object|Array|int */hue, /* int */saturation, /* int */luminosity){
-
-
-
-
- if(lang.isArray(hue)){
- saturation=hue[1], luminosity=hue[2], hue=hue[0];
- } else if(lang.isObject(hue)){
- saturation=hue.s, luminosity=hue.l, hue=hue.h;
- }
- saturation/=100;
- luminosity/=100;
-
- while(hue<0){ hue+=360; }
- while(hue>=360){ hue-=360; }
-
- var r, g, b;
- if(hue<120){
- r=(120-hue)/60, g=hue/60, b=0;
- } else if (hue<240){
- r=0, g=(240-hue)/60, b=(hue-120)/60;
- } else {
- r=(hue-240)/60, g=0, b=(360-hue)/60;
- }
-
- r=2*saturation*Math.min(r, 1)+(1-saturation);
- g=2*saturation*Math.min(g, 1)+(1-saturation);
- b=2*saturation*Math.min(b, 1)+(1-saturation);
- if(luminosity<0.5){
- r*=luminosity, g*=luminosity, b*=luminosity;
- }else{
- r=(1-luminosity)*r+2*luminosity-1;
- g=(1-luminosity)*g+2*luminosity-1;
- b=(1-luminosity)*b+2*luminosity-1;
- }
- return new Color({ r:Math.round(r*255), g:Math.round(g*255), b:Math.round(b*255) });
- }
- });
-
- cx.fromHsv = function(/* Object|Array|int */hue, /* int */saturation, /* int */value){
-
-
-
- if(lang.isArray(hue)){
- saturation=hue[1], value=hue[2], hue=hue[0];
- } else if (lang.isObject(hue)){
- saturation=hue.s, value=hue.v, hue=hue.h;
- }
-
- if(hue==360){ hue=0; }
- saturation/=100;
- value/=100;
-
- var r, g, b;
- if(saturation==0){
- r=value, b=value, g=value;
- }else{
- var hTemp=hue/60, i=Math.floor(hTemp), f=hTemp-i;
- var p=value*(1-saturation);
- var q=value*(1-(saturation*f));
- var t=value*(1-(saturation*(1-f)));
- switch(i){
- case 0:{ r=value, g=t, b=p; break; }
- case 1:{ r=q, g=value, b=p; break; }
- case 2:{ r=p, g=value, b=t; break; }
- case 3:{ r=p, g=q, b=value; break; }
- case 4:{ r=t, g=p, b=value; break; }
- case 5:{ r=value, g=p, b=q; break; }
- }
- }
- return new Color({ r:Math.round(r*255), g:Math.round(g*255), b:Math.round(b*255) });
- };
- lang.extend(Color,{
- toCmy: function(){
-
-
- var cyan=1-(this.r/255), magenta=1-(this.g/255), yellow=1-(this.b/255);
- return { c:Math.round(cyan*100), m:Math.round(magenta*100), y:Math.round(yellow*100) };
- },
-
- toCmyk: function(){
-
-
- var cyan, magenta, yellow, black;
- var r=this.r/255, g=this.g/255, b=this.b/255;
- black = Math.min(1-r, 1-g, 1-b);
- cyan = (1-r-black)/(1-black);
- magenta = (1-g-black)/(1-black);
- yellow = (1-b-black)/(1-black);
- return { c:Math.round(cyan*100), m:Math.round(magenta*100), y:Math.round(yellow*100), b:Math.round(black*100) };
- },
-
- toHsl: function(){
-
-
- var r=this.r/255, g=this.g/255, b=this.b/255;
- var min = Math.min(r, b, g), max = Math.max(r, g, b);
- var delta = max-min;
- var h=0, s=0, l=(min+max)/2;
- if(l>0 && l<1){
- s = delta/((l<0.5)?(2*l):(2-2*l));
- }
- if(delta>0){
- if(max==r && max!=g){
- h+=(g-b)/delta;
- }
- if(max==g && max!=b){
- h+=(2+(b-r)/delta);
- }
- if(max==b && max!=r){
- h+=(4+(r-g)/delta);
- }
- h*=60;
- }
- return { h:h, s:Math.round(s*100), l:Math.round(l*100) };
- },
-
- toHsv: function(){
-
-
- var r=this.r/255, g=this.g/255, b=this.b/255;
- var min = Math.min(r, b, g), max = Math.max(r, g, b);
- var delta = max-min;
- var h = null, s = (max==0)?0:(delta/max);
- if(s==0){
- h = 0;
- }else{
- if(r==max){
- h = 60*(g-b)/delta;
- }else if(g==max){
- h = 120 + 60*(b-r)/delta;
- }else{
- h = 240 + 60*(r-g)/delta;
- }
-
- if(h<0){ h+=360; }
- }
- return { h:h, s:Math.round(s*100), v:Math.round(max*100) };
- }
- });
- return cx;
- });
- },
- 'dojox/charting/plot2d/OHLC':function(){
- define("dojox/charting/plot2d/OHLC", ["dojo/_base/lang", "dojo/_base/array", "dojo/_base/declare", "./Base", "./common",
- "dojox/lang/functional", "dojox/lang/functional/reversed", "dojox/lang/utils", "dojox/gfx/fx"],
- function(lang, arr, declare, Base, dc, df, dfr, du, fx){
- var purgeGroup = dfr.lambda("item.purgeGroup()");
-
-
-
-
-
- return declare("dojox.charting.plot2d.OHLC", Base, {
-
-
-
-
-
-
- defaultParams: {
- hAxis: "x",
- vAxis: "y",
- gap: 2,
- animate: null
- },
- optionalParams: {
- minBarSize: 1,
- maxBarSize: 1,
-
- stroke: {},
- outline: {},
- shadow: {},
- fill: {},
- font: "",
- fontColor: ""
- },
- constructor: function(chart, kwArgs){
-
-
-
-
-
-
- this.opt = lang.clone(this.defaultParams);
- du.updateWithObject(this.opt, kwArgs);
- du.updateWithPattern(this.opt, kwArgs, this.optionalParams);
- this.series = [];
- this.hAxis = this.opt.hAxis;
- this.vAxis = this.opt.vAxis;
- this.animate = this.opt.animate;
- },
- collectStats: function(series){
-
-
-
-
-
-
-
-
-
-
- var stats = lang.delegate(dc.defaultStats);
- for(var i=0; i<series.length; i++){
- var run = series[i];
- if(!run.data.length){ continue; }
- var old_vmin = stats.vmin, old_vmax = stats.vmax;
- if(!("ymin" in run) || !("ymax" in run)){
- arr.forEach(run.data, function(val, idx){
- if(val !== null){
- var x = val.x || idx + 1;
- stats.hmin = Math.min(stats.hmin, x);
- stats.hmax = Math.max(stats.hmax, x);
- stats.vmin = Math.min(stats.vmin, val.open, val.close, val.high, val.low);
- stats.vmax = Math.max(stats.vmax, val.open, val.close, val.high, val.low);
- }
- });
- }
- if("ymin" in run){ stats.vmin = Math.min(old_vmin, run.ymin); }
- if("ymax" in run){ stats.vmax = Math.max(old_vmax, run.ymax); }
- }
- return stats;
- },
- getSeriesStats: function(){
-
-
-
-
- var stats = this.collectStats(this.series);
- stats.hmin -= 0.5;
- stats.hmax += 0.5;
- return stats;
- },
- render: function(dim, offsets){
-
-
-
-
-
-
-
-
- if(this.zoom && !this.isDataDirty()){
- return this.performZoom(dim, offsets);
- }
- this.resetEvents();
- this.dirty = this.isDirty();
- if(this.dirty){
- arr.forEach(this.series, purgeGroup);
- this._eventSeries = {};
- this.cleanGroup();
- var s = this.group;
- df.forEachRev(this.series, function(item){ item.cleanGroup(s); });
- }
- var t = this.chart.theme, f, gap, width,
- ht = this._hScaler.scaler.getTransformerFromModel(this._hScaler),
- vt = this._vScaler.scaler.getTransformerFromModel(this._vScaler),
- baseline = Math.max(0, this._vScaler.bounds.lower),
- baselineHeight = vt(baseline),
- events = this.events();
- f = dc.calculateBarSize(this._hScaler.bounds.scale, this.opt);
- gap = f.gap;
- width = f.size;
- for(var i = this.series.length - 1; i >= 0; --i){
- var run = this.series[i];
- if(!this.dirty && !run.dirty){
- t.skip();
- this._reconnectEvents(run.name);
- continue;
- }
- run.cleanGroup();
- var theme = t.next("candlestick", [this.opt, run]), s = run.group,
- eventSeries = new Array(run.data.length);
- for(var j = 0; j < run.data.length; ++j){
- var v = run.data[j];
- if(v !== null){
- var finalTheme = t.addMixin(theme, "candlestick", v, true);
-
- var x = ht(v.x || (j+0.5)) + offsets.l + gap,
- y = dim.height - offsets.b,
- open = vt(v.open),
- close = vt(v.close),
- high = vt(v.high),
- low = vt(v.low);
- if(low > high){
- var tmp = high;
- high = low;
- low = tmp;
- }
- if(width >= 1){
- var hl = {x1: width/2, x2: width/2, y1: y - high, y2: y - low},
- op = {x1: 0, x2: ((width/2) + ((finalTheme.series.stroke.width||1)/2)), y1: y-open, y2: y-open},
- cl = {x1: ((width/2) - ((finalTheme.series.stroke.width||1)/2)), x2: width, y1: y-close, y2: y-close};
- var shape = s.createGroup();
- shape.setTransform({dx: x, dy: 0});
- var inner = shape.createGroup();
- inner.createLine(hl).setStroke(finalTheme.series.stroke);
- inner.createLine(op).setStroke(finalTheme.series.stroke);
- inner.createLine(cl).setStroke(finalTheme.series.stroke);
-
- run.dyn.stroke = finalTheme.series.stroke;
- if(events){
- var o = {
- element: "candlestick",
- index: j,
- run: run,
- shape: inner,
- x: x,
- y: y-Math.max(open, close),
- cx: width/2,
- cy: (y-Math.max(open, close)) + (Math.max(open > close ? open-close : close-open, 1)/2),
- width: width,
- height: Math.max(open > close ? open-close : close-open, 1),
- data: v
- };
- this._connectEvents(o);
- eventSeries[j] = o;
- }
- }
- if(this.animate){
- this._animateOHLC(shape, y - low, high - low);
- }
- }
- }
- this._eventSeries[run.name] = eventSeries;
- run.dirty = false;
- }
- this.dirty = false;
- return this;
- },
- _animateOHLC: function(shape, voffset, vsize){
- fx.animateTransform(lang.delegate({
- shape: shape,
- duration: 1200,
- transform: [
- {name: "translate", start: [0, voffset - (voffset/vsize)], end: [0, 0]},
- {name: "scale", start: [1, 1/vsize], end: [1, 1]},
- {name: "original"}
- ]
- }, this.animate)).play();
- }
- });
- });
- },
- 'dojox/charting/plot2d/ClusteredColumns':function(){
- define("dojox/charting/plot2d/ClusteredColumns", ["dojo/_base/array", "dojo/_base/declare", "./Columns", "./common",
- "dojox/lang/functional", "dojox/lang/functional/reversed", "dojox/lang/utils"],
- function(arr, declare, Columns, dc, df, dfr, du){
- var purgeGroup = dfr.lambda("item.purgeGroup()");
- return declare("dojox.charting.plot2d.ClusteredColumns", Columns, {
-
-
- render: function(dim, offsets){
-
-
-
-
-
-
-
-
- if(this.zoom && !this.isDataDirty()){
- return this.performZoom(dim, offsets);
- }
- this.resetEvents();
- this.dirty = this.isDirty();
- if(this.dirty){
- arr.forEach(this.series, purgeGroup);
- this._eventSeries = {};
- this.cleanGroup();
- var s = this.group;
- df.forEachRev(this.series, function(item){ item.cleanGroup(s); });
- }
- var t = this.chart.theme, f, gap, width, thickness,
- ht = this._hScaler.scaler.getTransformerFromModel(this._hScaler),
- vt = this._vScaler.scaler.getTransformerFromModel(this._vScaler),
- baseline = Math.max(0, this._vScaler.bounds.lower),
- baselineHeight = vt(baseline),
- events = this.events();
- f = dc.calculateBarSize(this._hScaler.bounds.scale, this.opt, this.series.length);
- gap = f.gap;
- width = thickness = f.size;
- for(var i = 0; i < this.series.length; ++i){
- var run = this.series[i], shift = thickness * i;
- if(!this.dirty && !run.dirty){
- t.skip();
- this._reconnectEvents(run.name);
- continue;
- }
- run.cleanGroup();
- var theme = t.next("column", [this.opt, run]), s = run.group,
- eventSeries = new Array(run.data.length);
- for(var j = 0; j < run.data.length; ++j){
- var value = run.data[j];
- if(value !== null){
- var v = typeof value == "number" ? value : value.y,
- vv = vt(v),
- height = vv - baselineHeight,
- h = Math.abs(height),
- finalTheme = typeof value != "number" ?
- t.addMixin(theme, "column", value, true) :
- t.post(theme, "column");
- if(width >= 1 && h >= 0){
- var rect = {
- x: offsets.l + ht(j + 0.5) + gap + shift,
- y: dim.height - offsets.b - (v > baseline ? vv : baselineHeight),
- width: width, height: h
- };
- var specialFill = this._plotFill(finalTheme.series.fill, dim, offsets);
- specialFill = this._shapeFill(specialFill, rect);
- var shape = s.createRect(rect).setFill(specialFill).setStroke(finalTheme.series.stroke);
- run.dyn.fill = shape.getFill();
- run.dyn.stroke = shape.getStroke();
- if(events){
- var o = {
- element: "column",
- index: j,
- run: run,
- shape: shape,
- x: j + 0.5,
- y: v
- };
- this._connectEvents(o);
- eventSeries[j] = o;
- }
- if(this.animate){
- this._animateColumn(shape, dim.height - offsets.b - baselineHeight, h);
- }
- }
- }
- }
- this._eventSeries[run.name] = eventSeries;
- run.dirty = false;
- }
- this.dirty = false;
- return this;
- }
- });
- });
- },
- 'dojox/charting/Chart':function(){
- define("dojox/charting/Chart", ["dojo/_base/lang", "dojo/_base/array","dojo/_base/declare", "dojo/_base/html",
- "dojo/dom", "dojo/dom-geometry", "dojo/dom-construct","dojo/_base/Color", "dojo/_base/sniff",
- "./Element", "./Theme", "./Series", "./axis2d/common", "dojox/gfx/shape",
- "dojox/gfx", "dojox/lang/functional", "dojox/lang/functional/fold", "dojox/lang/functional/reversed"],
- function(lang, arr, declare, html,
- dom, domGeom, domConstruct, Color, has,
- Element, Theme, Series, common, shape,
- g, func, funcFold, funcReversed){
-
- var dc = dojox.charting,
- clear = func.lambda("item.clear()"),
- purge = func.lambda("item.purgeGroup()"),
- destroy = func.lambda("item.destroy()"),
- makeClean = func.lambda("item.dirty = false"),
- makeDirty = func.lambda("item.dirty = true"),
- getName = func.lambda("item.name");
- declare("dojox.charting.Chart", null, {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- constructor: function(/* DOMNode */node, /* dojox.charting.__ChartCtorArgs? */kwArgs){
-
-
-
-
-
- if(!kwArgs){ kwArgs = {}; }
- this.margins = kwArgs.margins ? kwArgs.margins : {l: 10, t: 10, r: 10, b: 10};
- this.stroke = kwArgs.stroke;
- this.fill = kwArgs.fill;
- this.delayInMs = kwArgs.delayInMs || 200;
- this.title = kwArgs.title;
- this.titleGap = kwArgs.titleGap;
- this.titlePos = kwArgs.titlePos;
- this.titleFont = kwArgs.titleFont;
- this.titleFontColor = kwArgs.titleFontColor;
- this.chartTitle = null;
-
- this.theme = null;
- this.axes = {};
- this.stack = [];
- this.plots = {};
- this.series = [];
- this.runs = {};
- this.dirty = true;
- this.coords = null;
- this._clearRects = [];
-
- this.node = dom.byId(node);
- var box = domGeom.getMarginBox(node);
- this.surface = g.createSurface(this.node, box.w || 400, box.h || 300);
- },
- destroy: function(){
-
-
-
- arr.forEach(this.series, destroy);
- arr.forEach(this.stack, destroy);
- func.forIn(this.axes, destroy);
- if(this.chartTitle && this.chartTitle.tagName){
-
- domConstruct.destroy(this.chartTitle);
- }
- arr.forEach(this._clearRects, function(child){
- shape.dispose(child);
- });
- this.surface.destroy();
- },
- getCoords: function(){
-
-
-
-
-
- return html.coords(this.node, true);
- },
- setTheme: function(theme){
-
-
-
-
-
-
- this.theme = theme.clone();
- this.dirty = true;
- return this;
- },
- addAxis: function(name, kwArgs){
-
-
-
-
-
-
-
-
- var axis, axisType = kwArgs && kwArgs.type || "Default";
- if(typeof axisType == "string"){
- if(!dc.axis2d || !dc.axis2d[axisType]){
- throw Error("Can't find axis: " + axisType + " - Check " + "require() dependencies.");
- }
- axis = new dc.axis2d[axisType](this, kwArgs);
- }else{
- axis = new axisType(this, kwArgs);
- }
- axis.name = name;
- axis.dirty = true;
- if(name in this.axes){
- this.axes[name].destroy();
- }
- this.axes[name] = axis;
- this.dirty = true;
- return this;
- },
- getAxis: function(name){
-
-
-
-
-
-
- return this.axes[name];
- },
- removeAxis: function(name){
-
-
-
-
-
-
- if(name in this.axes){
-
- this.axes[name].destroy();
- delete this.axes[name];
-
- this.dirty = true;
- }
- return this;
- },
- addPlot: function(name, kwArgs){
-
-
-
-
-
-
-
-
-
-
-
- var plot, plotType = kwArgs && kwArgs.type || "Default";
- if(typeof plotType == "string"){
- if(!dc.plot2d || !dc.plot2d[plotType]){
- throw Error("Can't find plot: " + plotType + " - didn't you forget to dojo" + ".require() it?");
- }
- plot = new dc.plot2d[plotType](this, kwArgs);
- }else{
- plot = new plotType(this, kwArgs);
- }
- plot.name = name;
- plot.dirty = true;
- if(name in this.plots){
- this.stack[this.plots[name]].destroy();
- this.stack[this.plots[name]] = plot;
- }else{
- this.plots[name] = this.stack.length;
- this.stack.push(plot);
- }
- this.dirty = true;
- return this;
- },
- getPlot: function(name){
-
-
-
-
-
-
- return this.stack[this.plots[name]];
- },
- removePlot: function(name){
-
-
-
-
-
-
- if(name in this.plots){
-
- var index = this.plots[name];
- delete this.plots[name];
-
- this.stack[index].destroy();
-
- this.stack.splice(index, 1);
-
- func.forIn(this.plots, function(idx, name, plots){
- if(idx > index){
- plots[name] = idx - 1;
- }
- });
-
- var ns = arr.filter(this.series, function(run){ return run.plot != name; });
- if(ns.length < this.series.length){
-
- arr.forEach(this.series, function(run){
- if(run.plot == name){
- run.destroy();
- }
- });
-
- this.runs = {};
- arr.forEach(ns, function(run, index){
- this.runs[run.plot] = index;
- }, this);
- this.series = ns;
- }
-
- this.dirty = true;
- }
- return this;
- },
- getPlotOrder: function(){
-
-
-
-
- return func.map(this.stack, getName);
- },
- setPlotOrder: function(newOrder){
-
-
-
-
-
-
-
- var names = {},
- order = func.filter(newOrder, function(name){
- if(!(name in this.plots) || (name in names)){
- return false;
- }
- names[name] = 1;
- return true;
- }, this);
- if(order.length < this.stack.length){
- func.forEach(this.stack, function(plot){
- var name = plot.name;
- if(!(name in names)){
- order.push(name);
- }
- });
- }
- var newStack = func.map(order, function(name){
- return this.stack[this.plots[name]];
- }, this);
- func.forEach(newStack, function(plot, i){
- this.plots[plot.name] = i;
- }, this);
- this.stack = newStack;
- this.dirty = true;
- return this;
- },
- movePlotToFront: function(name){
-
-
-
-
-
-
- if(name in this.plots){
- var index = this.plots[name];
- if(index){
- var newOrder = this.getPlotOrder();
- newOrder.splice(index, 1);
- newOrder.unshift(name);
- return this.setPlotOrder(newOrder);
- }
- }
- return this;
- },
- movePlotToBack: function(name){
-
-
-
-
-
-
- if(name in this.plots){
- var index = this.plots[name];
- if(index < this.stack.length - 1){
- var newOrder = this.getPlotOrder();
- newOrder.splice(index, 1);
- newOrder.push(name);
- return this.setPlotOrder(newOrder);
- }
- }
- return this;
- },
- addSeries: function(name, data, kwArgs){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var run = new Series(this, data, kwArgs);
- run.name = name;
- if(name in this.runs){
- this.series[this.runs[name]].destroy();
- this.series[this.runs[name]] = run;
- }else{
- this.runs[name] = this.series.length;
- this.series.push(run);
- }
- this.dirty = true;
-
- if(!("ymin" in run) && "min" in run){ run.ymin = run.min; }
- if(!("ymax" in run) && "max" in run){ run.ymax = run.max; }
- return this;
- },
- getSeries: function(name){
-
-
-
-
-
-
- return this.series[this.runs[name]];
- },
- removeSeries: function(name){
-
-
-
-
-
-
- if(name in this.runs){
-
- var index = this.runs[name];
- delete this.runs[name];
-
- this.series[index].destroy();
-
- this.series.splice(index, 1);
-
- func.forIn(this.runs, function(idx, name, runs){
- if(idx > index){
- runs[name] = idx - 1;
- }
- });
- this.dirty = true;
- }
- return this;
- },
- updateSeries: function(name, data){
-
-
-
-
-
-
-
-
-
-
-
- if(name in this.runs){
- var run = this.series[this.runs[name]];
- run.update(data);
- this._invalidateDependentPlots(run.plot, false);
- this._invalidateDependentPlots(run.plot, true);
- }
- return this;
- },
- getSeriesOrder: function(plotName){
-
-
-
-
-
-
- return func.map(func.filter(this.series, function(run){
- return run.plot == plotName;
- }), getName);
- },
- setSeriesOrder: function(newOrder){
-
-
-
-
-
-
-
-
- var plotName, names = {},
- order = func.filter(newOrder, function(name){
- if(!(name in this.runs) || (name in names)){
- return false;
- }
- var run = this.series[this.runs[name]];
- if(plotName){
- if(run.plot != plotName){
- return false;
- }
- }else{
- plotName = run.plot;
- }
- names[name] = 1;
- return true;
- }, this);
- func.forEach(this.series, function(run){
- var name = run.name;
- if(!(name in names) && run.plot == plotName){
- order.push(name);
- }
- });
- var newSeries = func.map(order, function(name){
- return this.series[this.runs[name]];
- }, this);
- this.series = newSeries.concat(func.filter(this.series, function(run){
- return run.plot != plotName;
- }));
- func.forEach(this.series, function(run, i){
- this.runs[run.name] = i;
- }, this);
- this.dirty = true;
- return this;
- },
- moveSeriesToFront: function(name){
-
-
-
-
-
-
- if(name in this.runs){
- var index = this.runs[name],
- newOrder = this.getSeriesOrder(this.series[index].plot);
- if(name != newOrder[0]){
- newOrder.splice(index, 1);
- newOrder.unshift(name);
- return this.setSeriesOrder(newOrder);
- }
- }
- return this;
- },
- moveSeriesToBack: function(name){
-
-
-
-
-
-
- if(name in this.runs){
- var index = this.runs[name],
- newOrder = this.getSeriesOrder(this.series[index].plot);
- if(name != newOrder[newOrder.length - 1]){
- newOrder.splice(index, 1);
- newOrder.push(name);
- return this.setSeriesOrder(newOrder);
- }
- }
- return this;
- },
- resize: function(width, height){
-
-
-
-
-
-
-
-
-
-
-
- var box;
- switch(arguments.length){
-
- case 1:
-
- box = lang.mixin({}, width);
- domGeom.setMarginBox(this.node, box);
- break;
- case 2:
- box = {w: width, h: height};
-
- domGeom.setMarginBox(this.node, box);
- break;
- }
-
- box = domGeom.getMarginBox(this.node);
- var d = this.surface.getDimensions();
- if(d.width != box.w || d.height != box.h){
-
- this.surface.setDimensions(box.w, box.h);
- this.dirty = true;
- return this.render();
- }else{
- return this;
- }
- },
- getGeometry: function(){
-
-
-
-
-
- var ret = {};
- func.forIn(this.axes, function(axis){
- if(axis.initialized()){
- ret[axis.name] = {
- name: axis.name,
- vertical: axis.vertical,
- scaler: axis.scaler,
- ticks: axis.ticks
- };
- }
- });
- return ret;
- },
- setAxisWindow: function(name, scale, offset, zoom){
-
-
-
-
-
-
-
-
-
-
-
-
-
- var axis = this.axes[name];
- if(axis){
- axis.setWindow(scale, offset);
- arr.forEach(this.stack,function(plot){
- if(plot.hAxis == name || plot.vAxis == name){
- plot.zoom = zoom;
- }
- });
- }
- return this;
- },
- setWindow: function(sx, sy, dx, dy, zoom){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if(!("plotArea" in this)){
- this.calculateGeometry();
- }
- func.forIn(this.axes, function(axis){
- var scale, offset, bounds = axis.getScaler().bounds,
- s = bounds.span / (bounds.upper - bounds.lower);
- if(axis.vertical){
- scale = sy;
- offset = dy / s / scale;
- }else{
- scale = sx;
- offset = dx / s / scale;
- }
- axis.setWindow(scale, offset);
- });
- arr.forEach(this.stack, function(plot){ plot.zoom = zoom; });
- return this;
- },
- zoomIn: function(name, range){
-
-
-
-
-
-
-
- var axis = this.axes[name];
- if(axis){
- var scale, offset, bounds = axis.getScaler().bounds;
- var lower = Math.min(range[0],range[1]);
- var upper = Math.max(range[0],range[1]);
- lower = range[0] < bounds.lower ? bounds.lower : lower;
- upper = range[1] > bounds.upper ? bounds.upper : upper;
- scale = (bounds.upper - bounds.lower) / (upper - lower);
- offset = lower - bounds.lower;
- this.setAxisWindow(name, scale, offset);
- this.render();
- }
- },
- calculateGeometry: function(){
-
-
-
-
-
- if(this.dirty){
- return this.fullGeometry();
- }
-
- var dirty = arr.filter(this.stack, function(plot){
- return plot.dirty ||
- (plot.hAxis && this.axes[plot.hAxis].dirty) ||
- (plot.vAxis && this.axes[plot.vAxis].dirty);
- }, this);
- calculateAxes(dirty, this.plotArea);
- return this;
- },
- fullGeometry: function(){
-
-
-
-
-
-
- this._makeDirty();
-
- arr.forEach(this.stack, clear);
-
-
- if(!this.theme){
- this.setTheme(new Theme(dojox.charting._def));
- }
-
- arr.forEach(this.series, function(run){
- if(!(run.plot in this.plots)){
- if(!dc.plot2d || !dc.plot2d.Default){
- throw Error("Can't find plot: Default - didn't you forget to dojo" + ".require() it?");
- }
- var plot = new dc.plot2d.Default(this, {});
- plot.name = run.plot;
- this.plots[run.plot] = this.stack.length;
- this.stack.push(plot);
- }
- this.stack[this.plots[run.plot]].addSeries(run);
- }, this);
-
- arr.forEach(this.stack, function(plot){
- if(plot.hAxis){
- plot.setAxis(this.axes[plot.hAxis]);
- }
- if(plot.vAxis){
- plot.setAxis(this.axes[plot.vAxis]);
- }
- }, this);
-
-
- var dim = this.dim = this.surface.getDimensions();
- dim.width = g.normalizedLength(dim.width);
- dim.height = g.normalizedLength(dim.height);
- func.forIn(this.axes, clear);
- calculateAxes(this.stack, dim);
-
- var offsets = this.offsets = { l: 0, r: 0, t: 0, b: 0 };
- func.forIn(this.axes, function(axis){
- func.forIn(axis.getOffsets(), function(o, i){ offsets[i] += o; });
- });
-
- if(this.title){
- this.titleGap = (this.titleGap==0) ? 0 : this.titleGap || this.theme.chart.titleGap || 20;
- this.titlePos = this.titlePos || this.theme.chart.titlePos || "top";
- this.titleFont = this.titleFont || this.theme.chart.titleFont;
- this.titleFontColor = this.titleFontColor || this.theme.chart.titleFontColor || "black";
- var tsize = g.normalizedLength(g.splitFontString(this.titleFont).size);
- offsets[this.titlePos=="top" ? "t":"b"] += (tsize + this.titleGap);
- }
-
- func.forIn(this.margins, function(o, i){ offsets[i] += o; });
-
- this.plotArea = {
- width: dim.width - offsets.l - offsets.r,
- height: dim.height - offsets.t - offsets.b
- };
- func.forIn(this.axes, clear);
- calculateAxes(this.stack, this.plotArea);
- return this;
- },
- render: function(){
-
-
-
-
-
-
- if(this.theme){
- this.theme.clear();
- }
- if(this.dirty){
- return this.fullRender();
- }
- this.calculateGeometry();
-
- func.forEachRev(this.stack, function(plot){ plot.render(this.dim, this.offsets); }, this);
-
- func.forIn(this.axes, function(axis){ axis.render(this.dim, this.offsets); }, this);
- this._makeClean();
-
- if(this.surface.render){ this.surface.render(); };
-
- return this;
- },
- fullRender: function(){
-
-
-
-
-
-
- this.fullGeometry();
- var offsets = this.offsets, dim = this.dim, rect;
-
-
-
-
- arr.forEach(this.series, purge);
- func.forIn(this.axes, purge);
- arr.forEach(this.stack, purge);
- arr.forEach(this._clearRects, function(child){
- shape.dispose(child);
- });
- this._clearRects = [];
- if(this.chartTitle && this.chartTitle.tagName){
-
- domConstruct.destroy(this.chartTitle);
- }
- this.surface.clear();
- this.chartTitle = null;
-
-
- var t = this.theme,
- fill = t.plotarea && t.plotarea.fill,
- stroke = t.plotarea && t.plotarea.stroke,
-
-
-
- w = Math.max(0, dim.width - offsets.l - offsets.r),
- h = Math.max(0, dim.height - offsets.t - offsets.b),
- rect = {
- x: offsets.l - 1, y: offsets.t - 1,
- width: w + 2,
- height: h + 2
- };
- if(fill){
- fill = Element.prototype._shapeFill(Element.prototype._plotFill(fill, dim, offsets), rect);
- this._clearRects.push(this.surface.createRect(rect).setFill(fill));
- }
- if(stroke){
- this._clearRects.push(this.surface.createRect({
- x: offsets.l, y: offsets.t,
- width: w + 1,
- height: h + 1
- }).setStroke(stroke));
- }
-
- func.foldr(this.stack, function(z, plot){ return plot.render(dim, offsets), 0; }, 0);
-
- fill = this.fill !== undefined ? this.fill : (t.chart && t.chart.fill);
- stroke = this.stroke !== undefined ? this.stroke : (t.chart && t.chart.stroke);
-
- if(fill == "inherit"){
-
- var node = this.node, fill = new Color(html.style(node, "backgroundColor"));
- while(fill.a==0 && node!=document.documentElement){
- fill = new Color(html.style(node, "backgroundColor"));
- node = node.parentNode;
- }
- }
- if(fill){
- fill = Element.prototype._plotFill(fill, dim, offsets);
- if(offsets.l){
- rect = {
- width: offsets.l,
- height: dim.height + 1
- };
- this._clearRects.push(this.surface.createRect(rect).setFill(Element.prototype._shapeFill(fill, rect)));
- }
- if(offsets.r){
- rect = {
- x: dim.width - offsets.r,
- width: offsets.r + 1,
- height: dim.height + 2
- };
- this._clearRects.push(this.surface.createRect(rect).setFill(Element.prototype._shapeFill(fill, rect)));
- }
- if(offsets.t){
- rect = {
- width: dim.width + 1,
- height: offsets.t
- };
- this._clearRects.push(this.surface.createRect(rect).setFill(Element.prototype._shapeFill(fill, rect)));
- }
- if(offsets.b){
- rect = {
- y: dim.height - offsets.b,
- width: dim.width + 1,
- height: offsets.b + 2
- };
- this._clearRects.push(this.surface.createRect(rect).setFill(Element.prototype._shapeFill(fill, rect)));
- }
- }
- if(stroke){
- this._clearRects.push(this.surface.createRect({
- width: dim.width - 1,
- height: dim.height - 1
- }).setStroke(stroke));
- }
-
- if(this.title){
- var forceHtmlLabels = (g.renderer == "canvas"),
- labelType = forceHtmlLabels || !has("ie") && !has("opera") ? "html" : "gfx",
- tsize = g.normalizedLength(g.splitFontString(this.titleFont).size);
- this.chartTitle = common.createText[labelType](
- this,
- this.surface,
- dim.width/2,
- this.titlePos=="top" ? tsize + this.margins.t : dim.height - this.margins.b,
- "middle",
- this.title,
- this.titleFont,
- this.titleFontColor
- );
- }
-
- func.forIn(this.axes, function(axis){ axis.render(dim, offsets); });
- this._makeClean();
-
- if(this.surface.render){ this.surface.render(); };
-
- return this;
- },
- delayedRender: function(){
-
-
-
-
-
- if(!this._delayedRenderHandle){
- this._delayedRenderHandle = setTimeout(
- lang.hitch(this, function(){
- clearTimeout(this._delayedRenderHandle);
- this._delayedRenderHandle = null;
- this.render();
- }),
- this.delayInMs
- );
- }
- return this;
- },
- connectToPlot: function(name, object, method){
-
-
-
-
-
-
-
-
-
-
- return name in this.plots ? this.stack[this.plots[name]].connect(object, method) : null;
- },
- fireEvent: function(seriesName, eventName, index){
-
-
-
-
-
-
-
-
-
-
- if(seriesName in this.runs){
- var plotName = this.series[this.runs[seriesName]].plot;
- if(plotName in this.plots){
- var plot = this.stack[this.plots[plotName]];
- if(plot){
- plot.fireEvent(seriesName, eventName, index);
- }
- }
- }
- return this;
- },
- _makeClean: function(){
-
- arr.forEach(this.axes, makeClean);
- arr.forEach(this.stack, makeClean);
- arr.forEach(this.series, makeClean);
- this.dirty = false;
- },
- _makeDirty: function(){
-
- arr.forEach(this.axes, makeDirty);
- arr.forEach(this.stack, makeDirty);
- arr.forEach(this.series, makeDirty);
- this.dirty = true;
- },
- _invalidateDependentPlots: function(plotName, /* Boolean */ verticalAxis){
- if(plotName in this.plots){
- var plot = this.stack[this.plots[plotName]], axis,
- axisName = verticalAxis ? "vAxis" : "hAxis";
- if(plot[axisName]){
- axis = this.axes[plot[axisName]];
- if(axis && axis.dependOnData()){
- axis.dirty = true;
-
- arr.forEach(this.stack, function(p){
- if(p[axisName] && p[axisName] == plot[axisName]){
- p.dirty = true;
- }
- });
- }
- }else{
- plot.dirty = true;
- }
- }
- }
- });
- function hSection(stats){
- return {min: stats.hmin, max: stats.hmax};
- }
- function vSection(stats){
- return {min: stats.vmin, max: stats.vmax};
- }
- function hReplace(stats, h){
- stats.hmin = h.min;
- stats.hmax = h.max;
- }
- function vReplace(stats, v){
- stats.vmin = v.min;
- stats.vmax = v.max;
- }
- function combineStats(target, source){
- if(target && source){
- target.min = Math.min(target.min, source.min);
- target.max = Math.max(target.max, source.max);
- }
- return target || source;
- }
- function calculateAxes(stack, plotArea){
- var plots = {}, axes = {};
- arr.forEach(stack, function(plot){
- var stats = plots[plot.name] = plot.getSeriesStats();
- if(plot.hAxis){
- axes[plot.hAxis] = combineStats(axes[plot.hAxis], hSection(stats));
- }
- if(plot.vAxis){
- axes[plot.vAxis] = combineStats(axes[plot.vAxis], vSection(stats));
- }
- });
- arr.forEach(stack, function(plot){
- var stats = plots[plot.name];
- if(plot.hAxis){
- hReplace(stats, axes[plot.hAxis]);
- }
- if(plot.vAxis){
- vReplace(stats, axes[plot.vAxis]);
- }
- plot.initializeScalers(plotArea, stats);
- });
- }
-
- return dojox.charting.Chart;
- });
- },
- 'dojox/lang/functional/sequence':function(){
- define("dojox/lang/functional/sequence", ["dojo/_base/lang", "./lambda"], function(lang, df){
- lang.mixin(df, {
-
- repeat: function(/*Number*/ n, /*Function|String|Array*/ f, /*Object*/ z, /*Object?*/ o){
-
-
- o = o || dojo.global; f = df.lambda(f);
- var t = new Array(n), i = 1;
- t[0] = z;
- for(; i < n; t[i] = z = f.call(o, z), ++i);
- return t;
- },
- until: function(/*Function|String|Array*/ pr, /*Function|String|Array*/ f, /*Object*/ z, /*Object?*/ o){
-
-
- o = o || dojo.global; f = df.lambda(f); pr = df.lambda(pr);
- var t = [];
- for(; !pr.call(o, z); t.push(z), z = f.call(o, z));
- return t;
- }
- });
-
- return df;
- });
- },
- 'dojox/charting/plot2d/MarkersOnly':function(){
- define("dojox/charting/plot2d/MarkersOnly", ["dojo/_base/declare", "./Default"], function(declare, Default){
- return declare("dojox.charting.plot2d.MarkersOnly", Default, {
-
-
- constructor: function(){
-
-
- this.opt.lines = false;
- this.opt.markers = true;
- }
- });
- });
- },
- 'dojox/charting/plot2d/Areas':function(){
- define("dojox/charting/plot2d/Areas", ["dojo/_base/declare", "./Default"],
- function(declare, Default){
- return declare("dojox.charting.plot2d.Areas", Default, {
-
-
- constructor: function(){
- this.opt.lines = true;
- this.opt.areas = true;
- }
- });
- });
- },
- 'dojox/charting/action2d/Base':function(){
- define("dojox/charting/action2d/Base", ["dojo/_base/lang", "dojo/_base/declare"],
- function(lang, declare){
- return declare("dojox.charting.action2d.Base", null, {
-
-
-
- constructor: function(chart, plot){
-
-
-
-
-
-
- this.chart = chart;
- this.plot = plot ? (lang.isString(plot) ? this.chart.getPlot(plot) : plot) : this.chart.getPlot("default");
- },
-
- connect: function(){
-
-
- },
-
- disconnect: function(){
-
-
- },
-
- destroy: function(){
-
-
- this.disconnect();
- }
- });
- });
- },
- 'dojo/fx':function(){
- define([
- "./_base/lang",
- "./Evented",
- "./_base/kernel",
- "./_base/array",
- "./_base/connect",
- "./_base/fx",
- "./dom",
- "./dom-style",
- "./dom-geometry",
- "./ready",
- "require"
- ], function(lang, Evented, dojo, arrayUtil, connect, baseFx, dom, domStyle, geom, ready, require) {
-
-
-
-
-
-
- if(!dojo.isAsync){
- ready(0, function(){
- var requires = ["./fx/Toggler"];
- require(requires);
- });
- }
- var coreFx = dojo.fx = {};
- var _baseObj = {
- _fire: function(evt, args){
- if(this[evt]){
- this[evt].apply(this, args||[]);
- }
- return this;
- }
- };
- var _chain = function(animations){
- this._index = -1;
- this._animations = animations||[];
- this._current = this._onAnimateCtx = this._onEndCtx = null;
- this.duration = 0;
- arrayUtil.forEach(this._animations, function(a){
- this.duration += a.duration;
- if(a.delay){ this.duration += a.delay; }
- }, this);
- };
- _chain.prototype = new Evented();
- lang.extend(_chain, {
- _onAnimate: function(){
- this._fire("onAnimate", arguments);
- },
- _onEnd: function(){
- connect.disconnect(this._onAnimateCtx);
- connect.disconnect(this._onEndCtx);
- this._onAnimateCtx = this._onEndCtx = null;
- if(this._index + 1 == this._animations.length){
- this._fire("onEnd");
- }else{
-
- this._current = this._animations[++this._index];
- this._onAnimateCtx = connect.connect(this._current, "onAnimate", this, "_onAnimate");
- this._onEndCtx = connect.connect(this._current, "onEnd", this, "_onEnd");
- this._current.play(0, true);
- }
- },
- play: function(/*int?*/ delay, /*Boolean?*/ gotoStart){
- if(!this._current){ this._current = this._animations[this._index = 0]; }
- if(!gotoStart && this._current.status() == "playing"){ return this; }
- var beforeBegin = connect.connect(this._current, "beforeBegin", this, function(){
- this._fire("beforeBegin");
- }),
- onBegin = connect.connect(this._current, "onBegin", this, function(arg){
- this._fire("onBegin", arguments);
- }),
- onPlay = connect.connect(this._current, "onPlay", this, function(arg){
- this._fire("onPlay", arguments);
- connect.disconnect(beforeBegin);
- connect.disconnect(onBegin);
- connect.disconnect(onPlay);
- });
- if(this._onAnimateCtx){
- connect.disconnect(this._onAnimateCtx);
- }
- this._onAnimateCtx = connect.connect(this._current, "onAnimate", this, "_onAnimate");
- if(this._onEndCtx){
- connect.disconnect(this._onEndCtx);
- }
- this._onEndCtx = connect.connect(this._current, "onEnd", this, "_onEnd");
- this._current.play.apply(this._current, arguments);
- return this;
- },
- pause: function(){
- if(this._current){
- var e = connect.connect(this._current, "onPause", this, function(arg){
- this._fire("onPause", arguments);
- connect.disconnect(e);
- });
- this._current.pause();
- }
- return this;
- },
- gotoPercent: function(/*Decimal*/percent, /*Boolean?*/ andPlay){
- this.pause();
- var offset = this.duration * percent;
- this._current = null;
- arrayUtil.some(this._animations, function(a){
- if(a.duration <= offset){
- this._current = a;
- return true;
- }
- offset -= a.duration;
- return false;
- });
- if(this._current){
- this._current.gotoPercent(offset / this._current.duration, andPlay);
- }
- return this;
- },
- stop: function(/*boolean?*/ gotoEnd){
- if(this._current){
- if(gotoEnd){
- for(; this._index + 1 < this._animations.length; ++this._index){
- this._animations[this._index].stop(true);
- }
- this._current = this._animations[this._index];
- }
- var e = connect.connect(this._current, "onStop", this, function(arg){
- this._fire("onStop", arguments);
- connect.disconnect(e);
- });
- this._current.stop();
- }
- return this;
- },
- status: function(){
- return this._current ? this._current.status() : "stopped";
- },
- destroy: function(){
- if(this._onAnimateCtx){ connect.disconnect(this._onAnimateCtx); }
- if(this._onEndCtx){ connect.disconnect(this._onEndCtx); }
- }
- });
- lang.extend(_chain, _baseObj);
- coreFx.chain = function(/*dojo.Animation[]*/ animations){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- return new _chain(animations);
- };
- var _combine = function(animations){
- this._animations = animations||[];
- this._connects = [];
- this._finished = 0;
- this.duration = 0;
- arrayUtil.forEach(animations, function(a){
- var duration = a.duration;
- if(a.delay){ duration += a.delay; }
- if(this.duration < duration){ this.duration = duration; }
- this._connects.push(connect.connect(a, "onEnd", this, "_onEnd"));
- }, this);
- this._pseudoAnimation = new baseFx.Animation({curve: [0, 1], duration: this.duration});
- var self = this;
- arrayUtil.forEach(["beforeBegin", "onBegin", "onPlay", "onAnimate", "onPause", "onStop", "onEnd"],
- function(evt){
- self._connects.push(connect.connect(self._pseudoAnimation, evt,
- function(){ self._fire(evt, arguments); }
- ));
- }
- );
- };
- lang.extend(_combine, {
- _doAction: function(action, args){
- arrayUtil.forEach(this._animations, function(a){
- a[action].apply(a, args);
- });
- return this;
- },
- _onEnd: function(){
- if(++this._finished > this._animations.length){
- this._fire("onEnd");
- }
- },
- _call: function(action, args){
- var t = this._pseudoAnimation;
- t[action].apply(t, args);
- },
- play: function(/*int?*/ delay, /*Boolean?*/ gotoStart){
- this._finished = 0;
- this._doAction("play", arguments);
- this._call("play", arguments);
- return this;
- },
- pause: function(){
- this._doAction("pause", arguments);
- this._call("pause", arguments);
- return this;
- },
- gotoPercent: function(/*Decimal*/percent, /*Boolean?*/ andPlay){
- var ms = this.duration * percent;
- arrayUtil.forEach(this._animations, function(a){
- a.gotoPercent(a.duration < ms ? 1 : (ms / a.duration), andPlay);
- });
- this._call("gotoPercent", arguments);
- return this;
- },
- stop: function(/*boolean?*/ gotoEnd){
- this._doAction("stop", arguments);
- this._call("stop", arguments);
- return this;
- },
- status: function(){
- return this._pseudoAnimation.status();
- },
- destroy: function(){
- arrayUtil.forEach(this._connects, connect.disconnect);
- }
- });
- lang.extend(_combine, _baseObj);
- coreFx.combine = function(/*dojo.Animation[]*/ animations){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- return new _combine(animations);
- };
- coreFx.wipeIn = function(/*Object*/ args){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var node = args.node = dom.byId(args.node), s = node.style, o;
- var anim = baseFx.animateProperty(lang.mixin({
- properties: {
- height: {
-
- start: function(){
-
-
- o = s.overflow;
- s.overflow = "hidden";
- if(s.visibility == "hidden" || s.display == "none"){
- s.height = "1px";
- s.display = "";
- s.visibility = "";
- return 1;
- }else{
- var height = domStyle.get(node, "height");
- return Math.max(height, 1);
- }
- },
- end: function(){
- return node.scrollHeight;
- }
- }
- }
- }, args));
- var fini = function(){
- s.height = "auto";
- s.overflow = o;
- };
- connect.connect(anim, "onStop", fini);
- connect.connect(anim, "onEnd", fini);
- return anim;
- };
- coreFx.wipeOut = function(/*Object*/ args){
-
-
-
-
-
-
-
-
-
-
-
-
-
- var node = args.node = dom.byId(args.node), s = node.style, o;
- var anim = baseFx.animateProperty(lang.mixin({
- properties: {
- height: {
- end: 1
- }
- }
- }, args));
- connect.connect(anim, "beforeBegin", function(){
- o = s.overflow;
- s.overflow = "hidden";
- s.display = "";
- });
- var fini = function(){
- s.overflow = o;
- s.height = "auto";
- s.display = "none";
- };
- connect.connect(anim, "onStop", fini);
- connect.connect(anim, "onEnd", fini);
- return anim;
- };
- coreFx.slideTo = function(/*Object*/ args){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var node = args.node = dom.byId(args.node),
- top = null, left = null;
- var init = (function(n){
- return function(){
- var cs = domStyle.getComputedStyle(n);
- var pos = cs.position;
- top = (pos == 'absolute' ? n.offsetTop : parseInt(cs.top) || 0);
- left = (pos == 'absolute' ? n.offsetLeft : parseInt(cs.left) || 0);
- if(pos != 'absolute' && pos != 'relative'){
- var ret = geom.position(n, true);
- top = ret.y;
- left = ret.x;
- n.style.position="absolute";
- n.style.top=top+"px";
- n.style.left=left+"px";
- }
- };
- })(node);
- init();
- var anim = baseFx.animateProperty(lang.mixin({
- properties: {
- top: args.top || 0,
- left: args.left || 0
- }
- }, args));
- connect.connect(anim, "beforeBegin", anim, init);
- return anim;
- };
- return coreFx;
- });
- },
- 'dojox/gfx/fx':function(){
- define("dojox/gfx/fx", ["dojo/_base/lang", "./_base", "./matrix", "dojo/_base/Color", "dojo/_base/array", "dojo/_base/fx", "dojo/_base/connect"],
- function(lang, g, m, Color, arr, fx, Hub){
- var fxg = g.fx = {};
-
-
- function InterpolNumber(start, end){
- this.start = start, this.end = end;
- }
- InterpolNumber.prototype.getValue = function(r){
- return (this.end - this.start) * r + this.start;
- };
- function InterpolUnit(start, end, units){
- this.start = start, this.end = end;
- this.units = units;
- }
- InterpolUnit.prototype.getValue = function(r){
- return (this.end - this.start) * r + this.start + this.units;
- };
- function InterpolColor(start, end){
- this.start = start, this.end = end;
- this.temp = new Color();
- }
- InterpolColor.prototype.getValue = function(r){
- return Color.blendColors(this.start, this.end, r, this.temp);
- };
- function InterpolValues(values){
- this.values = values;
- this.length = values.length;
- }
- InterpolValues.prototype.getValue = function(r){
- return this.values[Math.min(Math.floor(r * this.length), this.length - 1)];
- };
- function InterpolObject(values, def){
- this.values = values;
- this.def = def ? def : {};
- }
- InterpolObject.prototype.getValue = function(r){
- var ret = lang.clone(this.def);
- for(var i in this.values){
- ret[i] = this.values[i].getValue(r);
- }
- return ret;
- };
- function InterpolTransform(stack, original){
- this.stack = stack;
- this.original = original;
- }
- InterpolTransform.prototype.getValue = function(r){
- var ret = [];
- arr.forEach(this.stack, function(t){
- if(t instanceof m.Matrix2D){
- ret.push(t);
- return;
- }
- if(t.name == "original" && this.original){
- ret.push(this.original);
- return;
- }
- if(!(t.name in m)){ return; }
- var f = m[t.name];
- if(typeof f != "function"){
-
- ret.push(f);
- return;
- }
- var val = arr.map(t.start, function(v, i){
- return (t.end[i] - v) * r + v;
- }),
- matrix = f.apply(m, val);
- if(matrix instanceof m.Matrix2D){
- ret.push(matrix);
- }
- }, this);
- return ret;
- };
- var transparent = new Color(0, 0, 0, 0);
- function getColorInterpol(prop, obj, name, def){
- if(prop.values){
- return new InterpolValues(prop.values);
- }
- var value, start, end;
- if(prop.start){
- start = g.normalizeColor(prop.start);
- }else{
- start = value = obj ? (name ? obj[name] : obj) : def;
- }
- if(prop.end){
- end = g.normalizeColor(prop.end);
- }else{
- if(!value){
- value = obj ? (name ? obj[name] : obj) : def;
- }
- end = value;
- }
- return new InterpolColor(start, end);
- }
- function getNumberInterpol(prop, obj, name, def){
- if(prop.values){
- return new InterpolValues(prop.values);
- }
- var value, start, end;
- if(prop.start){
- start = prop.start;
- }else{
- start = value = obj ? obj[name] : def;
- }
- if(prop.end){
- end = prop.end;
- }else{
- if(typeof value != "number"){
- value = obj ? obj[name] : def;
- }
- end = value;
- }
- return new InterpolNumber(start, end);
- }
- fxg.animateStroke = function(/*Object*/ args){
-
-
-
-
-
-
-
-
-
-
- if(!args.easing){ args.easing = fx._defaultEasing; }
- var anim = new fx.Animation(args), shape = args.shape, stroke;
- Hub.connect(anim, "beforeBegin", anim, function(){
- stroke = shape.getStroke();
- var prop = args.color, values = {}, value, start, end;
- if(prop){
- values.color = getColorInterpol(prop, stroke, "color", transparent);
- }
- prop = args.style;
- if(prop && prop.values){
- values.style = new InterpolValues(prop.values);
- }
- prop = args.width;
- if(prop){
- values.width = getNumberInterpol(prop, stroke, "width", 1);
- }
- prop = args.cap;
- if(prop && prop.values){
- values.cap = new InterpolValues(prop.values);
- }
- prop = args.join;
- if(prop){
- if(prop.values){
- values.join = new InterpolValues(prop.values);
- }else{
- start = prop.start ? prop.start : (stroke && stroke.join || 0);
- end = prop.end ? prop.end : (stroke && stroke.join || 0);
- if(typeof start == "number" && typeof end == "number"){
- values.join = new InterpolNumber(start, end);
- }
- }
- }
- this.curve = new InterpolObject(values, stroke);
- });
- Hub.connect(anim, "onAnimate", shape, "setStroke");
- return anim;
- };
- fxg.animateFill = function(/*Object*/ args){
-
-
-
-
-
-
-
-
-
- if(!args.easing){ args.easing = fx._defaultEasing; }
- var anim = new fx.Animation(args), shape = args.shape, fill;
- Hub.connect(anim, "beforeBegin", anim, function(){
- fill = shape.getFill();
- var prop = args.color, values = {};
- if(prop){
- this.curve = getColorInterpol(prop, fill, "", transparent);
- }
- });
- Hub.connect(anim, "onAnimate", shape, "setFill");
- return anim;
- };
- fxg.animateFont = function(/*Object*/ args){
-
-
-
-
-
-
-
-
-
- if(!args.easing){ args.easing = fx._defaultEasing; }
- var anim = new fx.Animation(args), shape = args.shape, font;
- Hub.connect(anim, "beforeBegin", anim, function(){
- font = shape.getFont();
- var prop = args.style, values = {}, value, start, end;
- if(prop && prop.values){
- values.style = new InterpolValues(prop.values);
- }
- prop = args.variant;
- if(prop && prop.values){
- values.variant = new InterpolValues(prop.values);
- }
- prop = args.weight;
- if(prop && prop.values){
- values.weight = new InterpolValues(prop.values);
- }
- prop = args.family;
- if(prop && prop.values){
- values.family = new InterpolValues(prop.values);
- }
- prop = args.size;
- if(prop && prop.units){
- start = parseFloat(prop.start ? prop.start : (shape.font && shape.font.size || "0"));
- end = parseFloat(prop.end ? prop.end : (shape.font && shape.font.size || "0"));
- values.size = new InterpolUnit(start, end, prop.units);
- }
- this.curve = new InterpolObject(values, font);
- });
- Hub.connect(anim, "onAnimate", shape, "setFont");
- return anim;
- };
- fxg.animateTransform = function(/*Object*/ args){
-
-
-
-
-
-
-
-
-
-
-
- if(!args.easing){ args.easing = fx._defaultEasing; }
- var anim = new fx.Animation(args), shape = args.shape, original;
- Hub.connect(anim, "beforeBegin", anim, function(){
- original = shape.getTransform();
- this.curve = new InterpolTransform(args.transform, original);
- });
- Hub.connect(anim, "onAnimate", shape, "setTransform");
- return anim;
- };
-
- return fxg;
- });
- },
- 'dojox/charting/action2d/PlotAction':function(){
- define("dojox/charting/action2d/PlotAction", ["dojo/_base/connect", "dojo/_base/declare", "./Base", "dojo/fx/easing", "dojox/lang/functional",
- "dojox/lang/functional/object"],
- function(hub, declare, Base, dfe, df, dlfo){
-
-
- var DEFAULT_DURATION = 400,
- DEFAULT_EASING = dfe.backOut;
- return declare("dojox.charting.action2d.PlotAction", Base, {
-
-
- overOutEvents: {onmouseover: 1, onmouseout: 1},
- constructor: function(chart, plot, kwargs){
-
-
-
-
-
-
-
-
- this.anim = {};
-
- if(!kwargs){ kwargs = {}; }
- this.duration = kwargs.duration ? kwargs.duration : DEFAULT_DURATION;
- this.easing = kwargs.easing ? kwargs.easing : DEFAULT_EASING;
- },
- connect: function(){
-
-
- this.handle = this.chart.connectToPlot(this.plot.name, this, "process");
- },
- disconnect: function(){
-
-
- if(this.handle){
- hub.disconnect(this.handle);
- this.handle = null;
- }
- },
- reset: function(){
-
-
- },
- destroy: function(){
-
-
- this.inherited(arguments);
- df.forIn(this.anim, function(o){
- df.forIn(o, function(anim){
- anim.action.stop(true);
- });
- });
- this.anim = {};
- }
- });
- });
- },
- 'dijit/BackgroundIframe':function(){
- define("dijit/BackgroundIframe", [
- "require",
- ".",
- "dojo/_base/config",
- "dojo/dom-construct",
- "dojo/dom-style",
- "dojo/_base/lang",
- "dojo/on",
- "dojo/_base/sniff",
- "dojo/_base/window"
- ], function(require, dijit, config, domConstruct, domStyle, lang, on, has, win){
-
-
-
-
-
-
-
- has.add("bgIframe", has("ie") || has("mozilla"));
-
-
-
-
-
-
- var _frames = new function(){
-
-
- var queue = [];
- this.pop = function(){
- var iframe;
- if(queue.length){
- iframe = queue.pop();
- iframe.style.display="";
- }else{
- if(has("ie") < 9){
- var burl = config["dojoBlankHtmlUrl"] || require.toUrl("dojo/resources/blank.html") || "javascript:\"\"";
- var html="<iframe src='" + burl + "' role='presentation'"
- + " style='position: absolute; left: 0px; top: 0px;"
- + "z-index: -1; filter:Alpha(Opacity=\"0\");'>";
- iframe = win.doc.createElement(html);
- }else{
- iframe = domConstruct.create("iframe");
- iframe.src = 'javascript:""';
- iframe.className = "dijitBackgroundIframe";
- iframe.setAttribute("role", "presentation");
- domStyle.set(iframe, "opacity", 0.1);
- }
- iframe.tabIndex = -1;
- }
- return iframe;
- };
- this.push = function(iframe){
- iframe.style.display="none";
- queue.push(iframe);
- }
- }();
- dijit.BackgroundIframe = function(/*DomNode*/ node){
-
-
-
-
-
-
-
- if(!node.id){ throw new Error("no id"); }
- if(has("bgIframe")){
- var iframe = (this.iframe = _frames.pop());
- node.appendChild(iframe);
- if(has("ie")<7 || has("quirks")){
- this.resize(node);
- this._conn = on(node, 'resize', lang.hitch(this, function(){
- this.resize(node);
- }));
- }else{
- domStyle.set(iframe, {
- width: '100%',
- height: '100%'
- });
- }
- }
- };
- lang.extend(dijit.BackgroundIframe, {
- resize: function(node){
-
-
-
- if(this.iframe){
- domStyle.set(this.iframe, {
- width: node.offsetWidth + 'px',
- height: node.offsetHeight + 'px'
- });
- }
- },
- destroy: function(){
-
-
- if(this._conn){
- this._conn.remove();
- this._conn = null;
- }
- if(this.iframe){
- _frames.push(this.iframe);
- delete this.iframe;
- }
- }
- });
- return dijit.BackgroundIframe;
- });
- },
- 'dojox/main':function(){
- define("dojox/main", ["dojo/_base/kernel"], function(dojo) {
-
-
-
-
- return dojo.dojox;
- });
- },
- 'dojox/charting/action2d/Magnify':function(){
- define("dojox/charting/action2d/Magnify", ["dojo/_base/connect", "dojo/_base/declare",
- "./PlotAction", "dojox/gfx/matrix",
- "dojox/gfx/fx", "dojo/fx", "dojo/fx/easing"],
- function(Hub, declare, PlotAction, m, gf, df, dfe){
-
-
- var DEFAULT_SCALE = 2;
- return declare("dojox.charting.action2d.Magnify", PlotAction, {
-
-
-
- defaultParams: {
- duration: 400,
- easing: dfe.backOut,
- scale: DEFAULT_SCALE
- },
- optionalParams: {},
- constructor: function(chart, plot, kwArgs){
-
-
-
-
-
-
-
-
-
- this.scale = kwArgs && typeof kwArgs.scale == "number" ? kwArgs.scale : DEFAULT_SCALE;
- this.connect();
- },
- process: function(o){
-
-
-
-
- if(!o.shape || !(o.type in this.overOutEvents) ||
- !("cx" in o) || !("cy" in o)){ return; }
- var runName = o.run.name, index = o.index, vector = [], anim, init, scale;
- if(runName in this.anim){
- anim = this.anim[runName][index];
- }else{
- this.anim[runName] = {};
- }
- if(anim){
- anim.action.stop(true);
- }else{
- this.anim[runName][index] = anim = {};
- }
- if(o.type == "onmouseover"){
- init = m.identity;
- scale = this.scale;
- }else{
- init = m.scaleAt(this.scale, o.cx, o.cy);
- scale = 1 / this.scale;
- }
- var kwArgs = {
- shape: o.shape,
- duration: this.duration,
- easing: this.easing,
- transform: [
- {name: "scaleAt", start: [1, o.cx, o.cy], end: [scale, o.cx, o.cy]},
- init
- ]
- };
- if(o.shape){
- vector.push(gf.animateTransform(kwArgs));
- }
- if(o.oultine){
- kwArgs.shape = o.outline;
- vector.push(gf.animateTransform(kwArgs));
- }
- if(o.shadow){
- kwArgs.shape = o.shadow;
- vector.push(gf.animateTransform(kwArgs));
- }
- if(!vector.length){
- delete this.anim[runName][index];
- return;
- }
- anim.action = df.combine(vector);
- if(o.type == "onmouseout"){
- Hub.connect(anim.action, "onEnd", this, function(){
- if(this.anim[runName]){
- delete this.anim[runName][index];
- }
- });
- }
- anim.action.play();
- }
- });
-
- });
- },
- 'dojo/Stateful':function(){
- define(["./_base/declare", "./_base/lang", "./_base/array"], function(declare, lang, array) {
-
-
-
-
- return declare("dojo.Stateful", null, {
-
-
-
-
-
-
-
-
-
- postscript: function(mixin){
- if(mixin){
- lang.mixin(this, mixin);
- }
- },
- get: function(/*String*/name){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- return this[name];
- },
- set: function(/*String*/name, /*Object*/value){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if(typeof name === "object"){
- for(var x in name){
- if(name.hasOwnProperty(x) && x !="_watchCallbacks"){
- this.set(x, name[x]);
- }
- }
- return this;
- }
- var oldValue = this[name];
- this[name] = value;
- if(this._watchCallbacks){
- this._watchCallbacks(name, oldValue, value);
- }
- return this;
- },
- watch: function(/*String?*/name, /*Function*/callback){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var callbacks = this._watchCallbacks;
- if(!callbacks){
- var self = this;
- callbacks = this._watchCallbacks = function(name, oldValue, value, ignoreCatchall){
- var notify = function(propertyCallbacks){
- if(propertyCallbacks){
- propertyCallbacks = propertyCallbacks.slice();
- for(var i = 0, l = propertyCallbacks.length; i < l; i++){
- propertyCallbacks[i].call(self, name, oldValue, value);
- }
- }
- };
- notify(callbacks['_' + name]);
- if(!ignoreCatchall){
- notify(callbacks["*"]);
- }
- };
- }
- if(!callback && typeof name === "function"){
- callback = name;
- name = "*";
- }else{
-
- name = '_' + name;
- }
- var propertyCallbacks = callbacks[name];
- if(typeof propertyCallbacks !== "object"){
- propertyCallbacks = callbacks[name] = [];
- }
- propertyCallbacks.push(callback);
- return {
- unwatch: function(){
- propertyCallbacks.splice(array.indexOf(propertyCallbacks, callback), 1);
- }
- };
- }
- });
- });
- },
- 'dojox/charting/plot2d/Markers':function(){
- define("dojox/charting/plot2d/Markers", ["dojo/_base/declare", "./Default"], function(declare, Default){
- return declare("dojox.charting.plot2d.Markers", Default, {
-
-
- constructor: function(){
-
-
- this.opt.markers = true;
- }
- });
- });
- },
- 'dojox/charting/plot2d/Bubble':function(){
- define("dojox/charting/plot2d/Bubble", ["dojo/_base/lang", "dojo/_base/declare", "dojo/_base/array",
- "./Base", "./common", "dojox/lang/functional", "dojox/lang/functional/reversed",
- "dojox/lang/utils", "dojox/gfx/fx"],
- function(lang, declare, arr, Base, dc, df, dfr, du, fx){
- var purgeGroup = dfr.lambda("item.purgeGroup()");
- return declare("dojox.charting.plot2d.Bubble", Base, {
-
-
-
- defaultParams: {
- hAxis: "x",
- vAxis: "y",
- animate: null
- },
- optionalParams: {
-
- stroke: {},
- outline: {},
- shadow: {},
- fill: {},
- font: "",
- fontColor: ""
- },
- constructor: function(chart, kwArgs){
-
-
-
-
-
-
- this.opt = lang.clone(this.defaultParams);
- du.updateWithObject(this.opt, kwArgs);
- du.updateWithPattern(this.opt, kwArgs, this.optionalParams);
- this.series = [];
- this.hAxis = this.opt.hAxis;
- this.vAxis = this.opt.vAxis;
- this.animate = this.opt.animate;
- },
-
- render: function(dim, offsets){
-
-
-
-
-
-
-
-
- if(this.zoom && !this.isDataDirty()){
- return this.performZoom(dim, offsets);
- }
- this.resetEvents();
- this.dirty = this.isDirty();
- if(this.dirty){
- arr.forEach(this.series, purgeGroup);
- this._eventSeries = {};
- this.cleanGroup();
- var s = this.group;
- df.forEachRev(this.series, function(item){ item.cleanGroup(s); });
- }
- var t = this.chart.theme,
- ht = this._hScaler.scaler.getTransformerFromModel(this._hScaler),
- vt = this._vScaler.scaler.getTransformerFromModel(this._vScaler),
- events = this.events();
- for(var i = this.series.length - 1; i >= 0; --i){
- var run = this.series[i];
- if(!this.dirty && !run.dirty){
- t.skip();
- this._reconnectEvents(run.name);
- continue;
- }
- run.cleanGroup();
- if(!run.data.length){
- run.dirty = false;
- t.skip();
- continue;
- }
- if(typeof run.data[0] == "number"){
- console.warn("dojox.charting.plot2d.Bubble: the data in the following series cannot be rendered as a bubble chart; ", run);
- continue;
- }
- var theme = t.next("circle", [this.opt, run]), s = run.group,
- points = arr.map(run.data, function(v, i){
- return v ? {
- x: ht(v.x) + offsets.l,
- y: dim.height - offsets.b - vt(v.y),
- radius: this._vScaler.bounds.scale * (v.size / 2)
- } : null;
- }, this);
- var frontCircles = null, outlineCircles = null, shadowCircles = null;
-
- if(theme.series.shadow){
- shadowCircles = arr.map(points, function(item){
- if(item !== null){
- var finalTheme = t.addMixin(theme, "circle", item, true),
- shadow = finalTheme.series.shadow;
- var shape = s.createCircle({
- cx: item.x + shadow.dx, cy: item.y + shadow.dy, r: item.radius
- }).setStroke(shadow).setFill(shadow.color);
- if(this.animate){
- this._animateBubble(shape, dim.height - offsets.b, item.radius);
- }
- return shape;
- }
- return null;
- }, this);
- if(shadowCircles.length){
- run.dyn.shadow = shadowCircles[shadowCircles.length - 1].getStroke();
- }
- }
-
- if(theme.series.outline){
- outlineCircles = arr.map(points, function(item){
- if(item !== null){
- var finalTheme = t.addMixin(theme, "circle", item, true),
- outline = dc.makeStroke(finalTheme.series.outline);
- outline.width = 2 * outline.width + theme.series.stroke.width;
- var shape = s.createCircle({
- cx: item.x, cy: item.y, r: item.radius
- }).setStroke(outline);
- if(this.animate){
- this._animateBubble(shape, dim.height - offsets.b, item.radius);
- }
- return shape;
- }
- return null;
- }, this);
- if(outlineCircles.length){
- run.dyn.outline = outlineCircles[outlineCircles.length - 1].getStroke();
- }
- }
-
- frontCircles = arr.map(points, function(item){
- if(item !== null){
- var finalTheme = t.addMixin(theme, "circle", item, true),
- rect = {
- x: item.x - item.radius,
- y: item.y - item.radius,
- width: 2 * item.radius,
- height: 2 * item.radius
- };
- var specialFill = this._plotFill(finalTheme.series.fill, dim, offsets);
- specialFill = this._shapeFill(specialFill, rect);
- var shape = s.createCircle({
- cx: item.x, cy: item.y, r: item.radius
- }).setFill(specialFill).setStroke(finalTheme.series.stroke);
- if(this.animate){
- this._animateBubble(shape, dim.height - offsets.b, item.radius);
- }
- return shape;
- }
- return null;
- }, this);
- if(frontCircles.length){
- run.dyn.fill = frontCircles[frontCircles.length - 1].getFill();
- run.dyn.stroke = frontCircles[frontCircles.length - 1].getStroke();
- }
- if(events){
- var eventSeries = new Array(frontCircles.length);
- arr.forEach(frontCircles, function(s, i){
- if(s !== null){
- var o = {
- element: "circle",
- index: i,
- run: run,
- shape: s,
- outline: outlineCircles && outlineCircles[i] || null,
- shadow: shadowCircles && shadowCircles[i] || null,
- x: run.data[i].x,
- y: run.data[i].y,
- r: run.data[i].size / 2,
- cx: points[i].x,
- cy: points[i].y,
- cr: points[i].radius
- };
- this._connectEvents(o);
- eventSeries[i] = o;
- }
- }, this);
- this._eventSeries[run.name] = eventSeries;
- }else{
- delete this._eventSeries[run.name];
- }
- run.dirty = false;
- }
- this.dirty = false;
- return this;
- },
- _animateBubble: function(shape, offset, size){
- fx.animateTransform(lang.delegate({
- shape: shape,
- duration: 1200,
- transform: [
- {name: "translate", start: [0, offset], end: [0, 0]},
- {name: "scale", start: [0, 1/size], end: [1, 1]},
- {name: "original"}
- ]
- }, this.animate)).play();
- }
- });
- });
- },
- 'dojo/touch':function(){
- define(["./_base/kernel", "./aspect", "./dom", "./on", "./has", "./mouse", "./domReady", "./_base/window"],
- function(dojo, aspect, dom, on, has, mouse, domReady, win){
-
-
- var hasTouch = has("touch");
-
- var ios4 = false;
- if(has("ios")){
- var ua = navigator.userAgent;
- var v = ua.match(/OS ([\d_]+)/) ? RegExp.$1 : "1";
- var os = parseFloat(v.replace(/_/, '.').replace(/_/g, ''));
- ios4 = os < 5;
- }
-
- var lastTouch;
- function dualEvent(mouseType, touchType){
-
-
- if(hasTouch){
- return function(node, listener){
- var handle1 = on(node, touchType, listener),
- handle2 = on(node, mouseType, function(evt){
- if(!lastTouch || (new Date()).getTime() > lastTouch + 1000){
- listener.call(this, evt);
- }
- });
- return {
- remove: function(){
- handle1.remove();
- handle2.remove();
- }
- };
- };
- }else{
-
- return function(node, listener){
- return on(node, mouseType, listener);
- }
- }
- }
- var touchmove, hoveredNode;
- if(hasTouch){
- domReady(function(){
-
- hoveredNode = win.body();
- win.doc.addEventListener("touchstart", function(evt){
- lastTouch = (new Date()).getTime();
-
-
-
- var oldNode = hoveredNode;
- hoveredNode = evt.target;
- on.emit(oldNode, "dojotouchout", {
- target: oldNode,
- relatedTarget: hoveredNode,
- bubbles: true
- });
- on.emit(hoveredNode, "dojotouchover", {
- target: hoveredNode,
- relatedTarget: oldNode,
- bubbles: true
- });
- }, true);
-
- on(win.doc, "touchmove", function(evt){
- lastTouch = (new Date()).getTime();
- var newNode = win.doc.elementFromPoint(
- evt.pageX - (ios4 ? 0 : win.global.pageXOffset),
- evt.pageY - (ios4 ? 0 : win.global.pageYOffset)
- );
- if(newNode && hoveredNode !== newNode){
-
- on.emit(hoveredNode, "dojotouchout", {
- target: hoveredNode,
- relatedTarget: newNode,
- bubbles: true
- });
-
- on.emit(newNode, "dojotouchover", {
- target: newNode,
- relatedTarget: hoveredNode,
- bubbles: true
- });
- hoveredNode = newNode;
- }
- });
- });
-
-
- touchmove = function(node, listener){
- return on(win.doc, "touchmove", function(evt){
- if(node === win.doc || dom.isDescendant(hoveredNode, node)){
- evt.target = hoveredNode;
- listener.call(this, evt);
- }
- });
- };
- }
-
- var touch = {
- press: dualEvent("mousedown", "touchstart"),
- move: dualEvent("mousemove", touchmove),
- release: dualEvent("mouseup", "touchend"),
- cancel: dualEvent(mouse.leave, "touchcancel"),
- over: dualEvent("mouseover", "dojotouchover"),
- out: dualEvent("mouseout", "dojotouchout"),
- enter: mouse._eventHandler(dualEvent("mouseover","dojotouchover")),
- leave: mouse._eventHandler(dualEvent("mouseout", "dojotouchout"))
- };
-
- 1 && (dojo.touch = touch);
- return touch;
- });
- },
- 'dojox/gfx/gradutils':function(){
- define("dojox/gfx/gradutils", ["./_base", "dojo/_base/lang", "./matrix", "dojo/_base/Color"],
- function(g, lang, m, Color){
-
-
- var gradutils = g.gradutils = {};
-
- function findColor(o, c){
- if(o <= 0){
- return c[0].color;
- }
- var len = c.length;
- if(o >= 1){
- return c[len - 1].color;
- }
-
- for(var i = 0; i < len; ++i){
- var stop = c[i];
- if(stop.offset >= o){
- if(i){
- var prev = c[i - 1];
- return Color.blendColors(new Color(prev.color), new Color(stop.color),
- (o - prev.offset) / (stop.offset - prev.offset));
- }
- return stop.color;
- }
- }
- return c[len - 1].color;
- }
- gradutils.getColor = function(fill, pt){
-
-
-
-
-
-
- var o;
- if(fill){
- switch(fill.type){
- case "linear":
- var angle = Math.atan2(fill.y2 - fill.y1, fill.x2 - fill.x1),
- rotation = m.rotate(-angle),
- projection = m.project(fill.x2 - fill.x1, fill.y2 - fill.y1),
- p = m.multiplyPoint(projection, pt),
- pf1 = m.multiplyPoint(projection, fill.x1, fill.y1),
- pf2 = m.multiplyPoint(projection, fill.x2, fill.y2),
- scale = m.multiplyPoint(rotation, pf2.x - pf1.x, pf2.y - pf1.y).x;
- o = m.multiplyPoint(rotation, p.x - pf1.x, p.y - pf1.y).x / scale;
- break;
- case "radial":
- var dx = pt.x - fill.cx, dy = pt.y - fill.cy;
- o = Math.sqrt(dx * dx + dy * dy) / fill.r;
- break;
- }
- return findColor(o, fill.colors);
- }
-
- return new Color(fill || [0, 0, 0, 0]);
- };
- gradutils.reverse = function(fill){
-
-
-
-
- if(fill){
- switch(fill.type){
- case "linear":
- case "radial":
- fill = lang.delegate(fill);
- if(fill.colors){
- var c = fill.colors, l = c.length, i = 0, stop,
- n = fill.colors = new Array(c.length);
- for(; i < l; ++i){
- stop = c[i];
- n[i] = {
- offset: 1 - stop.offset,
- color: stop.color
- };
- }
- n.sort(function(a, b){ return a.offset - b.offset; });
- }
- break;
- }
- }
- return fill;
- };
- return gradutils;
- });
- },
- 'dojo/string':function(){
- define(["./_base/kernel", "./_base/lang"], function(dojo, lang) {
-
-
-
-
- lang.getObject("string", true, dojo);
- dojo.string.rep = function(/*String*/str, /*Integer*/num){
-
-
-
-
-
-
- if(num <= 0 || !str){ return ""; }
- var buf = [];
- for(;;){
- if(num & 1){
- buf.push(str);
- }
- if(!(num >>= 1)){ break; }
- str += str;
- }
- return buf.join("");
- };
- dojo.string.pad = function(/*String*/text, /*Integer*/size, /*String?*/ch, /*Boolean?*/end){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if(!ch){
- ch = '0';
- }
- var out = String(text),
- pad = dojo.string.rep(ch, Math.ceil((size - out.length) / ch.length));
- return end ? out + pad : pad + out;
- };
- dojo.string.substitute = function( /*String*/ template,
- /*Object|Array*/map,
- /*Function?*/ transform,
- /*Object?*/ thisObject){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- thisObject = thisObject || dojo.global;
- transform = transform ?
- lang.hitch(thisObject, transform) : function(v){ return v; };
- return template.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,
- function(match, key, format){
- var value = lang.getObject(key, false, map);
- if(format){
- value = lang.getObject(format, false, thisObject).call(thisObject, value, key);
- }
- return transform(value, key).toString();
- });
- };
- dojo.string.trim = String.prototype.trim ?
- lang.trim :
- function(str){
- str = str.replace(/^\s+/, '');
- for(var i = str.length - 1; i >= 0; i--){
- if(/\S/.test(str.charAt(i))){
- str = str.substring(0, i + 1);
- break;
- }
- }
- return str;
- };
- return dojo.string;
- });
- },
- 'dijit/registry':function(){
- define("dijit/registry", [
- "dojo/_base/array",
- "dojo/_base/sniff",
- "dojo/_base/unload",
- "dojo/_base/window",
- "."
- ], function(array, has, unload, win, dijit){
-
-
-
-
-
-
- var _widgetTypeCtr = {}, hash = {};
- var registry = {
-
-
- length: 0,
- add: function(/*dijit._Widget*/ widget){
-
-
-
-
-
- if(hash[widget.id]){
- throw new Error("Tried to register widget with id==" + widget.id + " but that id is already registered");
- }
- hash[widget.id] = widget;
- this.length++;
- },
- remove: function(/*String*/ id){
-
-
-
- if(hash[id]){
- delete hash[id];
- this.length--;
- }
- },
- byId: function(/*String|Widget*/ id){
-
-
-
- return typeof id == "string" ? hash[id] : id;
- },
- byNode: function(/*DOMNode*/ node){
-
-
- return hash[node.getAttribute("widgetId")];
- },
- toArray: function(){
-
-
-
-
-
-
- var ar = [];
- for(var id in hash){
- ar.push(hash[id]);
- }
- return ar;
- },
- getUniqueId: function(/*String*/widgetType){
-
-
- var id;
- do{
- id = widgetType + "_" +
- (widgetType in _widgetTypeCtr ?
- ++_widgetTypeCtr[widgetType] : _widgetTypeCtr[widgetType] = 0);
- }while(hash[id]);
- return dijit._scopeName == "dijit" ? id : dijit._scopeName + "_" + id;
- },
- findWidgets: function(/*DomNode*/ root){
-
-
-
- var outAry = [];
- function getChildrenHelper(root){
- for(var node = root.firstChild; node; node = node.nextSibling){
- if(node.nodeType == 1){
- var widgetId = node.getAttribute("widgetId");
- if(widgetId){
- var widget = hash[widgetId];
- if(widget){
- outAry.push(widget);
- }
- }else{
- getChildrenHelper(node);
- }
- }
- }
- }
- getChildrenHelper(root);
- return outAry;
- },
- _destroyAll: function(){
-
-
-
- dijit._curFocus = null;
- dijit._prevFocus = null;
- dijit._activeStack = [];
-
- array.forEach(registry.findWidgets(win.body()), function(widget){
-
-
- if(!widget._destroyed){
- if(widget.destroyRecursive){
- widget.destroyRecursive();
- }else if(widget.destroy){
- widget.destroy();
- }
- }
- });
- },
- getEnclosingWidget: function(/*DOMNode*/ node){
-
-
-
- while(node){
- var id = node.getAttribute && node.getAttribute("widgetId");
- if(id){
- return hash[id];
- }
- node = node.parentNode;
- }
- return null;
- },
-
-
- _hash: hash
- };
-
- dijit.registry = registry;
- return registry;
- });
- },
- 'dojox/charting/plot2d/Lines':function(){
- define("dojox/charting/plot2d/Lines", ["dojo/_base/declare", "./Default"], function(declare, Default){
- return declare("dojox.charting.plot2d.Lines", Default, {
-
-
- constructor: function(){
-
-
- this.opt.lines = true;
- }
- });
- });
- },
- 'dijit/_base/manager':function(){
- define("dijit/_base/manager", [
- "dojo/_base/array",
- "dojo/_base/config",
- "../registry",
- ".."
- ], function(array, config, registry, dijit){
-
-
-
-
-
-
- array.forEach(["byId", "getUniqueId", "findWidgets", "_destroyAll", "byNode", "getEnclosingWidget"], function(name){
- dijit[name] = registry[name];
- });
-
- dijit.defaultDuration = config["defaultDuration"] || 200;
- return dijit;
- });
- },
- 'dojox/charting/plot2d/StackedAreas':function(){
- define("dojox/charting/plot2d/StackedAreas", ["dojo/_base/declare", "./Stacked"], function(declare, Stacked){
- return declare("dojox.charting.plot2d.StackedAreas", Stacked, {
-
-
- constructor: function(){
-
-
- this.opt.lines = true;
- this.opt.areas = true;
- }
- });
- });
- },
- 'dojox/charting/plot2d/Stacked':function(){
- define(["dojo/_base/lang", "dojo/_base/declare", "dojo/_base/array", "./Default", "./common",
- "dojox/lang/functional", "dojox/lang/functional/reversed", "dojox/lang/functional/sequence"],
- function(lang, declare, arr, Default, dc, df, dfr, dfs){
- var purgeGroup = dfr.lambda("item.purgeGroup()");
- return declare("dojox.charting.plot2d.Stacked", Default, {
-
-
-
-
- getSeriesStats: function(){
-
-
-
-
- var stats = dc.collectStackedStats(this.series);
- this._maxRunLength = stats.hmax;
- return stats;
- },
- render: function(dim, offsets){
-
-
-
-
-
-
-
-
- if(this._maxRunLength <= 0){
- return this;
- }
-
- var acc = df.repeat(this._maxRunLength, "-> 0", 0);
- for(var i = 0; i < this.series.length; ++i){
- var run = this.series[i];
- for(var j = 0; j < run.data.length; ++j){
- var v = run.data[j];
- if(v !== null){
- if(isNaN(v)){ v = 0; }
- acc[j] += v;
- }
- }
- }
-
- if(this.zoom && !this.isDataDirty()){
- return this.performZoom(dim, offsets);
- }
- this.resetEvents();
- this.dirty = this.isDirty();
- if(this.dirty){
- arr.forEach(this.series, purgeGroup);
- this._eventSeries = {};
- this.cleanGroup();
- var s = this.group;
- df.forEachRev(this.series, function(item){ item.cleanGroup(s); });
- }
- var t = this.chart.theme, events = this.events(),
- ht = this._hScaler.scaler.getTransformerFromModel(this._hScaler),
- vt = this._vScaler.scaler.getTransformerFromModel(this._vScaler);
- for(var i = this.series.length - 1; i >= 0; --i){
- var run = this.series[i];
- if(!this.dirty && !run.dirty){
- t.skip();
- this._reconnectEvents(run.name);
- continue;
- }
- run.cleanGroup();
- var theme = t.next(this.opt.areas ? "area" : "line", [this.opt, run], true),
- s = run.group, outline,
- lpoly = arr.map(acc, function(v, i){
- return {
- x: ht(i + 1) + offsets.l,
- y: dim.height - offsets.b - vt(v)
- };
- }, this);
- var lpath = this.opt.tension ? dc.curve(lpoly, this.opt.tension) : "";
- if(this.opt.areas){
- var apoly = lang.clone(lpoly);
- if(this.opt.tension){
- var p=dc.curve(apoly, this.opt.tension);
- p += " L" + lpoly[lpoly.length - 1].x + "," + (dim.height - offsets.b) +
- " L" + lpoly[0].x + "," + (dim.height - offsets.b) +
- " L" + lpoly[0].x + "," + lpoly[0].y;
- run.dyn.fill = s.createPath(p).setFill(theme.series.fill).getFill();
- } else {
- apoly.push({x: lpoly[lpoly.length - 1].x, y: dim.height - offsets.b});
- apoly.push({x: lpoly[0].x, y: dim.height - offsets.b});
- apoly.push(lpoly[0]);
- run.dyn.fill = s.createPolyline(apoly).setFill(theme.series.fill).getFill();
- }
- }
- if(this.opt.lines || this.opt.markers){
- if(theme.series.outline){
- outline = dc.makeStroke(theme.series.outline);
- outline.width = 2 * outline.width + theme.series.stroke.width;
- }
- }
- if(this.opt.markers){
- run.dyn.marker = theme.symbol;
- }
- var frontMarkers, outlineMarkers, shadowMarkers;
- if(theme.series.shadow && theme.series.stroke){
- var shadow = theme.series.shadow,
- spoly = arr.map(lpoly, function(c){
- return {x: c.x + shadow.dx, y: c.y + shadow.dy};
- });
- if(this.opt.lines){
- if(this.opt.tension){
- run.dyn.shadow = s.createPath(dc.curve(spoly, this.opt.tension)).setStroke(shadow).getStroke();
- } else {
- run.dyn.shadow = s.createPolyline(spoly).setStroke(shadow).getStroke();
- }
- }
- if(this.opt.markers){
- shadow = theme.marker.shadow;
- shadowMarkers = arr.map(spoly, function(c){
- return s.createPath("M" + c.x + " " + c.y + " " + theme.symbol).
- setStroke(shadow).setFill(shadow.color);
- }, this);
- }
- }
- if(this.opt.lines){
- if(outline){
- if(this.opt.tension){
- run.dyn.outline = s.createPath(lpath).setStroke(outline).getStroke();
- } else {
- run.dyn.outline = s.createPolyline(lpoly).setStroke(outline).getStroke();
- }
- }
- if(this.opt.tension){
- run.dyn.stroke = s.createPath(lpath).setStroke(theme.series.stroke).getStroke();
- } else {
- run.dyn.stroke = s.createPolyline(lpoly).setStroke(theme.series.stroke).getStroke();
- }
- }
- if(this.opt.markers){
- frontMarkers = new Array(lpoly.length);
- outlineMarkers = new Array(lpoly.length);
- outline = null;
- if(theme.marker.outline){
- outline = dc.makeStroke(theme.marker.outline);
- outline.width = 2 * outline.width + (theme.marker.stroke ? theme.marker.stroke.width : 0);
- }
- arr.forEach(lpoly, function(c, i){
- var path = "M" + c.x + " " + c.y + " " + theme.symbol;
- if(outline){
- outlineMarkers[i] = s.createPath(path).setStroke(outline);
- }
- frontMarkers[i] = s.createPath(path).setStroke(theme.marker.stroke).setFill(theme.marker.fill);
- }, this);
- if(events){
- var eventSeries = new Array(frontMarkers.length);
- arr.forEach(frontMarkers, function(s, i){
- var o = {
- element: "marker",
- index: i,
- run: run,
- shape: s,
- outline: outlineMarkers[i] || null,
- shadow: shadowMarkers && shadowMarkers[i] || null,
- cx: lpoly[i].x,
- cy: lpoly[i].y,
- x: i + 1,
- y: run.data[i]
- };
- this._connectEvents(o);
- eventSeries[i] = o;
- }, this);
- this._eventSeries[run.name] = eventSeries;
- }else{
- delete this._eventSeries[run.name];
- }
- }
- run.dirty = false;
-
- for(var j = 0; j < run.data.length; ++j){
- var v = run.data[j];
- if(v !== null){
- if(isNaN(v)){ v = 0; }
- acc[j] -= v;
- }
- }
- }
- this.dirty = false;
- return this;
- }
- });
- });
- },
- 'dojo/fx/easing':function(){
- define(["../_base/lang"], function(lang) {
- var easingFuncs = {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- linear: function(/* Decimal? */n){
-
- return n;
- },
- quadIn: function(/* Decimal? */n){
- return Math.pow(n, 2);
- },
- quadOut: function(/* Decimal? */n){
- return n * (n - 2) * -1;
- },
- quadInOut: function(/* Decimal? */n){
- n = n * 2;
- if(n < 1){ return Math.pow(n, 2) / 2; }
- return -1 * ((--n) * (n - 2) - 1) / 2;
- },
- cubicIn: function(/* Decimal? */n){
- return Math.pow(n, 3);
- },
- cubicOut: function(/* Decimal? */n){
- return Math.pow(n - 1, 3) + 1;
- },
- cubicInOut: function(/* Decimal? */n){
- n = n * 2;
- if(n < 1){ return Math.pow(n, 3) / 2; }
- n -= 2;
- return (Math.pow(n, 3) + 2) / 2;
- },
- quartIn: function(/* Decimal? */n){
- return Math.pow(n, 4);
- },
- quartOut: function(/* Decimal? */n){
- return -1 * (Math.pow(n - 1, 4) - 1);
- },
- quartInOut: function(/* Decimal? */n){
- n = n * 2;
- if(n < 1){ return Math.pow(n, 4) / 2; }
- n -= 2;
- return -1 / 2 * (Math.pow(n, 4) - 2);
- },
- quintIn: function(/* Decimal? */n){
- return Math.pow(n, 5);
- },
- quintOut: function(/* Decimal? */n){
- return Math.pow(n - 1, 5) + 1;
- },
- quintInOut: function(/* Decimal? */n){
- n = n * 2;
- if(n < 1){ return Math.pow(n, 5) / 2; }
- n -= 2;
- return (Math.pow(n, 5) + 2) / 2;
- },
- sineIn: function(/* Decimal? */n){
- return -1 * Math.cos(n * (Math.PI / 2)) + 1;
- },
- sineOut: function(/* Decimal? */n){
- return Math.sin(n * (Math.PI / 2));
- },
- sineInOut: function(/* Decimal? */n){
- return -1 * (Math.cos(Math.PI * n) - 1) / 2;
- },
- expoIn: function(/* Decimal? */n){
- return (n == 0) ? 0 : Math.pow(2, 10 * (n - 1));
- },
- expoOut: function(/* Decimal? */n){
- return (n == 1) ? 1 : (-1 * Math.pow(2, -10 * n) + 1);
- },
- expoInOut: function(/* Decimal? */n){
- if(n == 0){ return 0; }
- if(n == 1){ return 1; }
- n = n * 2;
- if(n < 1){ return Math.pow(2, 10 * (n - 1)) / 2; }
- --n;
- return (-1 * Math.pow(2, -10 * n) + 2) / 2;
- },
- circIn: function(/* Decimal? */n){
- return -1 * (Math.sqrt(1 - Math.pow(n, 2)) - 1);
- },
- circOut: function(/* Decimal? */n){
- n = n - 1;
- return Math.sqrt(1 - Math.pow(n, 2));
- },
- circInOut: function(/* Decimal? */n){
- n = n * 2;
- if(n < 1){ return -1 / 2 * (Math.sqrt(1 - Math.pow(n, 2)) - 1); }
- n -= 2;
- return 1 / 2 * (Math.sqrt(1 - Math.pow(n, 2)) + 1);
- },
- backIn: function(/* Decimal? */n){
-
-
-
-
-
-
- var s = 1.70158;
- return Math.pow(n, 2) * ((s + 1) * n - s);
- },
- backOut: function(/* Decimal? */n){
-
-
-
-
-
-
-
-
- n = n - 1;
- var s = 1.70158;
- return Math.pow(n, 2) * ((s + 1) * n + s) + 1;
- },
- backInOut: function(/* Decimal? */n){
-
-
-
-
-
-
-
- var s = 1.70158 * 1.525;
- n = n * 2;
- if(n < 1){ return (Math.pow(n, 2) * ((s + 1) * n - s)) / 2; }
- n-=2;
- return (Math.pow(n, 2) * ((s + 1) * n + s) + 2) / 2;
- },
- elasticIn: function(/* Decimal? */n){
-
-
-
-
-
-
-
-
- if(n == 0 || n == 1){ return n; }
- var p = .3;
- var s = p / 4;
- n = n - 1;
- return -1 * Math.pow(2, 10 * n) * Math.sin((n - s) * (2 * Math.PI) / p);
- },
- elasticOut: function(/* Decimal? */n){
-
-
-
-
-
-
-
-
-
-
- if(n==0 || n == 1){ return n; }
- var p = .3;
- var s = p / 4;
- return Math.pow(2, -10 * n) * Math.sin((n - s) * (2 * Math.PI) / p) + 1;
- },
- elasticInOut: function(/* Decimal? */n){
-
-
-
-
-
-
-
-
-
-
- if(n == 0) return 0;
- n = n * 2;
- if(n == 2) return 1;
- var p = .3 * 1.5;
- var s = p / 4;
- if(n < 1){
- n -= 1;
- return -.5 * (Math.pow(2, 10 * n) * Math.sin((n - s) * (2 * Math.PI) / p));
- }
- n -= 1;
- return .5 * (Math.pow(2, -10 * n) * Math.sin((n - s) * (2 * Math.PI) / p)) + 1;
- },
- bounceIn: function(/* Decimal? */n){
-
-
- return (1 - easingFuncs.bounceOut(1 - n));
- },
- bounceOut: function(/* Decimal? */n){
-
-
- var s = 7.5625;
- var p = 2.75;
- var l;
- if(n < (1 / p)){
- l = s * Math.pow(n, 2);
- }else if(n < (2 / p)){
- n -= (1.5 / p);
- l = s * Math.pow(n, 2) + .75;
- }else if(n < (2.5 / p)){
- n -= (2.25 / p);
- l = s * Math.pow(n, 2) + .9375;
- }else{
- n -= (2.625 / p);
- l = s * Math.pow(n, 2) + .984375;
- }
- return l;
- },
- bounceInOut: function(/* Decimal? */n){
-
-
- if(n < 0.5){ return easingFuncs.bounceIn(n * 2) / 2; }
- return (easingFuncs.bounceOut(n * 2 - 1) / 2) + 0.5;
- }
- };
- lang.setObject("dojo.fx.easing", easingFuncs);
- return easingFuncs;
- });
- },
- 'dojox/charting/action2d/Highlight':function(){
- define("dojox/charting/action2d/Highlight", ["dojo/_base/kernel", "dojo/_base/lang", "dojo/_base/declare", "dojo/_base/Color", "dojo/_base/connect", "dojox/color/_base",
- "./PlotAction", "dojo/fx/easing", "dojox/gfx/fx"],
- function(dojo, lang, declare, Color, hub, c, PlotAction, dfe, dgf){
-
-
- var DEFAULT_SATURATION = 100,
- DEFAULT_LUMINOSITY1 = 75,
- DEFAULT_LUMINOSITY2 = 50,
- cc = function(color){
- return function(){ return color; };
- },
- hl = function(color){
- var a = new c.Color(color),
- x = a.toHsl();
- if(x.s == 0){
- x.l = x.l < 50 ? 100 : 0;
- }else{
- x.s = DEFAULT_SATURATION;
- if(x.l < DEFAULT_LUMINOSITY2){
- x.l = DEFAULT_LUMINOSITY1;
- }else if(x.l > DEFAULT_LUMINOSITY1){
- x.l = DEFAULT_LUMINOSITY2;
- }else{
- x.l = x.l - DEFAULT_LUMINOSITY2 > DEFAULT_LUMINOSITY1 - x.l ?
- DEFAULT_LUMINOSITY2 : DEFAULT_LUMINOSITY1;
- }
- }
- return c.fromHsl(x);
- };
- return declare("dojox.charting.action2d.Highlight", PlotAction, {
-
-
-
-
- defaultParams: {
- duration: 400,
- easing: dfe.backOut
- },
- optionalParams: {
- highlight: "red"
-
- },
- constructor: function(chart, plot, kwArgs){
-
-
-
-
-
-
-
-
- var a = kwArgs && kwArgs.highlight;
- this.colorFun = a ? (lang.isFunction(a) ? a : cc(a)) : hl;
- this.connect();
- },
- process: function(o){
-
-
-
-
- if(!o.shape || !(o.type in this.overOutEvents)){ return; }
- var runName = o.run.name, index = o.index, anim, startFill, endFill;
- if(runName in this.anim){
- anim = this.anim[runName][index];
- }else{
- this.anim[runName] = {};
- }
- if(anim){
- anim.action.stop(true);
- }else{
- var color = o.shape.getFill();
- if(!color || !(color instanceof Color)){
- return;
- }
- this.anim[runName][index] = anim = {
- start: color,
- end: this.colorFun(color)
- };
- }
- var start = anim.start, end = anim.end;
- if(o.type == "onmouseout"){
-
- var t = start;
- start = end;
- end = t;
- }
- anim.action = dgf.animateFill({
- shape: o.shape,
- duration: this.duration,
- easing: this.easing,
- color: {start: start, end: end}
- });
- if(o.type == "onmouseout"){
- hub.connect(anim.action, "onEnd", this, function(){
- if(this.anim[runName]){
- delete this.anim[runName][index];
- }
- });
- }
- anim.action.play();
- }
- });
-
- });
- },
- 'dojox/color/Palette':function(){
- define("dojox/color/Palette", ["dojo/_base/kernel", "../main", "dojo/_base/lang", "dojo/_base/array", "./_base"],
- function(dojo, dojox, lang, arr, dxc){
-
-
- dxc.Palette = function(/* String|Array|dojox.color.Color|dojox.color.Palette */base){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- this.colors = [];
- if(base instanceof dxc.Palette){
- this.colors = base.colors.slice(0);
- }
- else if(base instanceof dxc.Color){
- this.colors = [ null, null, base, null, null ];
- }
- else if(lang.isArray(base)){
- this.colors = arr.map(base.slice(0), function(item){
- if(lang.isString(item)){ return new dxc.Color(item); }
- return item;
- });
- }
- else if (lang.isString(base)){
- this.colors = [ null, null, new dxc.Color(base), null, null ];
- }
- }
-
-
- function tRGBA(p, param, val){
- var ret = new dxc.Palette();
- ret.colors = [];
- arr.forEach(p.colors, function(item){
- var r=(param=="dr")?item.r+val:item.r,
- g=(param=="dg")?item.g+val:item.g,
- b=(param=="db")?item.b+val:item.b,
- a=(param=="da")?item.a+val:item.a
- ret.colors.push(new dxc.Color({
- r: Math.min(255, Math.max(0, r)),
- g: Math.min(255, Math.max(0, g)),
- b: Math.min(255, Math.max(0, b)),
- a: Math.min(1, Math.max(0, a))
- }));
- });
- return ret;
- }
- function tCMY(p, param, val){
- var ret = new dxc.Palette();
- ret.colors = [];
- arr.forEach(p.colors, function(item){
- var o=item.toCmy(),
- c=(param=="dc")?o.c+val:o.c,
- m=(param=="dm")?o.m+val:o.m,
- y=(param=="dy")?o.y+val:o.y;
- ret.colors.push(dxc.fromCmy(
- Math.min(100, Math.max(0, c)),
- Math.min(100, Math.max(0, m)),
- Math.min(100, Math.max(0, y))
- ));
- });
- return ret;
- }
- function tCMYK(p, param, val){
- var ret = new dxc.Palette();
- ret.colors = [];
- arr.forEach(p.colors, function(item){
- var o=item.toCmyk(),
- c=(param=="dc")?o.c+val:o.c,
- m=(param=="dm")?o.m+val:o.m,
- y=(param=="dy")?o.y+val:o.y,
- k=(param=="dk")?o.b+val:o.b;
- ret.colors.push(dxc.fromCmyk(
- Math.min(100, Math.max(0, c)),
- Math.min(100, Math.max(0, m)),
- Math.min(100, Math.max(0, y)),
- Math.min(100, Math.max(0, k))
- ));
- });
- return ret;
- }
- function tHSL(p, param, val){
- var ret = new dxc.Palette();
- ret.colors = [];
- arr.forEach(p.colors, function(item){
- var o=item.toHsl(),
- h=(param=="dh")?o.h+val:o.h,
- s=(param=="ds")?o.s+val:o.s,
- l=(param=="dl")?o.l+val:o.l;
- ret.colors.push(dxc.fromHsl(h%360, Math.min(100, Math.max(0, s)), Math.min(100, Math.max(0, l))));
- });
- return ret;
- }
- function tHSV(p, param, val){
- var ret = new dxc.Palette();
- ret.colors = [];
- arr.forEach(p.colors, function(item){
- var o=item.toHsv(),
- h=(param=="dh")?o.h+val:o.h,
- s=(param=="ds")?o.s+val:o.s,
- v=(param=="dv")?o.v+val:o.v;
- ret.colors.push(dxc.fromHsv(h%360, Math.min(100, Math.max(0, s)), Math.min(100, Math.max(0, v))));
- });
- return ret;
- }
-
- function rangeDiff(val, low, high){
-
-
- return high-((high-val)*((high-low)/high));
- }
-
- lang.extend(dxc.Palette, {
- transform: function(/* dojox.color.Palette.__transformArgs */kwArgs){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var fn=tRGBA;
- if(kwArgs.use){
-
- var use=kwArgs.use.toLowerCase();
- if(use.indexOf("hs")==0){
- if(use.charAt(2)=="l"){ fn=tHSL; }
- else { fn=tHSV; }
- }
- else if(use.indexOf("cmy")==0){
- if(use.charAt(3)=="k"){ fn=tCMYK; }
- else { fn=tCMY; }
- }
- }
-
- else if("dc" in kwArgs || "dm" in kwArgs || "dy" in kwArgs){
- if("dk" in kwArgs){ fn = tCMYK; }
- else { fn = tCMY; }
- }
- else if("dh" in kwArgs || "ds" in kwArgs){
- if("dv" in kwArgs){ fn = tHSV; }
- else { fn = tHSL; }
- }
- var palette = this;
- for(var p in kwArgs){
-
- if(p=="use"){ continue; }
- palette = fn(palette, p, kwArgs[p]);
- }
- return palette;
- },
- clone: function(){
-
-
- return new dxc.Palette(this);
- }
- });
- lang.mixin(dxc.Palette, {
- generators: {
- analogous:function(/* dojox.color.Palette.__analogousArgs */args){
-
-
-
- var high=args.high||60,
- low=args.low||18,
- base = lang.isString(args.base)?new dxc.Color(args.base):args.base,
- hsv=base.toHsv();
-
- var h=[
- (hsv.h+low+360)%360,
- (hsv.h+Math.round(low/2)+360)%360,
- hsv.h,
- (hsv.h-Math.round(high/2)+360)%360,
- (hsv.h-high+360)%360
- ];
- var s1=Math.max(10, (hsv.s<=95)?hsv.s+5:(100-(hsv.s-95))),
- s2=(hsv.s>1)?hsv.s-1:21-hsv.s,
- v1=(hsv.v>=92)?hsv.v-9:Math.max(hsv.v+9, 20),
- v2=(hsv.v<=90)?Math.max(hsv.v+5, 20):(95+Math.ceil((hsv.v-90)/2)),
- s=[ s1, s2, hsv.s, s1, s1 ],
- v=[ v1, v2, hsv.v, v1, v2 ]
- return new dxc.Palette(arr.map(h, function(hue, i){
- return dxc.fromHsv(hue, s[i], v[i]);
- }));
- },
- monochromatic: function(/* dojox.color.Palette.__generatorArgs */args){
-
-
-
- var base = lang.isString(args.base)?new dxc.Color(args.base):args.base,
- hsv = base.toHsv();
-
-
- var s1 = (hsv.s-30>9)?hsv.s-30:hsv.s+30,
- s2 = hsv.s,
- v1 = rangeDiff(hsv.v, 20, 100),
- v2 = (hsv.v-20>20)?hsv.v-20:hsv.v+60,
- v3 = (hsv.v-50>20)?hsv.v-50:hsv.v+30;
- return new dxc.Palette([
- dxc.fromHsv(hsv.h, s1, v1),
- dxc.fromHsv(hsv.h, s2, v3),
- base,
- dxc.fromHsv(hsv.h, s1, v3),
- dxc.fromHsv(hsv.h, s2, v2)
- ]);
- },
- triadic: function(/* dojox.color.Palette.__generatorArgs */args){
-
-
-
- var base = lang.isString(args.base)?new dxc.Color(args.base):args.base,
- hsv = base.toHsv();
- var h1 = (hsv.h+57+360)%360,
- h2 = (hsv.h-157+360)%360,
- s1 = (hsv.s>20)?hsv.s-10:hsv.s+10,
- s2 = (hsv.s>90)?hsv.s-10:hsv.s+10,
- s3 = (hsv.s>95)?hsv.s-5:hsv.s+5,
- v1 = (hsv.v-20>20)?hsv.v-20:hsv.v+20,
- v2 = (hsv.v-30>20)?hsv.v-30:hsv.v+30,
- v3 = (hsv.v-30>70)?hsv.v-30:hsv.v+30;
- return new dxc.Palette([
- dxc.fromHsv(h1, s1, hsv.v),
- dxc.fromHsv(hsv.h, s2, v2),
- base,
- dxc.fromHsv(h2, s2, v1),
- dxc.fromHsv(h2, s3, v3)
- ]);
- },
- complementary: function(/* dojox.color.Palette.__generatorArgs */args){
-
-
-
- var base = lang.isString(args.base)?new dxc.Color(args.base):args.base,
- hsv = base.toHsv();
- var h1 = ((hsv.h*2)+137<360)?(hsv.h*2)+137:Math.floor(hsv.h/2)-137,
- s1 = Math.max(hsv.s-10, 0),
- s2 = rangeDiff(hsv.s, 10, 100),
- s3 = Math.min(100, hsv.s+20),
- v1 = Math.min(100, hsv.v+30),
- v2 = (hsv.v>20)?hsv.v-30:hsv.v+30;
- return new dxc.Palette([
- dxc.fromHsv(hsv.h, s1, v1),
- dxc.fromHsv(hsv.h, s2, v2),
- base,
- dxc.fromHsv(h1, s3, v2),
- dxc.fromHsv(h1, hsv.s, hsv.v)
- ]);
- },
- splitComplementary: function(/* dojox.color.Palette.__splitComplementaryArgs */args){
-
-
-
- var base = lang.isString(args.base)?new dxc.Color(args.base):args.base,
- dangle = args.da || 30,
- hsv = base.toHsv();
- var baseh = ((hsv.h*2)+137<360)?(hsv.h*2)+137:Math.floor(hsv.h/2)-137,
- h1 = (baseh-dangle+360)%360,
- h2 = (baseh+dangle)%360,
- s1 = Math.max(hsv.s-10, 0),
- s2 = rangeDiff(hsv.s, 10, 100),
- s3 = Math.min(100, hsv.s+20),
- v1 = Math.min(100, hsv.v+30),
- v2 = (hsv.v>20)?hsv.v-30:hsv.v+30;
- return new dxc.Palette([
- dxc.fromHsv(h1, s1, v1),
- dxc.fromHsv(h1, s2, v2),
- base,
- dxc.fromHsv(h2, s3, v2),
- dxc.fromHsv(h2, hsv.s, hsv.v)
- ]);
- },
- compound: function(/* dojox.color.Palette.__generatorArgs */args){
-
-
-
- var base = lang.isString(args.base)?new dxc.Color(args.base):args.base,
- hsv = base.toHsv();
- var h1 = ((hsv.h*2)+18<360)?(hsv.h*2)+18:Math.floor(hsv.h/2)-18,
- h2 = ((hsv.h*2)+120<360)?(hsv.h*2)+120:Math.floor(hsv.h/2)-120,
- h3 = ((hsv.h*2)+99<360)?(hsv.h*2)+99:Math.floor(hsv.h/2)-99,
- s1 = (hsv.s-40>10)?hsv.s-40:hsv.s+40,
- s2 = (hsv.s-10>80)?hsv.s-10:hsv.s+10,
- s3 = (hsv.s-25>10)?hsv.s-25:hsv.s+25,
- v1 = (hsv.v-40>10)?hsv.v-40:hsv.v+40,
- v2 = (hsv.v-20>80)?hsv.v-20:hsv.v+20,
- v3 = Math.max(hsv.v, 20);
- return new dxc.Palette([
- dxc.fromHsv(h1, s1, v1),
- dxc.fromHsv(h1, s2, v2),
- base,
- dxc.fromHsv(h2, s3, v3),
- dxc.fromHsv(h3, s2, v2)
- ]);
- },
- shades: function(/* dojox.color.Palette.__generatorArgs */args){
-
-
-
- var base = lang.isString(args.base)?new dxc.Color(args.base):args.base,
- hsv = base.toHsv();
- var s = (hsv.s==100 && hsv.v==0)?0:hsv.s,
- v1 = (hsv.v-50>20)?hsv.v-50:hsv.v+30,
- v2 = (hsv.v-25>=20)?hsv.v-25:hsv.v+55,
- v3 = (hsv.v-75>=20)?hsv.v-75:hsv.v+5,
- v4 = Math.max(hsv.v-10, 20);
- return new dxc.Palette([
- new dxc.fromHsv(hsv.h, s, v1),
- new dxc.fromHsv(hsv.h, s, v2),
- base,
- new dxc.fromHsv(hsv.h, s, v3),
- new dxc.fromHsv(hsv.h, s, v4)
- ]);
- }
- },
- generate: function(/* String|dojox.color.Color */base, /* Function|String */type){
-
-
-
-
-
- if(lang.isFunction(type)){
- return type({ base: base });
- }
- else if(dxc.Palette.generators[type]){
- return dxc.Palette.generators[type]({ base: base });
- }
- throw new Error("dojox.color.Palette.generate: the specified generator ('" + type + "') does not exist.");
- }
- });
-
- return dxc.Palette;
- });
- },
- 'dijit/a11y':function(){
- define("dijit/a11y", [
- "dojo/_base/array",
- "dojo/dom",
- "dojo/dom-attr",
- "dojo/dom-style",
- "dojo/_base/lang",
- "dojo/_base/sniff",
- "./main"
- ], function(array, dom, domAttr, domStyle, lang, has, dijit){
-
-
- var undefined;
- var a11y = {
-
-
- _isElementShown: function(/*Element*/ elem){
- var s = domStyle.get(elem);
- return (s.visibility != "hidden")
- && (s.visibility != "collapsed")
- && (s.display != "none")
- && (domAttr.get(elem, "type") != "hidden");
- },
- hasDefaultTabStop: function(/*Element*/ elem){
-
-
-
- switch(elem.nodeName.toLowerCase()){
- case "a":
-
- return domAttr.has(elem, "href");
- case "area":
- case "button":
- case "input":
- case "object":
- case "select":
- case "textarea":
-
- return true;
- case "iframe":
-
- var body;
- try{
-
- var contentDocument = elem.contentDocument;
- if("designMode" in contentDocument && contentDocument.designMode == "on"){
- return true;
- }
- body = contentDocument.body;
- }catch(e1){
-
-
-
- try{
- body = elem.contentWindow.document.body;
- }catch(e2){
- return false;
- }
- }
- return body && (body.contentEditable == 'true' ||
- (body.firstChild && body.firstChild.contentEditable == 'true'));
- default:
- return elem.contentEditable == 'true';
- }
- },
- effectiveTabIndex: function(/*Element*/ elem){
-
-
- if(domAttr.get(elem, "disabled")){
- return undefined;
- }else if(domAttr.has(elem, "tabIndex")){
-
- return +domAttr.get(elem, "tabIndex");
- }else{
-
- return a11y.hasDefaultTabStop(elem) ? 0 : undefined;
- }
- },
- isTabNavigable: function(/*Element*/ elem){
-
-
- return a11y.effectiveTabIndex(elem) >= 0;
- },
- isFocusable: function(/*Element*/ elem){
-
-
- return a11y.effectiveTabIndex(elem) >= -1;
- },
- _getTabNavigable: function(/*DOMNode*/ root){
-
-
-
-
-
-
-
-
-
-
-
-
-
- var first, last, lowest, lowestTabindex, highest, highestTabindex, radioSelected = {};
- function radioName(node){
-
- return node && node.tagName.toLowerCase() == "input" &&
- node.type && node.type.toLowerCase() == "radio" &&
- node.name && node.name.toLowerCase();
- }
- var shown = a11y._isElementShown, effectiveTabIndex = a11y.effectiveTabIndex;
- var walkTree = function(/*DOMNode*/ parent){
- for(var child = parent.firstChild; child; child = child.nextSibling){
-
-
- if(child.nodeType != 1 || (has("ie") <= 9 && child.scopeName !== "HTML") || !shown(child)){
- continue;
- }
- var tabindex = effectiveTabIndex(child);
- if(tabindex >= 0){
- if(tabindex == 0){
- if(!first){
- first = child;
- }
- last = child;
- }else if(tabindex > 0){
- if(!lowest || tabindex < lowestTabindex){
- lowestTabindex = tabindex;
- lowest = child;
- }
- if(!highest || tabindex >= highestTabindex){
- highestTabindex = tabindex;
- highest = child;
- }
- }
- var rn = radioName(child);
- if(domAttr.get(child, "checked") && rn){
- radioSelected[rn] = child;
- }
- }
- if(child.nodeName.toUpperCase() != 'SELECT'){
- walkTree(child);
- }
- }
- };
- if(shown(root)){
- walkTree(root);
- }
- function rs(node){
-
- return radioSelected[radioName(node)] || node;
- }
- return { first: rs(first), last: rs(last), lowest: rs(lowest), highest: rs(highest) };
- },
- getFirstInTabbingOrder: function(/*String|DOMNode*/ root, /*Document?*/ doc){
-
-
-
- var elems = a11y._getTabNavigable(dom.byId(root, doc));
- return elems.lowest ? elems.lowest : elems.first;
- },
- getLastInTabbingOrder: function(/*String|DOMNode*/ root, /*Document?*/ doc){
-
-
-
- var elems = a11y._getTabNavigable(dom.byId(root, doc));
- return elems.last ? elems.last : elems.highest;
- }
- };
- 1 && lang.mixin(dijit, a11y);
- return a11y;
- });
- },
- 'dojox/charting/axis2d/Base':function(){
- define("dojox/charting/axis2d/Base", ["dojo/_base/declare", "../Element"],
- function(declare, Element){
-
- return declare("dojox.charting.axis2d.Base", Element, {
-
-
-
-
- constructor: function(chart, kwArgs){
-
-
-
-
-
-
- this.vertical = kwArgs && kwArgs.vertical;
- },
- clear: function(){
-
-
-
-
- return this;
- },
- initialized: function(){
-
-
-
-
- return false;
- },
- calculate: function(min, max, span){
-
-
-
-
- return this;
- },
- getScaler: function(){
-
-
-
-
- return null;
- },
- getTicks: function(){
-
-
-
-
- return null;
- },
- getOffsets: function(){
-
-
-
-
- return {l: 0, r: 0, t: 0, b: 0};
- },
- render: function(dim, offsets){
-
-
-
-
- this.dirty = false;
- return this;
- }
- });
- });
- },
- 'dojox/charting/plot2d/Grid':function(){
- define("dojox/charting/plot2d/Grid", ["dojo/_base/lang", "dojo/_base/declare", "dojo/_base/connect", "dojo/_base/array",
- "../Element", "./common", "dojox/lang/utils", "dojox/gfx/fx"],
- function(lang, declare, hub, arr, Element, dc, du, fx){
-
- return declare("dojox.charting.plot2d.Grid", Element, {
-
-
-
- defaultParams: {
- hAxis: "x",
- vAxis: "y",
- hMajorLines: true,
- hMinorLines: false,
- vMajorLines: true,
- vMinorLines: false,
- hStripes: "none",
- vStripes: "none",
- animate: null,
- enableCache: false
- },
- optionalParams: {},
- constructor: function(chart, kwArgs){
-
-
-
-
-
-
- this.opt = lang.clone(this.defaultParams);
- du.updateWithObject(this.opt, kwArgs);
- this.hAxis = this.opt.hAxis;
- this.vAxis = this.opt.vAxis;
- this.dirty = true;
- this.animate = this.opt.animate;
- this.zoom = null,
- this.zoomQueue = [];
- this.lastWindow = {vscale: 1, hscale: 1, xoffset: 0, yoffset: 0};
- if(this.opt.enableCache){
- this._lineFreePool = [];
- this._lineUsePool = [];
- }
- },
- clear: function(){
-
-
-
-
- this._hAxis = null;
- this._vAxis = null;
- this.dirty = true;
- return this;
- },
- setAxis: function(axis){
-
-
-
-
- if(axis){
- this[axis.vertical ? "_vAxis" : "_hAxis"] = axis;
- }
- return this;
- },
- addSeries: function(run){
-
-
-
-
- return this;
- },
- getSeriesStats: function(){
-
-
-
-
- return lang.delegate(dc.defaultStats);
- },
- initializeScalers: function(){
-
-
- return this;
- },
- isDirty: function(){
-
-
-
-
- return this.dirty || this._hAxis && this._hAxis.dirty || this._vAxis && this._vAxis.dirty;
- },
- performZoom: function(dim, offsets){
-
-
-
-
-
-
-
-
-
- var vs = this._vAxis.scale || 1,
- hs = this._hAxis.scale || 1,
- vOffset = dim.height - offsets.b,
- hBounds = this._hAxis.getScaler().bounds,
- xOffset = (hBounds.from - hBounds.lower) * hBounds.scale,
- vBounds = this._vAxis.getScaler().bounds,
- yOffset = (vBounds.from - vBounds.lower) * vBounds.scale,
-
- rVScale = vs / this.lastWindow.vscale,
- rHScale = hs / this.lastWindow.hscale,
- rXOffset = (this.lastWindow.xoffset - xOffset)/
- ((this.lastWindow.hscale == 1)? hs : this.lastWindow.hscale),
- rYOffset = (yOffset - this.lastWindow.yoffset)/
- ((this.lastWindow.vscale == 1)? vs : this.lastWindow.vscale),
- shape = this.group,
- anim = fx.animateTransform(lang.delegate({
- shape: shape,
- duration: 1200,
- transform:[
- {name:"translate", start:[0, 0], end: [offsets.l * (1 - rHScale), vOffset * (1 - rVScale)]},
- {name:"scale", start:[1, 1], end: [rHScale, rVScale]},
- {name:"original"},
- {name:"translate", start: [0, 0], end: [rXOffset, rYOffset]}
- ]}, this.zoom));
- lang.mixin(this.lastWindow, {vscale: vs, hscale: hs, xoffset: xOffset, yoffset: yOffset});
-
-
- this.zoomQueue.push(anim);
-
- hub.connect(anim, "onEnd", this, function(){
- this.zoom = null;
- this.zoomQueue.shift();
- if(this.zoomQueue.length > 0){
- this.zoomQueue[0].play();
- }
- });
- if(this.zoomQueue.length == 1){
- this.zoomQueue[0].play();
- }
- return this;
- },
- getRequiredColors: function(){
-
-
-
-
- return 0;
- },
- cleanGroup: function(){
- this.inherited(arguments);
- if(this.opt.enableCache){
- this._lineFreePool = this._lineFreePool.concat(this._lineUsePool);
- this._lineUsePool = [];
- }
- },
- createLine: function(creator, params){
- var line;
- if(this.opt.enableCache && this._lineFreePool.length > 0){
- line = this._lineFreePool.pop();
- line.setShape(params);
-
- creator.add(line);
- }else{
- line = creator.createLine(params);
- }
- if(this.opt.enableCache){
- this._lineUsePool.push(line);
- }
- return line;
- },
- render: function(dim, offsets){
-
-
-
-
-
-
-
-
- if(this.zoom){
- return this.performZoom(dim, offsets);
- }
- this.dirty = this.isDirty();
- if(!this.dirty){ return this; }
- this.cleanGroup();
- var s = this.group, ta = this.chart.theme.axis;
-
- try{
- var vScaler = this._vAxis.getScaler(),
- vt = vScaler.scaler.getTransformerFromModel(vScaler),
- ticks = this._vAxis.getTicks();
- if(ticks != null){
- if(this.opt.hMinorLines){
- arr.forEach(ticks.minor, function(tick){
- var y = dim.height - offsets.b - vt(tick.value);
- var hMinorLine = this.createLine(s, {
- x1: offsets.l,
- y1: y,
- x2: dim.width - offsets.r,
- y2: y
- }).setStroke(ta.minorTick);
- if(this.animate){
- this._animateGrid(hMinorLine, "h", offsets.l, offsets.r + offsets.l - dim.width);
- }
- }, this);
- }
- if(this.opt.hMajorLines){
- arr.forEach(ticks.major, function(tick){
- var y = dim.height - offsets.b - vt(tick.value);
- var hMajorLine = this.createLine(s, {
- x1: offsets.l,
- y1: y,
- x2: dim.width - offsets.r,
- y2: y
- }).setStroke(ta.majorTick);
- if(this.animate){
- this._animateGrid(hMajorLine, "h", offsets.l, offsets.r + offsets.l - dim.width);
- }
- }, this);
- }
- }
- }catch(e){
-
- }
-
- try{
- var hScaler = this._hAxis.getScaler(),
- ht = hScaler.scaler.getTransformerFromModel(hScaler),
- ticks = this._hAxis.getTicks();
- if(this != null){
- if(ticks && this.opt.vMinorLines){
- arr.forEach(ticks.minor, function(tick){
- var x = offsets.l + ht(tick.value);
- var vMinorLine = this.createLine(s, {
- x1: x,
- y1: offsets.t,
- x2: x,
- y2: dim.height - offsets.b
- }).setStroke(ta.minorTick);
- if(this.animate){
- this._animateGrid(vMinorLine, "v", dim.height - offsets.b, dim.height - offsets.b - offsets.t);
- }
- }, this);
- }
- if(ticks && this.opt.vMajorLines){
- arr.forEach(ticks.major, function(tick){
- var x = offsets.l + ht(tick.value);
- var vMajorLine = this.createLine(s, {
- x1: x,
- y1: offsets.t,
- x2: x,
- y2: dim.height - offsets.b
- }).setStroke(ta.majorTick);
- if(this.animate){
- this._animateGrid(vMajorLine, "v", dim.height - offsets.b, dim.height - offsets.b - offsets.t);
- }
- }, this);
- }
- }
- }catch(e){
-
- }
- this.dirty = false;
- return this;
- },
- _animateGrid: function(shape, type, offset, size){
- var transStart = type == "h" ? [offset, 0] : [0, offset];
- var scaleStart = type == "h" ? [1/size, 1] : [1, 1/size];
- fx.animateTransform(lang.delegate({
- shape: shape,
- duration: 1200,
- transform: [
- {name: "translate", start: transStart, end: [0, 0]},
- {name: "scale", start: scaleStart, end: [1, 1]},
- {name: "original"}
- ]
- }, this.animate)).play();
- }
- });
- });
- },
- 'dojox/gfx/utils':function(){
- define("dojox/gfx/utils", ["dojo/_base/kernel","dojo/_base/lang","./_base", "dojo/_base/html","dojo/_base/array", "dojo/_base/window", "dojo/_base/json",
- "dojo/_base/Deferred", "dojo/_base/sniff", "require","dojo/_base/config"],
- function(kernel, lang, g, html, arr, win, jsonLib, Deferred, has, require, config){
- var gu = g.utils = {};
-
- lang.mixin(gu, {
- forEach: function(
- /*dojox.gfx.Surface|dojox.gfx.Shape*/ object,
- /*Function|String|Array*/ f, /*Object?*/ o
- ){
-
-
-
-
-
-
-
- o = o || win.global;
- f.call(o, object);
- if(object instanceof g.Surface || object instanceof g.Group){
- arr.forEach(object.children, function(shape){
- gu.forEach(shape, f, o);
- });
- }
- },
- serialize: function(
- /* dojox.gfx.Surface|dojox.gfx.Shape */ object
- ){
-
-
- var t = {}, v, isSurface = object instanceof g.Surface;
- if(isSurface || object instanceof g.Group){
- t.children = arr.map(object.children, gu.serialize);
- if(isSurface){
- return t.children;
- }
- }else{
- t.shape = object.getShape();
- }
- if(object.getTransform){
- v = object.getTransform();
- if(v){ t.transform = v; }
- }
- if(object.getStroke){
- v = object.getStroke();
- if(v){ t.stroke = v; }
- }
- if(object.getFill){
- v = object.getFill();
- if(v){ t.fill = v; }
- }
- if(object.getFont){
- v = object.getFont();
- if(v){ t.font = v; }
- }
- return t;
- },
- toJson: function(
- /* dojox.gfx.Surface|dojox.gfx.Shape */ object,
- /* Boolean? */ prettyPrint
- ){
-
-
- return jsonLib.toJson(gu.serialize(object), prettyPrint);
- },
- deserialize: function(
- /* dojox.gfx.Surface|dojox.gfx.Shape */ parent,
- /* dojox.gfx.Shape|Array */ object
- ){
-
-
- if(object instanceof Array){
- return arr.map(object, lang.hitch(null, gu.deserialize, parent));
- }
- var shape = ("shape" in object) ? parent.createShape(object.shape) : parent.createGroup();
- if("transform" in object){
- shape.setTransform(object.transform);
- }
- if("stroke" in object){
- shape.setStroke(object.stroke);
- }
- if("fill" in object){
- shape.setFill(object.fill);
- }
- if("font" in object){
- shape.setFont(object.font);
- }
- if("children" in object){
- arr.forEach(object.children, lang.hitch(null, gu.deserialize, shape));
- }
- return shape;
- },
- fromJson: function(
- /* dojox.gfx.Surface|dojox.gfx.Shape */ parent,
- /* String */ json){
-
-
- return gu.deserialize(parent, jsonLib.fromJson(json));
- },
- toSvg: function(/*GFX object*/surface){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var deferred = new Deferred();
-
- if(g.renderer === "svg"){
-
- try{
- var svg = gu._cleanSvg(gu._innerXML(surface.rawNode));
- deferred.callback(svg);
- }catch(e){
- deferred.errback(e);
- }
- }else{
-
-
- if (!gu._initSvgSerializerDeferred) {
- gu._initSvgSerializer();
- }
- var jsonForm = gu.toJson(surface);
- var serializer = function(){
- try{
- var sDim = surface.getDimensions();
- var width = sDim.width;
- var height = sDim.height;
-
- var node = gu._gfxSvgProxy.document.createElement("div");
- gu._gfxSvgProxy.document.body.appendChild(node);
-
- win.withDoc(gu._gfxSvgProxy.document, function() {
- html.style(node, "width", width);
- html.style(node, "height", height);
- }, this);
-
- var ts = gu._gfxSvgProxy[dojox._scopeName].gfx.createSurface(node, width, height);
-
-
- var draw = function(surface) {
- try{
- gu._gfxSvgProxy[dojox._scopeName].gfx.utils.fromJson(surface, jsonForm);
-
- var svg = gu._cleanSvg(node.innerHTML);
- surface.clear();
- surface.destroy();
- gu._gfxSvgProxy.document.body.removeChild(node);
- deferred.callback(svg);
- }catch(e){
- deferred.errback(e);
- }
- };
- ts.whenLoaded(null,draw);
- }catch (ex) {
- deferred.errback(ex);
- }
- };
-
-
- if(gu._initSvgSerializerDeferred.fired > 0){
- serializer();
- }else{
- gu._initSvgSerializerDeferred.addCallback(serializer);
- }
- }
- return deferred;
- },
-
- _gfxSvgProxy: null,
-
- _initSvgSerializerDeferred: null,
- _svgSerializerInitialized: function() {
-
-
-
-
- gu._initSvgSerializerDeferred.callback(true);
- },
- _initSvgSerializer: function(){
-
-
-
-
-
- if(!gu._initSvgSerializerDeferred){
- gu._initSvgSerializerDeferred = new Deferred();
- var f = win.doc.createElement("iframe");
- html.style(f, {
- display: "none",
- position: "absolute",
- width: "1em",
- height: "1em",
- top: "-10000px"
- });
- var intv;
- if(has("ie")){
- f.onreadystatechange = function(){
- if(f.contentWindow.document.readyState == "complete"){
- f.onreadystatechange = function() {};
- intv = setInterval(function() {
- if(f.contentWindow[kernel.scopeMap["dojo"][1]._scopeName] &&
- f.contentWindow[kernel.scopeMap["dojox"][1]._scopeName].gfx &&
- f.contentWindow[kernel.scopeMap["dojox"][1]._scopeName].gfx.utils){
- clearInterval(intv);
- f.contentWindow.parent[kernel.scopeMap["dojox"][1]._scopeName].gfx.utils._gfxSvgProxy = f.contentWindow;
- f.contentWindow.parent[kernel.scopeMap["dojox"][1]._scopeName].gfx.utils._svgSerializerInitialized();
- }
- }, 50);
- }
- };
- }else{
- f.onload = function(){
- f.onload = function() {};
- intv = setInterval(function() {
- if(f.contentWindow[kernel.scopeMap["dojo"][1]._scopeName] &&
- f.contentWindow[kernel.scopeMap["dojox"][1]._scopeName].gfx &&
- f.contentWindow[kernel.scopeMap["dojox"][1]._scopeName].gfx.utils){
- clearInterval(intv);
- f.contentWindow.parent[kernel.scopeMap["dojox"][1]._scopeName].gfx.utils._gfxSvgProxy = f.contentWindow;
- f.contentWindow.parent[kernel.scopeMap["dojox"][1]._scopeName].gfx.utils._svgSerializerInitialized();
- }
- }, 50);
- };
- }
-
- var uri = (config["dojoxGfxSvgProxyFrameUrl"]||require.toUrl("dojox/gfx/resources/gfxSvgProxyFrame.html"));
- f.setAttribute("src", uri.toString());
- win.body().appendChild(f);
- }
- },
- _innerXML: function(/*Node*/node){
-
-
-
-
-
-
- if(node.innerXML){
- return node.innerXML;
- }else if(node.xml){
- return node.xml;
- }else if(typeof XMLSerializer != "undefined"){
- return (new XMLSerializer()).serializeToString(node);
- }
- return null;
- },
- _cleanSvg: function(svg) {
-
-
-
-
- if(svg){
-
- if(svg.indexOf("xmlns=\"http://www.w3.org/2000/svg\"") == -1){
- svg = svg.substring(4, svg.length);
- svg = "<svg xmlns=\"http://www.w3.org/2000/svg\"" + svg;
- }
-
- if(svg.indexOf("xmlns:xlink=\"http://www.w3.org/1999/xlink\"") == -1){
- svg = svg.substring(4, svg.length);
- svg = "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\"" + svg;
- }
-
-
- if(svg.indexOf("xlink:href") === -1){
- svg = svg.replace(/href\s*=/g, "xlink:href=");
- }
-
-
- svg = svg.replace(/\bdojoGfx\w*\s*=\s*(['"])\w*\1/g, "");
- svg = svg.replace(/\b__gfxObject__\s*=\s*(['"])\w*\1/g, "");
- svg = svg.replace(/[=]([^"']+?)(\s|>)/g,'="$1"$2');
-
-
-
- svg = svg.replace(/\bstroke-opacity\w*\s*=\s*(['"])undefined\1/g, "");
- }
- return svg;
- }
- });
- return gu;
- });
- },
- 'dojox/lang/functional/fold':function(){
- define(["dojo/_base/lang", "dojo/_base/array", "dojo/_base/window", "./lambda"],
- function(lang, arr, win, df){
- var empty = {};
- lang.mixin(df, {
-
- foldl: function(/*Array|String|Object*/ a, /*Function*/ f, /*Object*/ z, /*Object?*/ o){
-
-
-
- if(typeof a == "string"){ a = a.split(""); }
- o = o || win.global; f = df.lambda(f);
- var i, n;
- if(lang.isArray(a)){
-
- for(i = 0, n = a.length; i < n; z = f.call(o, z, a[i], i, a), ++i);
- }else if(typeof a.hasNext == "function" && typeof a.next == "function"){
-
- for(i = 0; a.hasNext(); z = f.call(o, z, a.next(), i++, a));
- }else{
-
- for(i in a){
- if(!(i in empty)){
- z = f.call(o, z, a[i], i, a);
- }
- }
- }
- return z;
- },
- foldl1: function(/*Array|String|Object*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
-
-
- if(typeof a == "string"){ a = a.split(""); }
- o = o || win.global; f = df.lambda(f);
- var z, i, n;
- if(lang.isArray(a)){
-
- z = a[0];
- for(i = 1, n = a.length; i < n; z = f.call(o, z, a[i], i, a), ++i);
- }else if(typeof a.hasNext == "function" && typeof a.next == "function"){
-
- if(a.hasNext()){
- z = a.next();
- for(i = 1; a.hasNext(); z = f.call(o, z, a.next(), i++, a));
- }
- }else{
-
- var first = true;
- for(i in a){
- if(!(i in empty)){
- if(first){
- z = a[i];
- first = false;
- }else{
- z = f.call(o, z, a[i], i, a);
- }
- }
- }
- }
- return z;
- },
- foldr: function(/*Array|String*/ a, /*Function|String|Array*/ f, /*Object*/ z, /*Object?*/ o){
-
-
-
- if(typeof a == "string"){ a = a.split(""); }
- o = o || win.global; f = df.lambda(f);
- for(var i = a.length; i > 0; --i, z = f.call(o, z, a[i], i, a));
- return z;
- },
- foldr1: function(/*Array|String*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
-
-
- if(typeof a == "string"){ a = a.split(""); }
- o = o || win.global; f = df.lambda(f);
- var n = a.length, z = a[n - 1], i = n - 1;
- for(; i > 0; --i, z = f.call(o, z, a[i], i, a));
- return z;
- },
-
- reduce: function(/*Array|String|Object*/ a, /*Function|String|Array*/ f, /*Object?*/ z){
-
-
- return arguments.length < 3 ? df.foldl1(a, f) : df.foldl(a, f, z);
- },
- reduceRight: function(/*Array|String*/ a, /*Function|String|Array*/ f, /*Object?*/ z){
-
-
- return arguments.length < 3 ? df.foldr1(a, f) : df.foldr(a, f, z);
- },
-
- unfold: function(/*Function|String|Array*/ pr, /*Function|String|Array*/ f,
- /*Function|String|Array*/ g, /*Object*/ z, /*Object?*/ o){
-
- o = o || win.global; f = df.lambda(f); g = df.lambda(g); pr = df.lambda(pr);
- var t = [];
- for(; !pr.call(o, z); t.push(f.call(o, z)), z = g.call(o, z));
- return t;
- }
- });
- });
- },
- 'url:dijit/templates/Tooltip.html':"<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\"\n\t><div class=\"dijitTooltipContainer dijitTooltipContents\" data-dojo-attach-point=\"containerNode\" role='alert'></div\n\t><div class=\"dijitTooltipConnector\" data-dojo-attach-point=\"connectorNode\"></div\n></div>\n",
- 'dojox/charting/plot2d/Spider':function(){
- define("dojox/charting/plot2d/Spider", ["dojo/_base/lang", "dojo/_base/declare", "dojo/_base/connect", "dojo/_base/html", "dojo/_base/array",
- "dojo/dom-geometry", "dojo/_base/fx", "dojo/fx", "dojo/_base/sniff",
- "../Element", "./_PlotEvents", "dojo/_base/Color", "dojox/color/_base", "./common", "../axis2d/common",
- "../scaler/primitive", "dojox/gfx", "dojox/gfx/matrix", "dojox/gfx/fx", "dojox/lang/functional",
- "dojox/lang/utils", "dojo/fx/easing"],
- function(lang, declare, hub, html, arr, domGeom, baseFx, coreFx, has,
- Element, PlotEvents, Color, dxcolor, dc, da, primitive,
- g, m, gfxfx, df, du, easing){
- var FUDGE_FACTOR = 0.2;
- var Spider = declare("dojox.charting.plot2d.Spider", [Element, PlotEvents], {
-
-
- defaultParams: {
- labels: true,
- ticks: false,
- fixed: true,
- precision: 1,
- labelOffset: -10,
- labelStyle: "default",
- htmlLabels: true,
- startAngle: -90,
- divisions: 3,
- axisColor: "",
- axisWidth: 0,
- spiderColor: "",
- spiderWidth: 0,
- seriesWidth: 0,
- seriesFillAlpha: 0.2,
- spiderOrigin: 0.16,
- markerSize: 3,
- spiderType: "polygon",
- animationType: easing.backOut,
- axisTickFont: "",
- axisTickFontColor: "",
- axisFont: "",
- axisFontColor: ""
- },
- optionalParams: {
- radius: 0,
- font: "",
- fontColor: ""
- },
- constructor: function(chart, kwArgs){
-
-
- this.opt = lang.clone(this.defaultParams);
- du.updateWithObject(this.opt, kwArgs);
- du.updateWithPattern(this.opt, kwArgs, this.optionalParams);
- this.series = [];
- this.dyn = [];
- this.datas = {};
- this.labelKey = [];
- this.oldSeriePoints = {};
- this.animations = {};
- },
- clear: function(){
-
-
-
-
- this.dirty = true;
- this.dyn = [];
- this.series = [];
- this.datas = {};
- this.labelKey = [];
- this.oldSeriePoints = {};
- this.animations = {};
- return this;
- },
- setAxis: function(axis){
-
-
-
-
- return this;
- },
- addSeries: function(run){
-
-
-
-
-
-
- var matched = false;
- this.series.push(run);
- for(var key in run.data){
- var val = run.data[key],
- data = this.datas[key];
- if(data){
- data.vlist.push(val);
- data.min = Math.min(data.min, val);
- data.max = Math.max(data.max, val);
- }else{
- this.datas[key] = {min: val, max: val, vlist: [val]};
- }
- }
- if (this.labelKey.length <= 0) {
- for (var key in run.data) {
- this.labelKey.push(key);
- }
- }
- return this;
- },
- getSeriesStats: function(){
-
-
-
-
- return dc.collectSimpleStats(this.series);
- },
- calculateAxes: function(dim){
-
-
-
-
-
-
- this.initializeScalers(dim, this.getSeriesStats());
- return this;
- },
- getRequiredColors: function(){
-
-
-
-
- return this.series.length;
- },
- initializeScalers: function(dim, stats){
-
-
-
-
-
-
-
-
- if(this._hAxis){
- if(!this._hAxis.initialized()){
- this._hAxis.calculate(stats.hmin, stats.hmax, dim.width);
- }
- this._hScaler = this._hAxis.getScaler();
- }else{
- this._hScaler = primitive.buildScaler(stats.hmin, stats.hmax, dim.width);
- }
- if(this._vAxis){
- if(!this._vAxis.initialized()){
- this._vAxis.calculate(stats.vmin, stats.vmax, dim.height);
- }
- this._vScaler = this._vAxis.getScaler();
- }else{
- this._vScaler = primitive.buildScaler(stats.vmin, stats.vmax, dim.height);
- }
- return this;
- },
- render: function(dim, offsets){
-
-
-
-
-
-
-
-
- if(!this.dirty){ return this; }
- this.dirty = false;
- this.cleanGroup();
- var s = this.group, t = this.chart.theme;
- this.resetEvents();
- if(!this.series || !this.series.length){
- return this;
- }
-
- var o = this.opt, ta = t.axis,
- rx = (dim.width - offsets.l - offsets.r) / 2,
- ry = (dim.height - offsets.t - offsets.b) / 2,
- r = Math.min(rx, ry),
- axisTickFont = o.font || (ta.majorTick && ta.majorTick.font) || (ta.tick && ta.tick.font) || "normal normal normal 7pt Tahoma",
- axisFont = o.axisFont || (ta.tick && ta.tick.titleFont) || "normal normal normal 11pt Tahoma",
- axisTickFontColor = o.axisTickFontColor || (ta.majorTick && ta.majorTick.fontColor) || (ta.tick && ta.tick.fontColor) || "silver",
- axisFontColor = o.axisFontColor || (ta.tick && ta.tick.titleFontColor) || "black",
- axisColor = o.axisColor || (ta.tick && ta.tick.axisColor) || "silver",
- spiderColor = o.spiderColor || (ta.tick && ta.tick.spiderColor) || "silver",
- axisWidth = o.axisWidth || (ta.stroke && ta.stroke.width) || 2,
- spiderWidth = o.spiderWidth || (ta.stroke && ta.stroke.width) || 2,
- seriesWidth = o.seriesWidth || (ta.stroke && ta.stroke.width) || 2,
- asize = g.normalizedLength(g.splitFontString(axisFont).size),
- startAngle = m._degToRad(o.startAngle),
- start = startAngle, step, filteredRun, slices, labels, shift, labelR,
- outerPoints, innerPoints, divisionPoints, divisionRadius, labelPoints,
- ro = o.spiderOrigin, dv = o.divisions >= 3 ? o.divisions : 3, ms = o.markerSize,
- spt = o.spiderType, at = o.animationType, lboffset = o.labelOffset < -10 ? o.labelOffset : -10,
- axisExtra = 0.2;
-
- if(o.labels){
- labels = arr.map(this.series, function(s){
- return s.name;
- }, this);
- shift = df.foldl1(df.map(labels, function(label, i){
- var font = t.series.font;
- return g._base._getTextBox(label, {
- font: font
- }).w;
- }, this), "Math.max(a, b)") / 2;
- r = Math.min(rx - 2 * shift, ry - asize) + lboffset;
- labelR = r - lboffset;
- }
- if ("radius" in o) {
- r = o.radius;
- labelR = r - lboffset;
- }
- r /= (1+axisExtra);
- var circle = {
- cx: offsets.l + rx,
- cy: offsets.t + ry,
- r: r
- };
-
- for (var i = this.series.length - 1; i >= 0; i--) {
- var serieEntry = this.series[i];
- if (!this.dirty && !serieEntry.dirty) {
- t.skip();
- continue;
- }
- serieEntry.cleanGroup();
- var run = serieEntry.data;
- if (run !== null) {
- var len = this._getObjectLength(run);
-
- if (!outerPoints || outerPoints.length <= 0) {
- outerPoints = [], innerPoints = [], labelPoints = [];
- this._buildPoints(outerPoints, len, circle, r, start, true);
- this._buildPoints(innerPoints, len, circle, r*ro, start, true);
- this._buildPoints(labelPoints, len, circle, labelR, start);
- if(dv > 2){
- divisionPoints = [], divisionRadius = [];
- for (var j = 0; j < dv - 2; j++) {
- divisionPoints[j] = [];
- this._buildPoints(divisionPoints[j], len, circle, r*(ro + (1-ro)*(j+1)/(dv-1)), start, true);
- divisionRadius[j] = r*(ro + (1-ro)*(j+1)/(dv-1));
- }
- }
- }
- }
- }
-
-
-
- var axisGroup = s.createGroup(), axisStroke = {color: axisColor, width: axisWidth},
- spiderStroke = {color: spiderColor, width: spiderWidth};
- for (var j = outerPoints.length - 1; j >= 0; --j) {
- var point = outerPoints[j],
- st = {
- x: point.x + (point.x - circle.cx) * axisExtra,
- y: point.y + (point.y - circle.cy) * axisExtra
- },
- nd = {
- x: point.x + (point.x - circle.cx) * axisExtra / 2,
- y: point.y + (point.y - circle.cy) * axisExtra / 2
- };
- axisGroup.createLine({
- x1: circle.cx,
- y1: circle.cy,
- x2: st.x,
- y2: st.y
- }).setStroke(axisStroke);
-
- this._drawArrow(axisGroup, st, nd, axisStroke);
- }
-
-
- var labelGroup = s.createGroup();
- for (var j = labelPoints.length - 1; j >= 0; --j) {
- var point = labelPoints[j],
- fontWidth = g._base._getTextBox(this.labelKey[j], {font: axisFont}).w || 0,
- render = this.opt.htmlLabels && g.renderer != "vml" ? "html" : "gfx",
- elem = da.createText[render](this.chart, labelGroup, (!domGeom.isBodyLtr() && render == "html") ? (point.x + fontWidth - dim.width) : point.x, point.y,
- "middle", this.labelKey[j], axisFont, axisFontColor);
- if (this.opt.htmlLabels) {
- this.htmlElements.push(elem);
- }
- }
-
-
- var spiderGroup = s.createGroup();
- if(spt == "polygon"){
- spiderGroup.createPolyline(outerPoints).setStroke(spiderStroke);
- spiderGroup.createPolyline(innerPoints).setStroke(spiderStroke);
- if (divisionPoints.length > 0) {
- for (var j = divisionPoints.length - 1; j >= 0; --j) {
- spiderGroup.createPolyline(divisionPoints[j]).setStroke(spiderStroke);
- }
- }
- }else{
- var ccount = this._getObjectLength(this.datas);
- spiderGroup.createCircle({cx: circle.cx, cy: circle.cy, r: r}).setStroke(spiderStroke);
- spiderGroup.createCircle({cx: circle.cx, cy: circle.cy, r: r*ro}).setStroke(spiderStroke);
- if (divisionRadius.length > 0) {
- for (var j = divisionRadius.length - 1; j >= 0; --j) {
- spiderGroup.createCircle({cx: circle.cx, cy: circle.cy, r: divisionRadius[j]}).setStroke(spiderStroke);
- }
- }
- }
-
- var textGroup = s.createGroup(), len = this._getObjectLength(this.datas), k = 0;
- for(var key in this.datas){
- var data = this.datas[key], min = data.min, max = data.max, distance = max - min,
- end = start + 2 * Math.PI * k / len;
- for (var i = 0; i < dv; i++) {
- var text = min + distance*i/(dv-1), point = this._getCoordinate(circle, r*(ro + (1-ro)*i/(dv-1)), end);
- text = this._getLabel(text);
- var fontWidth = g._base._getTextBox(text, {font: axisTickFont}).w || 0,
- render = this.opt.htmlLabels && g.renderer != "vml" ? "html" : "gfx";
- if (this.opt.htmlLabels) {
- this.htmlElements.push(da.createText[render]
- (this.chart, textGroup, (!domGeom.isBodyLtr() && render == "html") ? (point.x + fontWidth - dim.width) : point.x, point.y,
- "start", text, axisTickFont, axisTickFontColor));
- }
- }
- k++;
- }
-
-
- this.chart.seriesShapes = {};
- var animationConnections = [];
- for (var i = this.series.length - 1; i >= 0; i--) {
- var serieEntry = this.series[i], run = serieEntry.data;
- if (run !== null) {
-
- var seriePoints = [], k = 0, tipData = [];
- for(var key in run){
- var data = this.datas[key], min = data.min, max = data.max, distance = max - min,
- entry = run[key], end = start + 2 * Math.PI * k / len,
- point = this._getCoordinate(circle, r*(ro + (1-ro)*(entry-min)/distance), end);
- seriePoints.push(point);
- tipData.push({sname: serieEntry.name, key: key, data: entry});
- k++;
- }
- seriePoints[seriePoints.length] = seriePoints[0];
- tipData[tipData.length] = tipData[0];
- var polygonBoundRect = this._getBoundary(seriePoints),
- theme = t.next("spider", [o, serieEntry]), ts = serieEntry.group,
- f = g.normalizeColor(theme.series.fill), sk = {color: theme.series.fill, width: seriesWidth};
- f.a = o.seriesFillAlpha;
- serieEntry.dyn = {fill: f, stroke: sk};
-
- var osps = this.oldSeriePoints[serieEntry.name];
- var cs = this._createSeriesEntry(ts, (osps || innerPoints), seriePoints, f, sk, r, ro, ms, at);
- this.chart.seriesShapes[serieEntry.name] = cs;
- this.oldSeriePoints[serieEntry.name] = seriePoints;
-
- var po = {
- element: "spider_poly",
- index: i,
- id: "spider_poly_"+serieEntry.name,
- run: serieEntry,
- plot: this,
- shape: cs.poly,
- parent: ts,
- brect: polygonBoundRect,
- cx: circle.cx,
- cy: circle.cy,
- cr: r,
- f: f,
- s: s
- };
- this._connectEvents(po);
-
- var so = {
- element: "spider_plot",
- index: i,
- id: "spider_plot_"+serieEntry.name,
- run: serieEntry,
- plot: this,
- shape: serieEntry.group
- };
- this._connectEvents(so);
-
- arr.forEach(cs.circles, function(c, i){
- var shape = c.getShape(),
- co = {
- element: "spider_circle",
- index: i,
- id: "spider_circle_"+serieEntry.name+i,
- run: serieEntry,
- plot: this,
- shape: c,
- parent: ts,
- tdata: tipData[i],
- cx: seriePoints[i].x,
- cy: seriePoints[i].y,
- f: f,
- s: s
- };
- this._connectEvents(co);
- }, this);
- }
- }
- return this;
- },
- _createSeriesEntry: function(ts, osps, sps, f, sk, r, ro, ms, at){
-
- var spoly = ts.createPolyline(osps).setFill(f).setStroke(sk), scircle = [];
- for (var j = 0; j < osps.length; j++) {
- var point = osps[j], cr = ms;
- var circle = ts.createCircle({cx: point.x, cy: point.y, r: cr}).setFill(f).setStroke(sk);
- scircle.push(circle);
- }
-
- var anims = arr.map(sps, function(np, j){
-
- var sp = osps[j],
- anim = new baseFx.Animation({
- duration: 1000,
- easing: at,
- curve: [sp.y, np.y]
- });
- var spl = spoly, sc = scircle[j];
- hub.connect(anim, "onAnimate", function(y){
-
- var pshape = spl.getShape();
- pshape.points[j].y = y;
- spl.setShape(pshape);
-
- var cshape = sc.getShape();
- cshape.cy = y;
- sc.setShape(cshape);
- });
- return anim;
- });
-
- var anims1 = arr.map(sps, function(np, j){
-
- var sp = osps[j],
- anim = new baseFx.Animation({
- duration: 1000,
- easing: at,
- curve: [sp.x, np.x]
- });
- var spl = spoly, sc = scircle[j];
- hub.connect(anim, "onAnimate", function(x){
-
- var pshape = spl.getShape();
- pshape.points[j].x = x;
- spl.setShape(pshape);
-
- var cshape = sc.getShape();
- cshape.cx = x;
- sc.setShape(cshape);
- });
- return anim;
- });
- var masterAnimation = coreFx.combine(anims.concat(anims1));
- masterAnimation.play();
- return {group :ts, poly: spoly, circles: scircle};
- },
- plotEvent: function(o){
-
-
-
-
- var runName = o.id ? o.id : "default", a;
- if (runName in this.animations) {
- a = this.animations[runName];
- a.anim && a.anim.stop(true);
- } else {
- a = this.animations[runName] = {};
- }
- if(o.element == "spider_poly"){
- if(!a.color){
- var color = o.shape.getFill();
- if(!color || !(color instanceof Color)){
- return;
- }
- a.color = {
- start: color,
- end: transColor(color)
- };
- }
- var start = a.color.start, end = a.color.end;
- if(o.type == "onmouseout"){
-
- var t = start; start = end; end = t;
- }
- a.anim = gfxfx.animateFill({
- shape: o.shape,
- duration: 800,
- easing: easing.backOut,
- color: {start: start, end: end}
- });
- a.anim.play();
- }else if(o.element == "spider_circle"){
- var init, scale, defaultScale = 1.5;
- if(o.type == "onmouseover"){
- init = m.identity;
- scale = defaultScale;
-
- var aroundRect = {type: "rect"};
- aroundRect.x = o.cx;
- aroundRect.y = o.cy;
- aroundRect.width = aroundRect.height = 1;
- var lt = html.coords(this.chart.node, true);
- aroundRect.x += lt.x;
- aroundRect.y += lt.y;
- aroundRect.x = Math.round(aroundRect.x);
- aroundRect.y = Math.round(aroundRect.y);
- aroundRect.width = aroundRect.w = Math.ceil(aroundRect.width);
- aroundRect.height = aroundRect.h = Math.ceil(aroundRect.height);
- this.aroundRect = aroundRect;
- var position = ["after-centered", "before-centered"];
- dc.doIfLoaded("dijit/Tooltip", dojo.hitch(this, function(Tooltip){
- Tooltip.show(o.tdata.sname + "<br/>" + o.tdata.key + "<br/>" + o.tdata.data, this.aroundRect, position);
- }));
- }else{
- init = m.scaleAt(defaultScale, o.cx, o.cy);
- scale = 1/defaultScale;
- dc.doIfLoaded("dijit/Tooltip", dojo.hitch(this, function(Tooltip){
- this.aroundRect && Tooltip.hide(this.aroundRect);
- }));
- }
- var cs = o.shape.getShape(),
- init = m.scaleAt(defaultScale, cs.cx, cs.cy),
- kwArgs = {
- shape: o.shape,
- duration: 200,
- easing: easing.backOut,
- transform: [
- {name: "scaleAt", start: [1, cs.cx, cs.cy], end: [scale, cs.cx, cs.cy]},
- init
- ]
- };
- a.anim = gfxfx.animateTransform(kwArgs);
- a.anim.play();
- }else if(o.element == "spider_plot"){
-
- if (o.type == "onmouseover" && !has("ie")) {
- o.shape.moveToFront();
- }
- }
- },
- _getBoundary: function(points){
- var xmax = points[0].x,
- xmin = points[0].x,
- ymax = points[0].y,
- ymin = points[0].y;
- for(var i = 0; i < points.length; i++){
- var point = points[i];
- xmax = Math.max(point.x, xmax);
- ymax = Math.max(point.y, ymax);
- xmin = Math.min(point.x, xmin);
- ymin = Math.min(point.y, ymin);
- }
- return {
- x: xmin,
- y: ymin,
- width: xmax - xmin,
- height: ymax - ymin
- };
- },
-
- _drawArrow: function(s, start, end, stroke){
- var len = Math.sqrt(Math.pow(end.x - start.x, 2) + Math.pow(end.y - start.y, 2)),
- sin = (end.y - start.y)/len, cos = (end.x - start.x)/len,
- point2 = {x: end.x + (len/3)*(-sin), y: end.y + (len/3)*cos},
- point3 = {x: end.x + (len/3)*sin, y: end.y + (len/3)*(-cos)};
- s.createPolyline([start, point2, point3]).setFill(stroke.color).setStroke(stroke);
- },
-
- _buildPoints: function(points, count, circle, radius, angle, recursive){
- for (var i = 0; i < count; i++) {
- var end = angle + 2 * Math.PI * i / count;
- points.push(this._getCoordinate(circle, radius, end));
- }
- if(recursive){
- points.push(this._getCoordinate(circle, radius, angle + 2 * Math.PI));
- }
- },
-
- _getCoordinate: function(circle, radius, angle){
- return {
- x: circle.cx + radius * Math.cos(angle),
- y: circle.cy + radius * Math.sin(angle)
- }
- },
-
- _getObjectLength: function(obj){
- var count = 0;
- if(lang.isObject(obj)){
- for(var key in obj){
- count++;
- }
- }
- return count;
- },
-
- _getLabel: function(number){
- return dc.getLabel(number, this.opt.fixed, this.opt.precision);
- }
- });
-
- function transColor(color){
- var a = new dxcolor.Color(color),
- x = a.toHsl();
- if(x.s == 0){
- x.l = x.l < 50 ? 100 : 0;
- }else{
- x.s = 100;
- if(x.l < 50){
- x.l = 75;
- }else if(x.l > 75){
- x.l = 50;
- }else{
- x.l = x.l - 50 > 75 - x.l ?
- 50 : 75;
- }
- }
- var color = dxcolor.fromHsl(x);
- color.a = 0.7;
- return color;
- }
-
- return Spider;
- });
- },
- 'dojox/charting/plot2d/StackedBars':function(){
- define(["dojo/_base/lang", "dojo/_base/array", "dojo/_base/declare", "./Bars", "./common",
- "dojox/lang/functional", "dojox/lang/functional/reversed", "dojox/lang/functional/sequence"],
- function(lang, arr, declare, Bars, dc, df, dfr, dfs){
- var purgeGroup = dfr.lambda("item.purgeGroup()");
- return declare("dojox.charting.plot2d.StackedBars", Bars, {
-
-
- getSeriesStats: function(){
-
-
-
-
- var stats = dc.collectStackedStats(this.series), t;
- this._maxRunLength = stats.hmax;
- stats.hmin -= 0.5;
- stats.hmax += 0.5;
- t = stats.hmin, stats.hmin = stats.vmin, stats.vmin = t;
- t = stats.hmax, stats.hmax = stats.vmax, stats.vmax = t;
- return stats;
- },
- render: function(dim, offsets){
-
-
-
-
-
-
-
-
- if(this._maxRunLength <= 0){
- return this;
- }
-
- var acc = df.repeat(this._maxRunLength, "-> 0", 0);
- for(var i = 0; i < this.series.length; ++i){
- var run = this.series[i];
- for(var j = 0; j < run.data.length; ++j){
- var value = run.data[j];
- if(value !== null){
- var v = typeof value == "number" ? value : value.y;
- if(isNaN(v)){ v = 0; }
- acc[j] += v;
- }
- }
- }
-
- if(this.zoom && !this.isDataDirty()){
- return this.performZoom(dim, offsets);
- }
- this.resetEvents();
- this.dirty = this.isDirty();
- if(this.dirty){
- arr.forEach(this.series, purgeGroup);
- this._eventSeries = {};
- this.cleanGroup();
- var s = this.group;
- df.forEachRev(this.series, function(item){ item.cleanGroup(s); });
- }
- var t = this.chart.theme, f, gap, height,
- ht = this._hScaler.scaler.getTransformerFromModel(this._hScaler),
- vt = this._vScaler.scaler.getTransformerFromModel(this._vScaler),
- events = this.events();
- f = dc.calculateBarSize(this._vScaler.bounds.scale, this.opt);
- gap = f.gap;
- height = f.size;
- for(var i = this.series.length - 1; i >= 0; --i){
- var run = this.series[i];
- if(!this.dirty && !run.dirty){
- t.skip();
- this._reconnectEvents(run.name);
- continue;
- }
- run.cleanGroup();
- var theme = t.next("bar", [this.opt, run]), s = run.group,
- eventSeries = new Array(acc.length);
- for(var j = 0; j < acc.length; ++j){
- var value = run.data[j];
- if(value !== null){
- var v = acc[j],
- width = ht(v),
- finalTheme = typeof value != "number" ?
- t.addMixin(theme, "bar", value, true) :
- t.post(theme, "bar");
- if(width >= 0 && height >= 1){
- var rect = {
- x: offsets.l,
- y: dim.height - offsets.b - vt(j + 1.5) + gap,
- width: width, height: height
- };
- var specialFill = this._plotFill(finalTheme.series.fill, dim, offsets);
- specialFill = this._shapeFill(specialFill, rect);
- var shape = s.createRect(rect).setFill(specialFill).setStroke(finalTheme.series.stroke);
- run.dyn.fill = shape.getFill();
- run.dyn.stroke = shape.getStroke();
- if(events){
- var o = {
- element: "bar",
- index: j,
- run: run,
- shape: shape,
- x: v,
- y: j + 1.5
- };
- this._connectEvents(o);
- eventSeries[j] = o;
- }
- if(this.animate){
- this._animateBar(shape, offsets.l, -width);
- }
- }
- }
- }
- this._eventSeries[run.name] = eventSeries;
- run.dirty = false;
-
- for(var j = 0; j < run.data.length; ++j){
- var value = run.data[j];
- if(value !== null){
- var v = typeof value == "number" ? value : value.y;
- if(isNaN(v)){ v = 0; }
- acc[j] -= v;
- }
- }
- }
- this.dirty = false;
- return this;
- }
- });
- });
- },
- 'dojox/charting/themes/GreySkies':function(){
- define("dojox/charting/themes/GreySkies", ["../Theme", "./common"], function(Theme, themes){
-
- themes.GreySkies=new Theme(Theme._def);
-
- return themes.GreySkies;
- });
- },
- 'dojox/charting/plot2d/Columns':function(){
- define(["dojo/_base/lang", "dojo/_base/array", "dojo/_base/declare", "./Base", "./common",
- "dojox/lang/functional", "dojox/lang/functional/reversed", "dojox/lang/utils", "dojox/gfx/fx"],
- function(lang, arr, declare, Base, dc, df, dfr, du, fx){
- var purgeGroup = dfr.lambda("item.purgeGroup()");
- return declare("dojox.charting.plot2d.Columns", Base, {
-
-
- defaultParams: {
- hAxis: "x",
- vAxis: "y",
- gap: 0,
- animate: null,
- enableCache: false
- },
- optionalParams: {
- minBarSize: 1,
- maxBarSize: 1,
-
- stroke: {},
- outline: {},
- shadow: {},
- fill: {},
- font: "",
- fontColor: ""
- },
- constructor: function(chart, kwArgs){
-
-
-
-
-
-
- this.opt = lang.clone(this.defaultParams);
- du.updateWithObject(this.opt, kwArgs);
- du.updateWithPattern(this.opt, kwArgs, this.optionalParams);
- this.series = [];
- this.hAxis = this.opt.hAxis;
- this.vAxis = this.opt.vAxis;
- this.animate = this.opt.animate;
- },
- getSeriesStats: function(){
-
-
-
-
- var stats = dc.collectSimpleStats(this.series);
- stats.hmin -= 0.5;
- stats.hmax += 0.5;
- return stats;
- },
-
- createRect: function(run, creator, params){
- var rect;
- if(this.opt.enableCache && run._rectFreePool.length > 0){
- rect = run._rectFreePool.pop();
- rect.setShape(params);
-
- creator.add(rect);
- }else{
- rect = creator.createRect(params);
- }
- if(this.opt.enableCache){
- run._rectUsePool.push(rect);
- }
- return rect;
- },
- render: function(dim, offsets){
-
-
-
-
-
-
-
-
- if(this.zoom && !this.isDataDirty()){
- return this.performZoom(dim, offsets);
- }
- var t = this.getSeriesStats();
- this.resetEvents();
- this.dirty = this.isDirty();
- if(this.dirty){
- arr.forEach(this.series, purgeGroup);
- this._eventSeries = {};
- this.cleanGroup();
- var s = this.group;
- df.forEachRev(this.series, function(item){ item.cleanGroup(s); });
- }
- var t = this.chart.theme, f, gap, width,
- ht = this._hScaler.scaler.getTransformerFromModel(this._hScaler),
- vt = this._vScaler.scaler.getTransformerFromModel(this._vScaler),
- baseline = Math.max(0, this._vScaler.bounds.lower),
- baselineHeight = vt(baseline),
- min = Math.max(0, Math.floor(this._hScaler.bounds.from - 1)), max = Math.ceil(this._hScaler.bounds.to),
- events = this.events();
- f = dc.calculateBarSize(this._hScaler.bounds.scale, this.opt);
- gap = f.gap;
- width = f.size;
- for(var i = this.series.length - 1; i >= 0; --i){
- var run = this.series[i];
- if(!this.dirty && !run.dirty){
- t.skip();
- this._reconnectEvents(run.name);
- continue;
- }
- run.cleanGroup();
- if(this.opt.enableCache){
- run._rectFreePool = (run._rectFreePool?run._rectFreePool:[]).concat(run._rectUsePool?run._rectUsePool:[]);
- run._rectUsePool = [];
- }
- var theme = t.next("column", [this.opt, run]), s = run.group,
- eventSeries = new Array(run.data.length);
- var l = Math.min(run.data.length, max);
- for(var j = min; j < l; ++j){
- var value = run.data[j];
- if(value !== null){
- var v = typeof value == "number" ? value : value.y,
- vv = vt(v),
- height = vv - baselineHeight,
- h = Math.abs(height),
- finalTheme = typeof value != "number" ?
- t.addMixin(theme, "column", value, true) :
- t.post(theme, "column");
- if(width >= 1 && h >= 0){
- var rect = {
- x: offsets.l + ht(j + 0.5) + gap,
- y: dim.height - offsets.b - (v > baseline ? vv : baselineHeight),
- width: width, height: h
- };
- var specialFill = this._plotFill(finalTheme.series.fill, dim, offsets);
- specialFill = this._shapeFill(specialFill, rect);
- var shape = this.createRect(run, s, rect).setFill(specialFill).setStroke(finalTheme.series.stroke);
- run.dyn.fill = shape.getFill();
- run.dyn.stroke = shape.getStroke();
- if(events){
- var o = {
- element: "column",
- index: j,
- run: run,
- shape: shape,
- x: j + 0.5,
- y: v
- };
- this._connectEvents(o);
- eventSeries[j] = o;
- }
- if(this.animate){
- this._animateColumn(shape, dim.height - offsets.b - baselineHeight, h);
- }
- }
- }
- }
- this._eventSeries[run.name] = eventSeries;
- run.dirty = false;
- }
- this.dirty = false;
- return this;
- },
- _animateColumn: function(shape, voffset, vsize){
- fx.animateTransform(lang.delegate({
- shape: shape,
- duration: 1200,
- transform: [
- {name: "translate", start: [0, voffset - (voffset/vsize)], end: [0, 0]},
- {name: "scale", start: [1, 1/vsize], end: [1, 1]},
- {name: "original"}
- ]
- }, this.animate)).play();
- }
- });
- });
- },
- 'dijit/place':function(){
- define("dijit/place", [
- "dojo/_base/array",
- "dojo/dom-geometry",
- "dojo/dom-style",
- "dojo/_base/kernel",
- "dojo/_base/window",
- "./Viewport",
- "."
- ], function(array, domGeometry, domStyle, kernel, win, Viewport, dijit){
-
-
-
-
- function _place(/*DomNode*/ node, choices, layoutNode, aroundNodeCoords){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var view = Viewport.getEffectiveBox(node.ownerDocument);
-
-
-
- if(!node.parentNode || String(node.parentNode.tagName).toLowerCase() != "body"){
- win.body().appendChild(node);
- }
- var best = null;
- array.some(choices, function(choice){
- var corner = choice.corner;
- var pos = choice.pos;
- var overflow = 0;
-
- var spaceAvailable = {
- w: {
- 'L': view.l + view.w - pos.x,
- 'R': pos.x - view.l,
- 'M': view.w
- }[corner.charAt(1)],
- h: {
- 'T': view.t + view.h - pos.y,
- 'B': pos.y - view.t,
- 'M': view.h
- }[corner.charAt(0)]
- };
-
-
- var s = node.style;
- s.left = s.right = "auto";
-
-
-
- if(layoutNode){
- var res = layoutNode(node, choice.aroundCorner, corner, spaceAvailable, aroundNodeCoords);
- overflow = typeof res == "undefined" ? 0 : res;
- }
-
- var style = node.style;
- var oldDisplay = style.display;
- var oldVis = style.visibility;
- if(style.display == "none"){
- style.visibility = "hidden";
- style.display = "";
- }
- var bb = domGeometry.position(node);
- style.display = oldDisplay;
- style.visibility = oldVis;
-
-
- var
- startXpos = {
- 'L': pos.x,
- 'R': pos.x - bb.w,
- 'M': Math.max(view.l, Math.min(view.l + view.w, pos.x + (bb.w >> 1)) - bb.w)
- }[corner.charAt(1)],
- startYpos = {
- 'T': pos.y,
- 'B': pos.y - bb.h,
- 'M': Math.max(view.t, Math.min(view.t + view.h, pos.y + (bb.h >> 1)) - bb.h)
- }[corner.charAt(0)],
- startX = Math.max(view.l, startXpos),
- startY = Math.max(view.t, startYpos),
- endX = Math.min(view.l + view.w, startXpos + bb.w),
- endY = Math.min(view.t + view.h, startYpos + bb.h),
- width = endX - startX,
- height = endY - startY;
- overflow += (bb.w - width) + (bb.h - height);
- if(best == null || overflow < best.overflow){
- best = {
- corner: corner,
- aroundCorner: choice.aroundCorner,
- x: startX,
- y: startY,
- w: width,
- h: height,
- overflow: overflow,
- spaceAvailable: spaceAvailable
- };
- }
- return !overflow;
- });
-
-
- if(best.overflow && layoutNode){
- layoutNode(node, best.aroundCorner, best.corner, best.spaceAvailable, aroundNodeCoords);
- }
-
-
-
-
- var s = node.style;
- s.top = best.y + "px";
- s.left = best.x + "px";
- s.right = "auto";
- return best;
- }
-
-
- return (dijit.place = {
-
-
-
- at: function(node, pos, corners, padding){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var choices = array.map(corners, function(corner){
- var c = { corner: corner, pos: {x:pos.x,y:pos.y} };
- if(padding){
- c.pos.x += corner.charAt(1) == 'L' ? padding.x : -padding.x;
- c.pos.y += corner.charAt(0) == 'T' ? padding.y : -padding.y;
- }
- return c;
- });
- return _place(node, choices);
- },
- around: function(
- /*DomNode*/ node,
- /*DomNode || dijit.place.__Rectangle*/ anchor,
- /*String[]*/ positions,
- /*Boolean*/ leftToRight,
- /*Function?*/ layoutNode){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var aroundNodePos = (typeof anchor == "string" || "offsetWidth" in anchor)
- ? domGeometry.position(anchor, true)
- : anchor;
-
- if(anchor.parentNode){
-
- var sawPosAbsolute = domStyle.getComputedStyle(anchor).position == "absolute";
- var parent = anchor.parentNode;
- while(parent && parent.nodeType == 1 && parent.nodeName != "BODY"){
- var parentPos = domGeometry.position(parent, true),
- pcs = domStyle.getComputedStyle(parent);
- if(/relative|absolute/.test(pcs.position)){
- sawPosAbsolute = false;
- }
- if(!sawPosAbsolute && /hidden|auto|scroll/.test(pcs.overflow)){
- var bottomYCoord = Math.min(aroundNodePos.y + aroundNodePos.h, parentPos.y + parentPos.h);
- var rightXCoord = Math.min(aroundNodePos.x + aroundNodePos.w, parentPos.x + parentPos.w);
- aroundNodePos.x = Math.max(aroundNodePos.x, parentPos.x);
- aroundNodePos.y = Math.max(aroundNodePos.y, parentPos.y);
- aroundNodePos.h = bottomYCoord - aroundNodePos.y;
- aroundNodePos.w = rightXCoord - aroundNodePos.x;
- }
- if(pcs.position == "absolute"){
- sawPosAbsolute = true;
- }
- parent = parent.parentNode;
- }
- }
- var x = aroundNodePos.x,
- y = aroundNodePos.y,
- width = "w" in aroundNodePos ? aroundNodePos.w : (aroundNodePos.w = aroundNodePos.width),
- height = "h" in aroundNodePos ? aroundNodePos.h : (kernel.deprecated("place.around: dijit.place.__Rectangle: { x:"+x+", y:"+y+", height:"+aroundNodePos.height+", width:"+width+" } has been deprecated. Please use { x:"+x+", y:"+y+", h:"+aroundNodePos.height+", w:"+width+" }", "", "2.0"), aroundNodePos.h = aroundNodePos.height);
-
- var choices = [];
- function push(aroundCorner, corner){
- choices.push({
- aroundCorner: aroundCorner,
- corner: corner,
- pos: {
- x: {
- 'L': x,
- 'R': x + width,
- 'M': x + (width >> 1)
- }[aroundCorner.charAt(1)],
- y: {
- 'T': y,
- 'B': y + height,
- 'M': y + (height >> 1)
- }[aroundCorner.charAt(0)]
- }
- })
- }
- array.forEach(positions, function(pos){
- var ltr = leftToRight;
- switch(pos){
- case "above-centered":
- push("TM", "BM");
- break;
- case "below-centered":
- push("BM", "TM");
- break;
- case "after-centered":
- ltr = !ltr;
-
- case "before-centered":
- push(ltr ? "ML" : "MR", ltr ? "MR" : "ML");
- break;
- case "after":
- ltr = !ltr;
-
- case "before":
- push(ltr ? "TL" : "TR", ltr ? "TR" : "TL");
- push(ltr ? "BL" : "BR", ltr ? "BR" : "BL");
- break;
- case "below-alt":
- ltr = !ltr;
-
- case "below":
-
- push(ltr ? "BL" : "BR", ltr ? "TL" : "TR");
- push(ltr ? "BR" : "BL", ltr ? "TR" : "TL");
- break;
- case "above-alt":
- ltr = !ltr;
-
- case "above":
-
- push(ltr ? "TL" : "TR", ltr ? "BL" : "BR");
- push(ltr ? "TR" : "TL", ltr ? "BR" : "BL");
- break;
- default:
-
-
- push(pos.aroundCorner, pos.corner);
- }
- });
- var position = _place(node, choices, layoutNode, {w: width, h: height});
- position.aroundNodePos = aroundNodePos;
- return position;
- }
- });
- });
- },
- 'dojox/lang/functional/array':function(){
- define("dojox/lang/functional/array", ["dojo/_base/kernel", "dojo/_base/lang", "dojo/_base/array", "dojo/_base/window", "./lambda"],
- function(dojo, lang, arr, win, df){
- var empty = {};
- lang.mixin(df, {
-
-
- filter: function(/*Array|String|Object*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
-
-
- if(typeof a == "string"){ a = a.split(""); }
- o = o || win.global; f = df.lambda(f);
- var t = [], v, i, n;
- if(lang.isArray(a)){
-
- for(i = 0, n = a.length; i < n; ++i){
- v = a[i];
- if(f.call(o, v, i, a)){ t.push(v); }
- }
- }else if(typeof a.hasNext == "function" && typeof a.next == "function"){
-
- for(i = 0; a.hasNext();){
- v = a.next();
- if(f.call(o, v, i++, a)){ t.push(v); }
- }
- }else{
-
- for(i in a){
- if(!(i in empty)){
- v = a[i];
- if(f.call(o, v, i, a)){ t.push(v); }
- }
- }
- }
- return t;
- },
- forEach: function(/*Array|String|Object*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
-
- if(typeof a == "string"){ a = a.split(""); }
- o = o || win.global; f = df.lambda(f);
- var i, n;
- if(lang.isArray(a)){
-
- for(i = 0, n = a.length; i < n; f.call(o, a[i], i, a), ++i);
- }else if(typeof a.hasNext == "function" && typeof a.next == "function"){
-
- for(i = 0; a.hasNext(); f.call(o, a.next(), i++, a));
- }else{
-
- for(i in a){
- if(!(i in empty)){
- f.call(o, a[i], i, a);
- }
- }
- }
- return o;
- },
- map: function(/*Array|String|Object*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
-
-
- if(typeof a == "string"){ a = a.split(""); }
- o = o || win.global; f = df.lambda(f);
- var t, n, i;
- if(lang.isArray(a)){
-
- t = new Array(n = a.length);
- for(i = 0; i < n; t[i] = f.call(o, a[i], i, a), ++i);
- }else if(typeof a.hasNext == "function" && typeof a.next == "function"){
-
- t = [];
- for(i = 0; a.hasNext(); t.push(f.call(o, a.next(), i++, a)));
- }else{
-
- t = [];
- for(i in a){
- if(!(i in empty)){
- t.push(f.call(o, a[i], i, a));
- }
- }
- }
- return t;
- },
- every: function(/*Array|String|Object*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
-
-
- if(typeof a == "string"){ a = a.split(""); }
- o = o || win.global; f = df.lambda(f);
- var i, n;
- if(lang.isArray(a)){
-
- for(i = 0, n = a.length; i < n; ++i){
- if(!f.call(o, a[i], i, a)){
- return false;
- }
- }
- }else if(typeof a.hasNext == "function" && typeof a.next == "function"){
-
- for(i = 0; a.hasNext();){
- if(!f.call(o, a.next(), i++, a)){
- return false;
- }
- }
- }else{
-
- for(i in a){
- if(!(i in empty)){
- if(!f.call(o, a[i], i, a)){
- return false;
- }
- }
- }
- }
- return true;
- },
- some: function(/*Array|String|Object*/ a, /*Function|String|Array*/ f, /*Object?*/ o){
-
-
- if(typeof a == "string"){ a = a.split(""); }
- o = o || win.global; f = df.lambda(f);
- var i, n;
- if(lang.isArray(a)){
-
- for(i = 0, n = a.length; i < n; ++i){
- if(f.call(o, a[i], i, a)){
- return true;
- }
- }
- }else if(typeof a.hasNext == "function" && typeof a.next == "function"){
-
- for(i = 0; a.hasNext();){
- if(f.call(o, a.next(), i++, a)){
- return true;
- }
- }
- }else{
-
- for(i in a){
- if(!(i in empty)){
- if(f.call(o, a[i], i, a)){
- return true;
- }
- }
- }
- }
- return false;
- }
- });
-
- return df;
- });
- },
- 'dojox/charting/Theme':function(){
- define("dojox/charting/Theme", ["dojo/_base/lang", "dojo/_base/array","dojo/_base/declare","dojo/_base/Color",
- "dojox/color/_base", "dojox/color/Palette", "dojox/lang/utils", "dojox/gfx/gradutils"],
- function(lang, arr, declare, Color, colorX, Palette, dlu, dgg){
-
- var Theme = declare("dojox.charting.Theme", null, {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- shapeSpaces: {shape: 1, shapeX: 1, shapeY: 1},
- constructor: function(kwArgs){
-
-
-
- kwArgs = kwArgs || {};
-
- var def = Theme.defaultTheme;
- arr.forEach(["chart", "plotarea", "axis", "series", "marker", "indicator"], function(name){
- this[name] = lang.delegate(def[name], kwArgs[name]);
- }, this);
-
- if(kwArgs.seriesThemes && kwArgs.seriesThemes.length){
- this.colors = null;
- this.seriesThemes = kwArgs.seriesThemes.slice(0);
- }else{
- this.seriesThemes = null;
- this.colors = (kwArgs.colors || Theme.defaultColors).slice(0);
- }
- this.markerThemes = null;
- if(kwArgs.markerThemes && kwArgs.markerThemes.length){
- this.markerThemes = kwArgs.markerThemes.slice(0);
- }
- this.markers = kwArgs.markers ? lang.clone(kwArgs.markers) : lang.delegate(Theme.defaultMarkers);
-
- this.noGradConv = kwArgs.noGradConv;
- this.noRadialConv = kwArgs.noRadialConv;
- if(kwArgs.reverseFills){
- this.reverseFills();
- }
-
- this._current = 0;
- this._buildMarkerArray();
- },
- clone: function(){
-
-
-
-
- var theme = new Theme({
-
- chart: this.chart,
- plotarea: this.plotarea,
- axis: this.axis,
- series: this.series,
- marker: this.marker,
-
- colors: this.colors,
- markers: this.markers,
- indicator: this.indicator,
- seriesThemes: this.seriesThemes,
- markerThemes: this.markerThemes,
-
- noGradConv: this.noGradConv,
- noRadialConv: this.noRadialConv
- });
-
- arr.forEach(
- ["clone", "clear", "next", "skip", "addMixin", "post", "getTick"],
- function(name){
- if(this.hasOwnProperty(name)){
- theme[name] = this[name];
- }
- },
- this
- );
- return theme;
- },
- clear: function(){
-
-
- this._current = 0;
- },
- next: function(elementType, mixin, doPost){
-
-
-
-
-
-
-
-
-
-
- var merge = dlu.merge, series, marker;
- if(this.colors){
- series = lang.delegate(this.series);
- marker = lang.delegate(this.marker);
- var color = new Color(this.colors[this._current % this.colors.length]), old;
-
- if(series.stroke && series.stroke.color){
- series.stroke = lang.delegate(series.stroke);
- old = new Color(series.stroke.color);
- series.stroke.color = new Color(color);
- series.stroke.color.a = old.a;
- }else{
- series.stroke = {color: color};
- }
- if(marker.stroke && marker.stroke.color){
- marker.stroke = lang.delegate(marker.stroke);
- old = new Color(marker.stroke.color);
- marker.stroke.color = new Color(color);
- marker.stroke.color.a = old.a;
- }else{
- marker.stroke = {color: color};
- }
-
- if(!series.fill || series.fill.type){
- series.fill = color;
- }else{
- old = new Color(series.fill);
- series.fill = new Color(color);
- series.fill.a = old.a;
- }
- if(!marker.fill || marker.fill.type){
- marker.fill = color;
- }else{
- old = new Color(marker.fill);
- marker.fill = new Color(color);
- marker.fill.a = old.a;
- }
- }else{
- series = this.seriesThemes ?
- merge(this.series, this.seriesThemes[this._current % this.seriesThemes.length]) :
- this.series;
- marker = this.markerThemes ?
- merge(this.marker, this.markerThemes[this._current % this.markerThemes.length]) :
- series;
- }
- var symbol = marker && marker.symbol || this._markers[this._current % this._markers.length];
- var theme = {series: series, marker: marker, symbol: symbol};
-
-
- ++this._current;
- if(mixin){
- theme = this.addMixin(theme, elementType, mixin);
- }
- if(doPost){
- theme = this.post(theme, elementType);
- }
- return theme;
- },
- skip: function(){
-
-
- ++this._current;
- },
- addMixin: function(theme, elementType, mixin, doPost){
-
-
-
-
-
-
-
-
-
-
-
-
- if(lang.isArray(mixin)){
- arr.forEach(mixin, function(m){
- theme = this.addMixin(theme, elementType, m);
- }, this);
- }else{
- var t = {};
- if("color" in mixin){
- if(elementType == "line" || elementType == "area"){
- lang.setObject("series.stroke.color", mixin.color, t);
- lang.setObject("marker.stroke.color", mixin.color, t);
- }else{
- lang.setObject("series.fill", mixin.color, t);
- }
- }
- arr.forEach(["stroke", "outline", "shadow", "fill", "font", "fontColor", "labelWiring"], function(name){
- var markerName = "marker" + name.charAt(0).toUpperCase() + name.substr(1),
- b = markerName in mixin;
- if(name in mixin){
- lang.setObject("series." + name, mixin[name], t);
- if(!b){
- lang.setObject("marker." + name, mixin[name], t);
- }
- }
- if(b){
- lang.setObject("marker." + name, mixin[markerName], t);
- }
- });
- if("marker" in mixin){
- t.symbol = mixin.marker;
- }
- theme = dlu.merge(theme, t);
- }
- if(doPost){
- theme = this.post(theme, elementType);
- }
- return theme;
- },
- post: function(theme, elementType){
-
-
-
-
-
-
-
-
- var fill = theme.series.fill, t;
- if(!this.noGradConv && this.shapeSpaces[fill.space] && fill.type == "linear"){
- if(elementType == "bar"){
-
- t = {
- x1: fill.y1,
- y1: fill.x1,
- x2: fill.y2,
- y2: fill.x2
- };
- }else if(!this.noRadialConv && fill.space == "shape" && (elementType == "slice" || elementType == "circle")){
-
- t = {
- type: "radial",
- cx: 0,
- cy: 0,
- r: 100
- };
- }
- if(t){
- return dlu.merge(theme, {series: {fill: t}});
- }
- }
- return theme;
- },
- getTick: function(name, mixin){
-
-
-
-
-
-
- var tick = this.axis.tick, tickName = name + "Tick",
- merge = dlu.merge;
- if(tick){
- if(this.axis[tickName]){
- tick = merge(tick, this.axis[tickName]);
- }
- }else{
- tick = this.axis[tickName];
- }
- if(mixin){
- if(tick){
- if(mixin[tickName]){
- tick = merge(tick, mixin[tickName]);
- }
- }else{
- tick = mixin[tickName];
- }
- }
- return tick;
- },
- inspectObjects: function(f){
- arr.forEach(["chart", "plotarea", "axis", "series", "marker", "indicator"], function(name){
- f(this[name]);
- }, this);
- if(this.seriesThemes){
- arr.forEach(this.seriesThemes, f);
- }
- if(this.markerThemes){
- arr.forEach(this.markerThemes, f);
- }
- },
- reverseFills: function(){
- this.inspectObjects(function(o){
- if(o && o.fill){
- o.fill = dgg.reverse(o.fill);
- }
- });
- },
- addMarker:function(/*String*/ name, /*String*/ segment){
-
-
-
-
- this.markers[name] = segment;
- this._buildMarkerArray();
- },
- setMarkers:function(/*Object*/ obj){
-
-
-
-
-
-
- this.markers = obj;
- this._buildMarkerArray();
- },
- _buildMarkerArray: function(){
- this._markers = [];
- for(var p in this.markers){
- this._markers.push(this.markers[p]);
- }
- }
- });
- lang.mixin(Theme, {
- defaultMarkers: {
- CIRCLE: "m-3,0 c0,-4 6,-4 6,0 m-6,0 c0,4 6,4 6,0",
- SQUARE: "m-3,-3 l0,6 6,0 0,-6 z",
- DIAMOND: "m0,-3 l3,3 -3,3 -3,-3 z",
- CROSS: "m0,-3 l0,6 m-3,-3 l6,0",
- X: "m-3,-3 l6,6 m0,-6 l-6,6",
- TRIANGLE: "m-3,3 l3,-6 3,6 z",
- TRIANGLE_INVERTED: "m-3,-3 l3,6 3,-6 z"
- },
- defaultColors:[
-
- "#54544c", "#858e94", "#6e767a", "#948585", "#474747"
- ],
- defaultTheme: {
-
- chart:{
- stroke: null,
- fill: "white",
- pageStyle: null,
- titleGap: 20,
- titlePos: "top",
- titleFont: "normal normal bold 14pt Tahoma",
- titleFontColor: "#333"
- },
- plotarea:{
- stroke: null,
- fill: "white"
- },
-
- axis:{
- stroke: {
- color: "#333",
- width: 1
- },
- tick: {
- color: "#666",
- position: "center",
- font: "normal normal normal 7pt Tahoma",
- fontColor: "#333",
- titleGap: 15,
- titleFont: "normal normal normal 11pt Tahoma",
- titleFontColor: "#333",
- titleOrientation: "axis"
- },
- majorTick: {
- width: 1,
- length: 6
- },
- minorTick: {
- width: 0.8,
- length: 3
- },
- microTick: {
- width: 0.5,
- length: 1
- }
- },
- series: {
-
- stroke: {width: 1.5, color: "#333"},
- outline: {width: 0.1, color: "#ccc"},
-
- shadow: null,
- fill: "#ccc",
- font: "normal normal normal 8pt Tahoma",
- fontColor: "#000",
- labelWiring: {width: 1, color: "#ccc"}
- },
- marker: {
- stroke: {width: 1.5, color: "#333"},
- outline: {width: 0.1, color: "#ccc"},
-
- shadow: null,
- fill: "#ccc",
- font: "normal normal normal 8pt Tahoma",
- fontColor: "#000"
- },
- indicator: {
- lineStroke: {width: 1.5, color: "#333"},
- lineOutline: {width: 0.1, color: "#ccc"},
- lineShadow: null,
- stroke: {width: 1.5, color: "#333"},
- outline: {width: 0.1, color: "#ccc"},
- shadow: null,
- fill : "#ccc",
- radius: 3,
- font: "normal normal normal 10pt Tahoma",
- fontColor: "#000",
- markerFill: "#ccc",
- markerSymbol: "m-3,0 c0,-4 6,-4 6,0 m-6,0 c0,4 6,4 6,0",
- markerStroke: {width: 1.5, color: "#333"},
- markerOutline: {width: 0.1, color: "#ccc"},
- markerShadow: null
- }
- },
- defineColors: function(kwArgs){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- kwArgs = kwArgs || {};
- var l, c = [], n = kwArgs.num || 5;
- if(kwArgs.colors){
-
- l = kwArgs.colors.length;
- for(var i = 0; i < n; i++){
- c.push(kwArgs.colors[i % l]);
- }
- return c;
- }
- if(kwArgs.hue){
-
- var s = kwArgs.saturation || 100,
- st = kwArgs.low || 30,
- end = kwArgs.high || 90;
-
- l = (end + st) / 2;
-
- return colorX.Palette.generate(
- colorX.fromHsv(kwArgs.hue, s, l), "monochromatic"
- ).colors;
- }
- if(kwArgs.generator){
-
- return colorX.Palette.generate(kwArgs.base, kwArgs.generator).colors;
- }
- return c;
- },
-
- generateGradient: function(fillPattern, colorFrom, colorTo){
- var fill = lang.delegate(fillPattern);
- fill.colors = [
- {offset: 0, color: colorFrom},
- {offset: 1, color: colorTo}
- ];
- return fill;
- },
-
- generateHslColor: function(color, luminance){
- color = new Color(color);
- var hsl = color.toHsl(),
- result = colorX.fromHsl(hsl.h, hsl.s, luminance);
- result.a = color.a;
- return result;
- },
- generateHslGradient: function(color, fillPattern, lumFrom, lumTo){
- color = new Color(color);
- var hsl = color.toHsl(),
- colorFrom = colorX.fromHsl(hsl.h, hsl.s, lumFrom),
- colorTo = colorX.fromHsl(hsl.h, hsl.s, lumTo);
- colorFrom.a = colorTo.a = color.a;
- return Theme.generateGradient(fillPattern, colorFrom, colorTo);
- }
- });
- return Theme;
- });
- },
- 'dojox/charting/themes/common':function(){
- define(["dojo/_base/lang"], function(lang){
- return lang.getObject("dojox.charting.themes", true);
- });
- },
- 'dojox/charting/plot2d/common':function(){
- define("dojox/charting/plot2d/common", ["dojo/_base/lang", "dojo/_base/array", "dojo/_base/Color",
- "dojox/gfx", "dojox/lang/functional", "../scaler/common"],
- function(lang, arr, Color, g, df, sc){
-
- var common = lang.getObject("dojox.charting.plot2d.common", true);
-
- return lang.mixin(common, {
- doIfLoaded: sc.doIfLoaded,
- makeStroke: function(stroke){
- if(!stroke){ return stroke; }
- if(typeof stroke == "string" || stroke instanceof Color){
- stroke = {color: stroke};
- }
- return g.makeParameters(g.defaultStroke, stroke);
- },
- augmentColor: function(target, color){
- var t = new Color(target),
- c = new Color(color);
- c.a = t.a;
- return c;
- },
- augmentStroke: function(stroke, color){
- var s = common.makeStroke(stroke);
- if(s){
- s.color = common.augmentColor(s.color, color);
- }
- return s;
- },
- augmentFill: function(fill, color){
- var fc, c = new Color(color);
- if(typeof fill == "string" || fill instanceof Color){
- return common.augmentColor(fill, color);
- }
- return fill;
- },
- defaultStats: {
- vmin: Number.POSITIVE_INFINITY, vmax: Number.NEGATIVE_INFINITY,
- hmin: Number.POSITIVE_INFINITY, hmax: Number.NEGATIVE_INFINITY
- },
- collectSimpleStats: function(series){
- var stats = lang.delegate(common.defaultStats);
- for(var i = 0; i < series.length; ++i){
- var run = series[i];
- for(var j = 0; j < run.data.length; j++){
- if(run.data[j] !== null){
- if(typeof run.data[j] == "number"){
-
- var old_vmin = stats.vmin, old_vmax = stats.vmax;
- if(!("ymin" in run) || !("ymax" in run)){
- arr.forEach(run.data, function(val, i){
- if(val !== null){
- var x = i + 1, y = val;
- if(isNaN(y)){ y = 0; }
- stats.hmin = Math.min(stats.hmin, x);
- stats.hmax = Math.max(stats.hmax, x);
- stats.vmin = Math.min(stats.vmin, y);
- stats.vmax = Math.max(stats.vmax, y);
- }
- });
- }
- if("ymin" in run){ stats.vmin = Math.min(old_vmin, run.ymin); }
- if("ymax" in run){ stats.vmax = Math.max(old_vmax, run.ymax); }
- }else{
-
- var old_hmin = stats.hmin, old_hmax = stats.hmax,
- old_vmin = stats.vmin, old_vmax = stats.vmax;
- if(!("xmin" in run) || !("xmax" in run) || !("ymin" in run) || !("ymax" in run)){
- arr.forEach(run.data, function(val, i){
- if(val !== null){
- var x = "x" in val ? val.x : i + 1, y = val.y;
- if(isNaN(x)){ x = 0; }
- if(isNaN(y)){ y = 0; }
- stats.hmin = Math.min(stats.hmin, x);
- stats.hmax = Math.max(stats.hmax, x);
- stats.vmin = Math.min(stats.vmin, y);
- stats.vmax = Math.max(stats.vmax, y);
- }
- });
- }
- if("xmin" in run){ stats.hmin = Math.min(old_hmin, run.xmin); }
- if("xmax" in run){ stats.hmax = Math.max(old_hmax, run.xmax); }
- if("ymin" in run){ stats.vmin = Math.min(old_vmin, run.ymin); }
- if("ymax" in run){ stats.vmax = Math.max(old_vmax, run.ymax); }
- }
- break;
- }
- }
- }
- return stats;
- },
- calculateBarSize: function(/* Number */ availableSize, /* Object */ opt, /* Number? */ clusterSize){
- if(!clusterSize){
- clusterSize = 1;
- }
- var gap = opt.gap, size = (availableSize - 2 * gap) / clusterSize;
- if("minBarSize" in opt){
- size = Math.max(size, opt.minBarSize);
- }
- if("maxBarSize" in opt){
- size = Math.min(size, opt.maxBarSize);
- }
- size = Math.max(size, 1);
- gap = (availableSize - size * clusterSize) / 2;
- return {size: size, gap: gap};
- },
- collectStackedStats: function(series){
-
- var stats = lang.clone(common.defaultStats);
- if(series.length){
-
- stats.hmin = Math.min(stats.hmin, 1);
- stats.hmax = df.foldl(series, "seed, run -> Math.max(seed, run.data.length)", stats.hmax);
-
- for(var i = 0; i < stats.hmax; ++i){
- var v = series[0].data[i];
- v = v && (typeof v == "number" ? v : v.y);
- if(isNaN(v)){ v = 0; }
- stats.vmin = Math.min(stats.vmin, v);
- for(var j = 1; j < series.length; ++j){
- var t = series[j].data[i];
- t = t && (typeof t == "number" ? t : t.y);
- if(isNaN(t)){ t = 0; }
- v += t;
- }
- stats.vmax = Math.max(stats.vmax, v);
- }
- }
- return stats;
- },
- curve: function(/* Number[] */a, /* Number|String */tension){
-
-
-
- var array = a.slice(0);
- if(tension == "x") {
- array[array.length] = arr[0];
- }
- var p=arr.map(array, function(item, i){
- if(i==0){ return "M" + item.x + "," + item.y; }
- if(!isNaN(tension)) {
- var dx=item.x-array[i-1].x, dy=array[i-1].y;
- return "C"+(item.x-(tension-1)*(dx/tension))+","+dy+" "+(item.x-(dx/tension))+","+item.y+" "+item.x+","+item.y;
- } else if(tension == "X" || tension == "x" || tension == "S") {
-
- var p0, p1 = array[i-1], p2 = array[i], p3;
- var bz1x, bz1y, bz2x, bz2y;
- var f = 1/6;
- if(i==1) {
- if(tension == "x") {
- p0 = array[array.length-2];
- } else {
- p0 = p1;
- }
- f = 1/3;
- } else {
- p0 = array[i-2];
- }
- if(i==(array.length-1)) {
- if(tension == "x") {
- p3 = array[1];
- } else {
- p3 = p2;
- }
- f = 1/3;
- } else {
- p3 = array[i+1];
- }
- var p1p2 = Math.sqrt((p2.x-p1.x)*(p2.x-p1.x)+(p2.y-p1.y)*(p2.y-p1.y));
- var p0p2 = Math.sqrt((p2.x-p0.x)*(p2.x-p0.x)+(p2.y-p0.y)*(p2.y-p0.y));
- var p1p3 = Math.sqrt((p3.x-p1.x)*(p3.x-p1.x)+(p3.y-p1.y)*(p3.y-p1.y));
- var p0p2f = p0p2 * f;
- var p1p3f = p1p3 * f;
- if(p0p2f > p1p2/2 && p1p3f > p1p2/2) {
- p0p2f = p1p2/2;
- p1p3f = p1p2/2;
- } else if(p0p2f > p1p2/2) {
- p0p2f = p1p2/2;
- p1p3f = p1p2/2 * p1p3/p0p2;
- } else if(p1p3f > p1p2/2) {
- p1p3f = p1p2/2;
- p0p2f = p1p2/2 * p0p2/p1p3;
- }
- if(tension == "S") {
- if(p0 == p1) { p0p2f = 0; }
- if(p2 == p3) { p1p3f = 0; }
- }
- bz1x = p1.x + p0p2f*(p2.x - p0.x)/p0p2;
- bz1y = p1.y + p0p2f*(p2.y - p0.y)/p0p2;
- bz2x = p2.x - p1p3f*(p3.x - p1.x)/p1p3;
- bz2y = p2.y - p1p3f*(p3.y - p1.y)/p1p3;
- }
- return "C"+(bz1x+","+bz1y+" "+bz2x+","+bz2y+" "+p2.x+","+p2.y);
- });
- return p.join(" ");
- },
-
- getLabel: function(/*Number*/number, /*Boolean*/fixed, /*Number*/precision){
- return sc.doIfLoaded("dojo/number", function(numberLib){
- return (fixed ? numberLib.format(number, {places : precision}) :
- numberLib.format(number)) || "";
- }, function(){
- return fixed ? number.toFixed(precision) : number.toString();
- });
- }
- });
- });
- },
- 'dijit/_Widget':function(){
- define("dijit/_Widget", [
- "dojo/aspect",
- "dojo/_base/config",
- "dojo/_base/connect",
- "dojo/_base/declare",
- "dojo/_base/kernel",
- "dojo/_base/lang",
- "dojo/query",
- "dojo/ready",
- "./registry",
- "./_WidgetBase",
- "./_OnDijitClickMixin",
- "./_FocusMixin",
- "dojo/uacss",
- "./hccss"
- ], function(aspect, config, connect, declare, kernel, lang, query, ready,
- registry, _WidgetBase, _OnDijitClickMixin, _FocusMixin){
- function connectToDomNode(){
-
-
-
- }
- function aroundAdvice(originalConnect){
- return function(obj, event, scope, method){
- if(obj && typeof event == "string" && obj[event] == connectToDomNode){
- return obj.on(event.substring(2).toLowerCase(), lang.hitch(scope, method));
- }
- return originalConnect.apply(connect, arguments);
- };
- }
- aspect.around(connect, "connect", aroundAdvice);
- if(kernel.connect){
- aspect.around(kernel, "connect", aroundAdvice);
- }
- var _Widget = declare("dijit._Widget", [_WidgetBase, _OnDijitClickMixin, _FocusMixin], {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- onClick: connectToDomNode,
-
- onDblClick: connectToDomNode,
-
- onKeyDown: connectToDomNode,
-
- onKeyPress: connectToDomNode,
-
- onKeyUp: connectToDomNode,
-
- onMouseDown: connectToDomNode,
-
- onMouseMove: connectToDomNode,
-
- onMouseOut: connectToDomNode,
-
- onMouseOver: connectToDomNode,
-
- onMouseLeave: connectToDomNode,
-
- onMouseEnter: connectToDomNode,
-
- onMouseUp: connectToDomNode,
-
- constructor: function(params){
-
- this._toConnect = {};
- for(var name in params){
- if(this[name] === connectToDomNode){
- this._toConnect[name.replace(/^on/, "").toLowerCase()] = params[name];
- delete params[name];
- }
- }
- },
- postCreate: function(){
- this.inherited(arguments);
-
- for(var name in this._toConnect){
- this.on(name, this._toConnect[name]);
- }
- delete this._toConnect;
- },
- on: function(/*String*/ type, /*Function*/ func){
- if(this[this._onMap(type)] === connectToDomNode){
-
-
- return connect.connect(this.domNode, type.toLowerCase(), this, func);
- }
- return this.inherited(arguments);
- },
- _setFocusedAttr: function(val){
-
-
- this._focused = val;
- this._set("focused", val);
- },
-
- setAttribute: function(/*String*/ attr, /*anything*/ value){
-
-
-
-
- kernel.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.", "", "2.0");
- this.set(attr, value);
- },
- attr: function(/*String|Object*/name, /*Object?*/value){
-
-
-
-
-
-
-
-
-
-
-
-
- if(config.isDebug){
- var alreadyCalledHash = arguments.callee._ach || (arguments.callee._ach = {}),
- caller = (arguments.callee.caller || "unknown caller").toString();
- if(!alreadyCalledHash[caller]){
- kernel.deprecated(this.declaredClass + "::attr() is deprecated. Use get() or set() instead, called from " +
- caller, "", "2.0");
- alreadyCalledHash[caller] = true;
- }
- }
- var args = arguments.length;
- if(args >= 2 || typeof name === "object"){
- return this.set.apply(this, arguments);
- }else{
- return this.get(name);
- }
- },
- getDescendants: function(){
-
-
-
-
- kernel.deprecated(this.declaredClass+"::getDescendants() is deprecated. Use getChildren() instead.", "", "2.0");
- return this.containerNode ? query('[widgetId]', this.containerNode).map(registry.byNode) : [];
- },
-
- _onShow: function(){
-
-
-
- this.onShow();
- },
- onShow: function(){
-
-
-
-
-
-
-
-
- },
- onHide: function(){
-
-
-
-
-
-
-
-
- },
- onClose: function(){
-
-
-
-
-
-
-
-
-
- return true;
- }
- });
- if(!kernel.isAsync){
- ready(0, function(){
- var requires = ["dijit/_base"];
- require(requires);
- });
- }
- return _Widget;
- });
- },
- 'dijit/_FocusMixin':function(){
- define("dijit/_FocusMixin", [
- "./focus",
- "./_WidgetBase",
- "dojo/_base/declare",
- "dojo/_base/lang"
- ], function(focus, _WidgetBase, declare, lang){
-
-
-
-
-
-
-
- lang.extend(_WidgetBase, {
-
-
-
- focused: false,
- onFocus: function(){
-
-
-
-
-
-
- },
- onBlur: function(){
-
-
-
-
-
-
-
- },
- _onFocus: function(){
-
-
-
-
-
- this.onFocus();
- },
- _onBlur: function(){
-
-
-
-
-
- this.onBlur();
- }
- });
- return declare("dijit._FocusMixin", null, {
-
-
-
-
- _focusManager: focus
- });
- });
- },
- 'dijit/_OnDijitClickMixin':function(){
- define("dijit/_OnDijitClickMixin", [
- "dojo/on",
- "dojo/_base/array",
- "dojo/keys",
- "dojo/_base/declare",
- "dojo/_base/sniff",
- "dojo/_base/unload",
- "dojo/_base/window"
- ], function(on, array, keys, declare, has, unload, win){
-
-
-
-
-
-
-
-
-
-
-
- var lastKeyDownNode = null;
- if(has("ie") < 9){
- (function(){
- var keydownCallback = function(evt){
- lastKeyDownNode = evt.srcElement;
- };
- win.doc.attachEvent('onkeydown', keydownCallback);
- unload.addOnWindowUnload(function(){
- win.doc.detachEvent('onkeydown', keydownCallback);
- });
- })();
- }else{
- win.doc.addEventListener('keydown', function(evt){
- lastKeyDownNode = evt.target;
- }, true);
- }
-
- var a11yclick = function(node, listener){
- if(/input|button/i.test(node.nodeName)){
-
- return on(node, "click", listener);
- }else{
-
-
-
-
- function clickKey(/*Event*/ e){
- return (e.keyCode == keys.ENTER || e.keyCode == keys.SPACE) &&
- !e.ctrlKey && !e.shiftKey && !e.altKey && !e.metaKey;
- }
- var handles = [
- on(node, "keypress", function(e){
-
- if(clickKey(e)){
-
- lastKeyDownNode = e.target;
-
-
-
-
- e.preventDefault();
- }
- }),
- on(node, "keyup", function(e){
-
- if(clickKey(e) && e.target == lastKeyDownNode){
-
- lastKeyDownNode = null;
- listener.call(this, e);
- }
- }),
- on(node, "click", function(e){
-
- listener.call(this, e);
- })
- ];
- return {
- remove: function(){
- array.forEach(handles, function(h){ h.remove(); });
- }
- };
- }
- };
- return declare("dijit._OnDijitClickMixin", null, {
- connect: function(
- /*Object|null*/ obj,
- /*String|Function*/ event,
- /*String|Function*/ method){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- return this.inherited(arguments, [obj, event == "ondijitclick" ? a11yclick : event, method]);
- }
- });
- });
- },
- 'dojo/cache':function(){
- define(["./_base/kernel", "./text"], function(dojo, text){
-
-
-
-
-
- return dojo.cache;
- });
- },
- 'dojox/charting/plot2d/Bars':function(){
- define("dojox/charting/plot2d/Bars", ["dojo/_base/kernel", "dojo/_base/lang", "dojo/_base/array", "dojo/_base/declare", "./Base", "./common",
- "dojox/gfx/fx", "dojox/lang/utils", "dojox/lang/functional", "dojox/lang/functional/reversed"],
- function(dojo, lang, arr, declare, Base, dc, fx, du, df, dfr){
-
-
- var purgeGroup = dfr.lambda("item.purgeGroup()");
- return declare("dojox.charting.plot2d.Bars", Base, {
-
-
- defaultParams: {
- hAxis: "x",
- vAxis: "y",
- gap: 0,
- animate: null,
- enableCache: false
- },
- optionalParams: {
- minBarSize: 1,
- maxBarSize: 1,
-
- stroke: {},
- outline: {},
- shadow: {},
- fill: {},
- font: "",
- fontColor: ""
- },
- constructor: function(chart, kwArgs){
-
-
-
-
-
-
- this.opt = lang.clone(this.defaultParams);
- du.updateWithObject(this.opt, kwArgs);
- du.updateWithPattern(this.opt, kwArgs, this.optionalParams);
- this.series = [];
- this.hAxis = this.opt.hAxis;
- this.vAxis = this.opt.vAxis;
- this.animate = this.opt.animate;
- },
- getSeriesStats: function(){
-
-
-
-
- var stats = dc.collectSimpleStats(this.series), t;
- stats.hmin -= 0.5;
- stats.hmax += 0.5;
- t = stats.hmin, stats.hmin = stats.vmin, stats.vmin = t;
- t = stats.hmax, stats.hmax = stats.vmax, stats.vmax = t;
- return stats;
- },
-
- createRect: function(run, creator, params){
- var rect;
- if(this.opt.enableCache && run._rectFreePool.length > 0){
- rect = run._rectFreePool.pop();
- rect.setShape(params);
-
- creator.add(rect);
- }else{
- rect = creator.createRect(params);
- }
- if(this.opt.enableCache){
- run._rectUsePool.push(rect);
- }
- return rect;
- },
- render: function(dim, offsets){
-
-
-
-
-
-
-
-
- if(this.zoom && !this.isDataDirty()){
- return this.performZoom(dim, offsets);
- }
- this.dirty = this.isDirty();
- this.resetEvents();
- if(this.dirty){
- arr.forEach(this.series, purgeGroup);
- this._eventSeries = {};
- this.cleanGroup();
- var s = this.group;
- df.forEachRev(this.series, function(item){ item.cleanGroup(s); });
- }
- var t = this.chart.theme, f, gap, height,
- ht = this._hScaler.scaler.getTransformerFromModel(this._hScaler),
- vt = this._vScaler.scaler.getTransformerFromModel(this._vScaler),
- baseline = Math.max(0, this._hScaler.bounds.lower),
- baselineWidth = ht(baseline),
- events = this.events();
- f = dc.calculateBarSize(this._vScaler.bounds.scale, this.opt);
- gap = f.gap;
- height = f.size;
- for(var i = this.series.length - 1; i >= 0; --i){
- var run = this.series[i];
- if(!this.dirty && !run.dirty){
- t.skip();
- this._reconnectEvents(run.name);
- continue;
- }
- run.cleanGroup();
- if(this.opt.enableCache){
- run._rectFreePool = (run._rectFreePool?run._rectFreePool:[]).concat(run._rectUsePool?run._rectUsePool:[]);
- run._rectUsePool = [];
- }
- var theme = t.next("bar", [this.opt, run]), s = run.group,
- eventSeries = new Array(run.data.length);
- for(var j = 0; j < run.data.length; ++j){
- var value = run.data[j];
- if(value !== null){
- var v = typeof value == "number" ? value : value.y,
- hv = ht(v),
- width = hv - baselineWidth,
- w = Math.abs(width),
- finalTheme = typeof value != "number" ?
- t.addMixin(theme, "bar", value, true) :
- t.post(theme, "bar");
- if(w >= 0 && height >= 1){
- var rect = {
- x: offsets.l + (v < baseline ? hv : baselineWidth),
- y: dim.height - offsets.b - vt(j + 1.5) + gap,
- width: w, height: height
- };
- var specialFill = this._plotFill(finalTheme.series.fill, dim, offsets);
- specialFill = this._shapeFill(specialFill, rect);
- var shape = this.createRect(run, s, rect).setFill(specialFill).setStroke(finalTheme.series.stroke);
- run.dyn.fill = shape.getFill();
- run.dyn.stroke = shape.getStroke();
- if(events){
- var o = {
- element: "bar",
- index: j,
- run: run,
- shape: shape,
- x: v,
- y: j + 1.5
- };
- this._connectEvents(o);
- eventSeries[j] = o;
- }
- if(this.animate){
- this._animateBar(shape, offsets.l + baselineWidth, -w);
- }
- }
- }
- }
- this._eventSeries[run.name] = eventSeries;
- run.dirty = false;
- }
- this.dirty = false;
- return this;
- },
- _animateBar: function(shape, hoffset, hsize){
- fx.animateTransform(lang.delegate({
- shape: shape,
- duration: 1200,
- transform: [
- {name: "translate", start: [hoffset - (hoffset/hsize), 0], end: [0, 0]},
- {name: "scale", start: [1/hsize, 1], end: [1, 1]},
- {name: "original"}
- ]
- }, this.animate)).play();
- }
- });
- });
- },
- 'dojox/gfx/_base':function(){
- define("dojox/gfx/_base", ["dojo/_base/lang", "dojo/_base/html", "dojo/_base/Color", "dojo/_base/sniff", "dojo/_base/window",
- "dojo/_base/array","dojo/dom", "dojo/dom-construct","dojo/dom-geometry"],
- function(lang, html, Color, has, win, arr, dom, domConstruct, domGeom){
-
-
-
-
- var g = lang.getObject("dojox.gfx", true),
- b = g._base = {};
-
-
-
- g._hasClass = function(/*DomNode*/node, /*String*/classStr){
-
-
-
-
- var cls = node.getAttribute("className");
- return cls && (" " + cls + " ").indexOf(" " + classStr + " ") >= 0;
- };
- g._addClass = function(/*DomNode*/node, /*String*/classStr){
-
-
-
- var cls = node.getAttribute("className") || "";
- if(!cls || (" " + cls + " ").indexOf(" " + classStr + " ") < 0){
- node.setAttribute("className", cls + (cls ? " " : "") + classStr);
- }
- };
- g._removeClass = function(/*DomNode*/node, /*String*/classStr){
-
- var cls = node.getAttribute("className");
- if(cls){
- node.setAttribute(
- "className",
- cls.replace(new RegExp('(^|\\s+)' + classStr + '(\\s+|$)'), "$1$2")
- );
- }
- };
-
-
- b._getFontMeasurements = function(){
-
-
-
- var heights = {
- '1em': 0, '1ex': 0, '100%': 0, '12pt': 0, '16px': 0, 'xx-small': 0,
- 'x-small': 0, 'small': 0, 'medium': 0, 'large': 0, 'x-large': 0,
- 'xx-large': 0
- };
- var p;
- if(has("ie")){
-
-
- win.doc.documentElement.style.fontSize="100%";
- }
-
- var div = domConstruct.create("div", {style: {
- position: "absolute",
- left: "0",
- top: "-100px",
- width: "30px",
- height: "1000em",
- borderWidth: "0",
- margin: "0",
- padding: "0",
- outline: "none",
- lineHeight: "1",
- overflow: "hidden"
- }}, win.body());
-
- for(p in heights){
- div.style.fontSize = p;
- heights[p] = Math.round(div.offsetHeight * 12/16) * 16/12 / 1000;
- }
- win.body().removeChild(div);
- return heights;
- };
- var fontMeasurements = null;
- b._getCachedFontMeasurements = function(recalculate){
- if(recalculate || !fontMeasurements){
- fontMeasurements = b._getFontMeasurements();
- }
- return fontMeasurements;
- };
-
- var measuringNode = null, empty = {};
- b._getTextBox = function( /*String*/ text,
- /*Object*/ style,
- /*String?*/ className){
- var m, s, al = arguments.length;
- var i;
- if(!measuringNode){
- measuringNode = domConstruct.create("div", {style: {
- position: "absolute",
- top: "-10000px",
- left: "0"
- }}, win.body());
- }
- m = measuringNode;
-
- m.className = "";
- s = m.style;
- s.borderWidth = "0";
- s.margin = "0";
- s.padding = "0";
- s.outline = "0";
-
- if(al > 1 && style){
- for(i in style){
- if(i in empty){ continue; }
- s[i] = style[i];
- }
- }
-
- if(al > 2 && className){
- m.className = className;
- }
-
- m.innerHTML = text;
- if(m["getBoundingClientRect"]){
- var bcr = m.getBoundingClientRect();
- return {l: bcr.left, t: bcr.top, w: bcr.width || (bcr.right - bcr.left), h: bcr.height || (bcr.bottom - bcr.top)};
- }else{
- return domGeom.getMarginBox(m);
- }
- };
-
- var uniqueId = 0;
- b._getUniqueId = function(){
-
- var id;
- do{
- id = dojo._scopeName + "xUnique" + (++uniqueId);
- }while(dom.byId(id));
- return id;
- };
- lang.mixin(g, {
-
-
-
- defaultPath: {
-
-
- type: "path",
-
-
- path: ""
-
-
-
- },
- defaultPolyline: {
-
-
- type: "polyline",
-
-
- points: []
-
-
- },
- defaultRect: {
-
-
- type: "rect",
-
-
- x: 0,
-
-
- y: 0,
-
-
- width: 100,
-
-
- height: 100,
-
-
- r: 0
-
-
- },
- defaultEllipse: {
-
-
- type: "ellipse",
-
-
- cx: 0,
-
-
- cy: 0,
-
-
- rx: 200,
-
-
- ry: 100
-
-
- },
- defaultCircle: {
-
-
- type: "circle",
-
-
- cx: 0,
-
-
- cy: 0,
-
-
- r: 100
-
-
- },
- defaultLine: {
-
-
- type: "line",
-
-
- x1: 0,
-
-
- y1: 0,
-
-
- x2: 100,
-
-
- y2: 100
-
-
- },
- defaultImage: {
-
-
- type: "image",
-
-
- x: 0,
-
-
- y: 0,
-
-
- width: 0,
-
-
- height: 0,
-
-
- src: ""
-
-
- },
- defaultText: {
-
-
- type: "text",
-
-
- x: 0,
-
-
- y: 0,
-
-
- text: "",
-
-
- align: "start",
-
-
- decoration: "none",
-
-
- rotated: false,
-
-
- kerning: true
-
-
- },
- defaultTextPath: {
-
-
- type: "textpath",
-
-
- text: "",
-
-
- align: "start",
-
-
- decoration: "none",
-
-
- rotated: false,
-
-
- kerning: true
-
-
- },
-
- defaultStroke: {
-
-
-
- type: "stroke",
-
-
- color: "black",
-
-
- style: "solid",
-
-
- width: 1,
-
-
- cap: "butt",
-
-
- join: 4
-
-
- },
- defaultLinearGradient: {
-
-
-
- type: "linear",
-
-
- x1: 0,
-
-
- y1: 0,
-
-
- x2: 100,
-
-
- y2: 100,
-
-
- colors: [
- { offset: 0, color: "black" }, { offset: 1, color: "white" }
- ]
-
-
-
-
- },
- defaultRadialGradient: {
-
-
- type: "radial",
-
-
- cx: 0,
-
-
- cy: 0,
-
-
- r: 100,
-
-
- colors: [
- { offset: 0, color: "black" }, { offset: 1, color: "white" }
- ]
-
-
-
-
- },
- defaultPattern: {
-
-
- type: "pattern",
-
-
- x: 0,
-
-
- y: 0,
-
-
- width: 0,
-
-
- height: 0,
-
-
- src: ""
-
-
- },
- defaultFont: {
-
-
- type: "font",
-
-
- style: "normal",
-
-
- variant: "normal",
-
-
- weight: "normal",
-
-
- size: "10pt",
-
-
- family: "serif"
-
-
- },
- getDefault: (function(){
-
-
- var typeCtorCache = {};
-
- return function(/*String*/ type){
- var t = typeCtorCache[type];
- if(t){
- return new t();
- }
- t = typeCtorCache[type] = new Function();
- t.prototype = g[ "default" + type ];
- return new t();
- }
- })(),
- normalizeColor: function(/*dojo.Color|Array|string|Object*/ color){
-
-
-
- return (color instanceof Color) ? color : new Color(color);
- },
- normalizeParameters: function(existed, update){
-
-
-
-
-
-
-
-
- var x;
- if(update){
- var empty = {};
- for(x in existed){
- if(x in update && !(x in empty)){
- existed[x] = update[x];
- }
- }
- }
- return existed;
- },
- makeParameters: function(defaults, update){
-
-
-
-
-
-
-
- var i = null;
- if(!update){
-
- return lang.delegate(defaults);
- }
- var result = {};
- for(i in defaults){
- if(!(i in result)){
- result[i] = lang.clone((i in update) ? update[i] : defaults[i]);
- }
- }
- return result;
- },
- formatNumber: function(x, addSpace){
-
-
-
-
-
- var val = x.toString();
- if(val.indexOf("e") >= 0){
- val = x.toFixed(4);
- }else{
- var point = val.indexOf(".");
- if(point >= 0 && val.length - point > 5){
- val = x.toFixed(4);
- }
- }
- if(x < 0){
- return val;
- }
- return addSpace ? " " + val : val;
- },
-
- makeFontString: function(font){
-
-
- return font.style + " " + font.variant + " " + font.weight + " " + font.size + " " + font.family;
- },
- splitFontString: function(str){
-
-
-
-
-
-
-
-
-
-
- var font = g.getDefault("Font");
- var t = str.split(/\s+/);
- do{
- if(t.length < 5){ break; }
- font.style = t[0];
- font.variant = t[1];
- font.weight = t[2];
- var i = t[3].indexOf("/");
- font.size = i < 0 ? t[3] : t[3].substring(0, i);
- var j = 4;
- if(i < 0){
- if(t[4] == "/"){
- j = 6;
- }else if(t[4].charAt(0) == "/"){
- j = 5;
- }
- }
- if(j < t.length){
- font.family = t.slice(j).join(" ");
- }
- }while(false);
- return font;
- },
-
- cm_in_pt: 72 / 2.54,
-
-
- mm_in_pt: 7.2 / 2.54,
-
-
- px_in_pt: function(){
-
- return g._base._getCachedFontMeasurements()["12pt"] / 12;
- },
- pt2px: function(len){
-
-
-
- return len * g.px_in_pt();
- },
- px2pt: function(len){
-
-
-
- return len / g.px_in_pt();
- },
- normalizedLength: function(len) {
-
-
-
- if(len.length === 0){ return 0; }
- if(len.length > 2){
- var px_in_pt = g.px_in_pt();
- var val = parseFloat(len);
- switch(len.slice(-2)){
- case "px": return val;
- case "pt": return val * px_in_pt;
- case "in": return val * 72 * px_in_pt;
- case "pc": return val * 12 * px_in_pt;
- case "mm": return val * g.mm_in_pt * px_in_pt;
- case "cm": return val * g.cm_in_pt * px_in_pt;
- }
- }
- return parseFloat(len);
- },
- pathVmlRegExp: /([A-Za-z]+)|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,
-
-
- pathSvgRegExp: /([A-Za-z])|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,
-
-
- equalSources: function(a /*Object*/, b /*Object*/){
-
-
-
- return a && b && a === b;
- },
- switchTo: function(renderer/*String|Object*/){
-
-
-
-
- var ns = typeof renderer == "string" ? g[renderer] : renderer;
- if(ns){
- arr.forEach(["Group", "Rect", "Ellipse", "Circle", "Line",
- "Polyline", "Image", "Text", "Path", "TextPath",
- "Surface", "createSurface", "fixTarget"], function(name){
- g[name] = ns[name];
- });
- }
- }
- });
- return g;
- });
- },
- 'dijit/focus':function(){
- define("dijit/focus", [
- "dojo/aspect",
- "dojo/_base/declare",
- "dojo/dom",
- "dojo/dom-attr",
- "dojo/dom-construct",
- "dojo/Evented",
- "dojo/_base/lang",
- "dojo/on",
- "dojo/domReady",
- "dojo/_base/sniff",
- "dojo/Stateful",
- "dojo/_base/window",
- "dojo/window",
- "./a11y",
- "./registry",
- "./main"
- ], function(aspect, declare, dom, domAttr, domConstruct, Evented, lang, on, domReady, has, Stateful, win, winUtils,
- a11y, registry, dijit){
-
-
- var FocusManager = declare([Stateful, Evented], {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- curNode: null,
-
-
- activeStack: [],
- constructor: function(){
-
- var check = lang.hitch(this, function(node){
- if(dom.isDescendant(this.curNode, node)){
- this.set("curNode", null);
- }
- if(dom.isDescendant(this.prevNode, node)){
- this.set("prevNode", null);
- }
- });
- aspect.before(domConstruct, "empty", check);
- aspect.before(domConstruct, "destroy", check);
- },
- registerIframe: function(/*DomNode*/ iframe){
-
-
-
-
-
-
-
-
- return this.registerWin(iframe.contentWindow, iframe);
- },
- registerWin: function(/*Window?*/targetWindow, /*DomNode?*/ effectiveNode){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var _this = this,
- body = targetWindow.document && targetWindow.document.body;
- if(body){
- var mdh = on(body, 'mousedown', function(evt){
- _this._justMouseDowned = true;
-
-
-
- setTimeout(function(){ _this._justMouseDowned = false; }, 13);
-
-
-
- if(evt && evt.target && evt.target.parentNode == null){
- return;
- }
- _this._onTouchNode(effectiveNode || evt.target, "mouse");
- });
- var fih = on(body, 'focusin', function(evt){
-
- if(!evt.target.tagName) { return; }
-
-
- var tag = evt.target.tagName.toLowerCase();
- if(tag == "#document" || tag == "body"){ return; }
- if(a11y.isTabNavigable(evt.target)){
-
-
- _this._onFocusNode(effectiveNode || evt.target);
- }else{
-
-
-
- _this._onTouchNode(effectiveNode || evt.target);
- }
- });
- var foh = on(body, 'focusout', function(evt){
- _this._onBlurNode(effectiveNode || evt.target);
- });
- return {
- remove: function(){
- mdh.remove();
- fih.remove();
- foh.remove();
- mdh = fih = foh = null;
- body = null;
- }
- };
- }
- },
- _onBlurNode: function(/*DomNode*/ node){
-
-
-
-
-
-
-
- if(this._clearFocusTimer){
- clearTimeout(this._clearFocusTimer);
- }
- this._clearFocusTimer = setTimeout(lang.hitch(this, function(){
- this.set("prevNode", this.curNode);
- this.set("curNode", null);
- }), 0);
- if(this._justMouseDowned){
-
-
- return;
- }
-
- if(this._clearActiveWidgetsTimer){
- clearTimeout(this._clearActiveWidgetsTimer);
- }
- this._clearActiveWidgetsTimer = setTimeout(lang.hitch(this, function(){
- delete this._clearActiveWidgetsTimer;
- this._setStack([]);
- }), 100);
- },
- _onTouchNode: function(/*DomNode*/ node, /*String*/ by){
-
-
-
-
-
-
-
- if(this._clearActiveWidgetsTimer){
- clearTimeout(this._clearActiveWidgetsTimer);
- delete this._clearActiveWidgetsTimer;
- }
-
- var newStack=[];
- try{
- while(node){
- var popupParent = domAttr.get(node, "dijitPopupParent");
- if(popupParent){
- node=registry.byId(popupParent).domNode;
- }else if(node.tagName && node.tagName.toLowerCase() == "body"){
-
- if(node === win.body()){
-
- break;
- }
-
-
- node=winUtils.get(node.ownerDocument).frameElement;
- }else{
-
-
-
- var id = node.getAttribute && node.getAttribute("widgetId"),
- widget = id && registry.byId(id);
- if(widget && !(by == "mouse" && widget.get("disabled"))){
- newStack.unshift(id);
- }
- node=node.parentNode;
- }
- }
- }catch(e){ }
- this._setStack(newStack, by);
- },
- _onFocusNode: function(/*DomNode*/ node){
-
-
- if(!node){
- return;
- }
- if(node.nodeType == 9){
-
-
-
- return;
- }
-
-
- if(this._clearFocusTimer){
- clearTimeout(this._clearFocusTimer);
- delete this._clearFocusTimer;
- }
- this._onTouchNode(node);
- if(node == this.curNode){ return; }
- this.set("prevNode", this.curNode);
- this.set("curNode", node);
- },
- _setStack: function(/*String[]*/ newStack, /*String*/ by){
-
-
-
-
-
-
- var oldStack = this.activeStack, lastOldIdx = oldStack.length - 1, lastNewIdx = newStack.length - 1;
- if(newStack[lastNewIdx] == oldStack[lastOldIdx]){
-
- return;
- }
- this.set("activeStack", newStack);
- var widget, i;
-
- for(i = lastOldIdx; i >= 0 && oldStack[i] != newStack[i]; i--){
- widget = registry.byId(oldStack[i]);
- if(widget){
- widget._hasBeenBlurred = true;
- widget.set("focused", false);
- if(widget._focusManager == this){
- widget._onBlur(by);
- }
- this.emit("widget-blur", widget, by);
- }
- }
-
- for(i++; i <= lastNewIdx; i++){
- widget = registry.byId(newStack[i]);
- if(widget){
- widget.set("focused", true);
- if(widget._focusManager == this){
- widget._onFocus(by);
- }
- this.emit("widget-focus", widget, by);
- }
- }
- },
- focus: function(node){
-
-
- if(node){
- try{ node.focus(); }catch(e){}
- }
- }
- });
- var singleton = new FocusManager();
-
- domReady(function(){
- var handle = singleton.registerWin(winUtils.get(document));
- if(has("ie")){
- on(window, "unload", function(){
- if(handle){
- handle.remove();
- handle = null;
- }
- });
- }
- });
-
-
- dijit.focus = function(node){
- singleton.focus(node);
- };
- for(var attr in singleton){
- if(!/^_/.test(attr)){
- dijit.focus[attr] = typeof singleton[attr] == "function" ? lang.hitch(singleton, attr) : singleton[attr];
- }
- }
- singleton.watch(function(attr, oldVal, newVal){
- dijit.focus[attr] = newVal;
- });
- return singleton;
- });
- },
- 'dojox/charting/widget/Legend':function(){
- define("dojox/charting/widget/Legend", ["dojo/_base/lang", "dojo/_base/html", "dojo/_base/declare", "dijit/_Widget", "dojox/gfx","dojo/_base/array",
- "dojox/lang/functional", "dojox/lang/functional/array", "dojox/lang/functional/fold",
- "dojo/dom", "dojo/dom-construct", "dojo/dom-class","dijit/_base/manager"],
- function(lang, html, declare, Widget, gfx, arrayUtil, df, dfa, dff,
- dom, domFactory, domClass, widgetManager){
- var REVERSED_SERIES = /\.(StackedColumns|StackedAreas|ClusteredBars)$/;
- return declare("dojox.charting.widget.Legend", Widget, {
-
-
-
-
-
-
-
-
-
-
-
-
- chartRef: "",
- horizontal: true,
- swatchSize: 18,
- legendBody: null,
- postCreate: function(){
- if(!this.chart){
- if(!this.chartRef){ return; }
- this.chart = widgetManager.byId(this.chartRef);
- if(!this.chart){
- var node = dom.byId(this.chartRef);
- if(node){
- this.chart = widgetManager.byNode(node);
- }else{
- console.log("Could not find chart instance with id: " + this.chartRef);
- return;
- }
- }
- this.series = this.chart.chart.series;
- }else{
- this.series = this.chart.series;
- }
- this.refresh();
- },
- buildRendering: function(){
- this.domNode = domFactory.create("table",
- {role: "group", "aria-label": "chart legend", "class": "dojoxLegendNode"});
- this.legendBody = domFactory.create("tbody", null, this.domNode);
- this.inherited(arguments);
- },
- destroy: function(){
- if(this._surfaces){
- arrayUtil.forEach(this._surfaces, function(surface){
- surface.destroy();
- });
- }
- this.inherited(arguments);
- },
- refresh: function(){
-
-
- if(this._surfaces){
- arrayUtil.forEach(this._surfaces, function(surface){
- surface.destroy();
- });
- }
- this._surfaces = [];
- while(this.legendBody.lastChild){
- domFactory.destroy(this.legendBody.lastChild);
- }
- if(this.horizontal){
- domClass.add(this.domNode, "dojoxLegendHorizontal");
-
- this._tr = domFactory.create("tr", null, this.legendBody);
- this._inrow = 0;
- }
- var s = this.series;
- if(s.length == 0){
- return;
- }
- if(s[0].chart.stack[0].declaredClass == "dojox.charting.plot2d.Pie"){
- var t = s[0].chart.stack[0];
- if(typeof t.run.data[0] == "number"){
- var filteredRun = df.map(t.run.data, "Math.max(x, 0)");
- if(df.every(filteredRun, "<= 0")){
- return;
- }
- var slices = df.map(filteredRun, "/this", df.foldl(filteredRun, "+", 0));
- arrayUtil.forEach(slices, function(x, i){
- this._addLabel(t.dyn[i], t._getLabel(x * 100) + "%");
- }, this);
- }else{
- arrayUtil.forEach(t.run.data, function(x, i){
- this._addLabel(t.dyn[i], x.legend || x.text || x.y);
- }, this);
- }
- }else{
- if(this._isReversal()){
- s = s.slice(0).reverse();
- }
- arrayUtil.forEach(s, function(x){
- this._addLabel(x.dyn, x.legend || x.name);
- }, this);
- }
- },
- _addLabel: function(dyn, label){
-
- var wrapper = domFactory.create("td"),
- icon = domFactory.create("div", null, wrapper),
- text = domFactory.create("label", null, wrapper),
- div = domFactory.create("div", {
- style: {
- "width": this.swatchSize + "px",
- "height":this.swatchSize + "px",
- "float": "left"
- }
- }, icon);
- domClass.add(icon, "dojoxLegendIcon dijitInline");
- domClass.add(text, "dojoxLegendText");
-
- if(this._tr){
-
- this._tr.appendChild(wrapper);
- if(++this._inrow === this.horizontal){
-
- this._tr = domFactory.create("tr", null, this.legendBody);
- this._inrow = 0;
- }
- }else{
-
- var tr = domFactory.create("tr", null, this.legendBody);
- tr.appendChild(wrapper);
- }
-
- this._makeIcon(div, dyn);
- text.innerHTML = String(label);
- text.dir = this.getTextDir(label, text.dir);
- },
- _makeIcon: function(div, dyn){
- var mb = { h: this.swatchSize, w: this.swatchSize };
- var surface = gfx.createSurface(div, mb.w, mb.h);
- this._surfaces.push(surface);
- if(dyn.fill){
-
- surface.createRect({x: 2, y: 2, width: mb.w - 4, height: mb.h - 4}).
- setFill(dyn.fill).setStroke(dyn.stroke);
- }else if(dyn.stroke || dyn.marker){
-
- var line = {x1: 0, y1: mb.h / 2, x2: mb.w, y2: mb.h / 2};
- if(dyn.stroke){
- surface.createLine(line).setStroke(dyn.stroke);
- }
- if(dyn.marker){
-
- var c = {x: mb.w / 2, y: mb.h / 2};
- if(dyn.stroke){
- surface.createPath({path: "M" + c.x + " " + c.y + " " + dyn.marker}).
- setFill(dyn.stroke.color).setStroke(dyn.stroke);
- }else{
- surface.createPath({path: "M" + c.x + " " + c.y + " " + dyn.marker}).
- setFill(dyn.color).setStroke(dyn.color);
- }
- }
- }else{
-
- surface.createRect({x: 2, y: 2, width: mb.w - 4, height: mb.h - 4}).
- setStroke("black");
- surface.createLine({x1: 2, y1: 2, x2: mb.w - 2, y2: mb.h - 2}).setStroke("black");
- surface.createLine({x1: 2, y1: mb.h - 2, x2: mb.w - 2, y2: 2}).setStroke("black");
- }
- },
- _isReversal: function(){
- return (!this.horizontal) && arrayUtil.some(this.chart.stack, function(item){
- return REVERSED_SERIES.test(item.declaredClass);
- });
- }
- });
- });
- },
- 'dojox/charting/plot2d/StackedLines':function(){
- define("dojox/charting/plot2d/StackedLines", ["dojo/_base/declare", "./Stacked"], function(declare, Stacked){
- return declare("dojox.charting.plot2d.StackedLines", Stacked, {
-
-
- constructor: function(){
-
-
- this.opt.lines = true;
- }
- });
- });
- },
- 'dojox/charting/plot2d/StackedColumns':function(){
- define("dojox/charting/plot2d/StackedColumns", ["dojo/_base/lang", "dojo/_base/array", "dojo/_base/declare", "./Columns", "./common",
- "dojox/lang/functional", "dojox/lang/functional/reversed", "dojox/lang/functional/sequence"],
- function(lang, arr, declare, Columns, dc, df, dfr, dfs){
- var purgeGroup = dfr.lambda("item.purgeGroup()");
- return declare("dojox.charting.plot2d.StackedColumns", Columns, {
-
-
- getSeriesStats: function(){
-
-
-
-
- var stats = dc.collectStackedStats(this.series);
- this._maxRunLength = stats.hmax;
- stats.hmin -= 0.5;
- stats.hmax += 0.5;
- return stats;
- },
- render: function(dim, offsets){
-
-
-
-
-
-
-
-
- if(this._maxRunLength <= 0){
- return this;
- }
-
- var acc = df.repeat(this._maxRunLength, "-> 0", 0);
- for(var i = 0; i < this.series.length; ++i){
- var run = this.series[i];
- for(var j = 0; j < run.data.length; ++j){
- var value = run.data[j];
- if(value !== null){
- var v = typeof value == "number" ? value : value.y;
- if(isNaN(v)){ v = 0; }
- acc[j] += v;
- }
- }
- }
-
- if(this.zoom && !this.isDataDirty()){
- return this.performZoom(dim, offsets);
- }
- this.resetEvents();
- this.dirty = this.isDirty();
- if(this.dirty){
- arr.forEach(this.series, purgeGroup);
- this._eventSeries = {};
- this.cleanGroup();
- var s = this.group;
- df.forEachRev(this.series, function(item){ item.cleanGroup(s); });
- }
- var t = this.chart.theme, f, gap, width,
- ht = this._hScaler.scaler.getTransformerFromModel(this._hScaler),
- vt = this._vScaler.scaler.getTransformerFromModel(this._vScaler),
- events = this.events();
- f = dc.calculateBarSize(this._hScaler.bounds.scale, this.opt);
- gap = f.gap;
- width = f.size;
- for(var i = this.series.length - 1; i >= 0; --i){
- var run = this.series[i];
- if(!this.dirty && !run.dirty){
- t.skip();
- this._reconnectEvents(run.name);
- continue;
- }
- run.cleanGroup();
- var theme = t.next("column", [this.opt, run]), s = run.group,
- eventSeries = new Array(acc.length);
- for(var j = 0; j < acc.length; ++j){
- var value = run.data[j];
- if(value !== null){
- var v = acc[j],
- height = vt(v),
- finalTheme = typeof value != "number" ?
- t.addMixin(theme, "column", value, true) :
- t.post(theme, "column");
- if(width >= 1 && height >= 0){
- var rect = {
- x: offsets.l + ht(j + 0.5) + gap,
- y: dim.height - offsets.b - vt(v),
- width: width, height: height
- };
- var specialFill = this._plotFill(finalTheme.series.fill, dim, offsets);
- specialFill = this._shapeFill(specialFill, rect);
- var shape = s.createRect(rect).setFill(specialFill).setStroke(finalTheme.series.stroke);
- run.dyn.fill = shape.getFill();
- run.dyn.stroke = shape.getStroke();
- if(events){
- var o = {
- element: "column",
- index: j,
- run: run,
- shape: shape,
- x: j + 0.5,
- y: v
- };
- this._connectEvents(o);
- eventSeries[j] = o;
- }
- if(this.animate){
- this._animateColumn(shape, dim.height - offsets.b, height);
- }
- }
- }
- }
- this._eventSeries[run.name] = eventSeries;
- run.dirty = false;
-
- for(var j = 0; j < run.data.length; ++j){
- var value = run.data[j];
- if(value !== null){
- var v = typeof value == "number" ? value : value.y;
- if(isNaN(v)){ v = 0; }
- acc[j] -= v;
- }
- }
- }
- this.dirty = false;
- return this;
- }
- });
- });
- },
- 'dojox/charting/Series':function(){
- define("dojox/charting/Series", ["dojo/_base/lang", "dojo/_base/declare", "./Element"],
- function(lang, declare, Element){
-
- return declare("dojox.charting.Series", Element, {
-
-
- constructor: function(chart, data, kwArgs){
-
-
-
-
-
-
-
-
-
-
-
- lang.mixin(this, kwArgs);
- if(typeof this.plot != "string"){ this.plot = "default"; }
- this.update(data);
- },
-
- clear: function(){
-
-
- this.dyn = {};
- },
-
- update: function(data){
-
-
-
-
-
-
-
- if(lang.isArray(data)){
- this.data = data;
- }else{
- this.source = data;
- this.data = this.source.data;
- if(this.source.setSeriesObject){
- this.source.setSeriesObject(this);
- }
- }
- this.dirty = true;
- this.clear();
- }
- });
- });
- },
- 'dojox/charting/plot2d/Default':function(){
- define("dojox/charting/plot2d/Default", ["dojo/_base/lang", "dojo/_base/declare", "dojo/_base/array",
- "./Base", "./common", "dojox/lang/functional", "dojox/lang/functional/reversed", "dojox/lang/utils", "dojox/gfx/fx"],
- function(lang, declare, arr, Base, dc, df, dfr, du, fx){
-
- var purgeGroup = dfr.lambda("item.purgeGroup()");
- var DEFAULT_ANIMATION_LENGTH = 1200;
- return declare("dojox.charting.plot2d.Default", Base, {
- defaultParams: {
- hAxis: "x",
- vAxis: "y",
- lines: true,
- areas: false,
- markers: false,
- tension: "",
- animate: false,
- enableCache: false
- },
- optionalParams: {
-
- stroke: {},
- outline: {},
- shadow: {},
- fill: {},
- font: "",
- fontColor: "",
- markerStroke: {},
- markerOutline: {},
- markerShadow: {},
- markerFill: {},
- markerFont: "",
- markerFontColor: ""
- },
- constructor: function(chart, kwArgs){
-
-
-
-
-
-
- this.opt = lang.clone(this.defaultParams);
- du.updateWithObject(this.opt, kwArgs);
- du.updateWithPattern(this.opt, kwArgs, this.optionalParams);
- this.series = [];
- this.hAxis = this.opt.hAxis;
- this.vAxis = this.opt.vAxis;
-
- this.animate = this.opt.animate;
- },
- createPath: function(run, creator, params){
- var path;
- if(this.opt.enableCache && run._pathFreePool.length > 0){
- path = run._pathFreePool.pop();
- path.setShape(params);
-
- creator.add(path);
- }else{
- path = creator.createPath(params);
- }
- if(this.opt.enableCache){
- run._pathUsePool.push(path);
- }
- return path;
- },
- render: function(dim, offsets){
-
-
-
-
-
-
-
-
-
- if(this.zoom && !this.isDataDirty()){
- return this.performZoom(dim, offsets);
- }
- this.resetEvents();
- this.dirty = this.isDirty();
- if(this.dirty){
- arr.forEach(this.series, purgeGroup);
- this._eventSeries = {};
- this.cleanGroup();
- this.group.setTransform(null);
- var s = this.group;
- df.forEachRev(this.series, function(item){ item.cleanGroup(s); });
- }
- var t = this.chart.theme, stroke, outline, marker, events = this.events();
- for(var i = this.series.length - 1; i >= 0; --i){
- var run = this.series[i];
- if(!this.dirty && !run.dirty){
- t.skip();
- this._reconnectEvents(run.name);
- continue;
- }
- run.cleanGroup();
- if(this.opt.enableCache){
- run._pathFreePool = (run._pathFreePool?run._pathFreePool:[]).concat(run._pathUsePool?run._pathUsePool:[]);
- run._pathUsePool = [];
- }
- if(!run.data.length){
- run.dirty = false;
- t.skip();
- continue;
- }
- var theme = t.next(this.opt.areas ? "area" : "line", [this.opt, run], true),
- s = run.group, rsegments = [], startindexes = [], rseg = null, lpoly,
- ht = this._hScaler.scaler.getTransformerFromModel(this._hScaler),
- vt = this._vScaler.scaler.getTransformerFromModel(this._vScaler),
- eventSeries = this._eventSeries[run.name] = new Array(run.data.length);
-
-
- var indexed = typeof run.data[0] == "number";
- var min = indexed?Math.max(0, Math.floor(this._hScaler.bounds.from - 1)):0,
- max = indexed?Math.min(run.data.length, Math.ceil(this._hScaler.bounds.to)):run.data.length;
-
- for(var j = min; j < max; j++){
- if(run.data[j] != null){
- if(!rseg){
- rseg = [];
- startindexes.push(j);
- rsegments.push(rseg);
- }
- rseg.push(run.data[j]);
- }else{
- rseg = null;
- }
- }
- for(var seg = 0; seg < rsegments.length; seg++){
- if(typeof rsegments[seg][0] == "number"){
- lpoly = arr.map(rsegments[seg], function(v, i){
- return {
- x: ht(i + startindexes[seg] + 1) + offsets.l,
- y: dim.height - offsets.b - vt(v)
- };
- }, this);
- }else{
- lpoly = arr.map(rsegments[seg], function(v, i){
- return {
- x: ht(v.x) + offsets.l,
- y: dim.height - offsets.b - vt(v.y)
- };
- }, this);
- }
- var lpath = this.opt.tension ? dc.curve(lpoly, this.opt.tension) : "";
- if(this.opt.areas && lpoly.length > 1){
- var fill = theme.series.fill;
- var apoly = lang.clone(lpoly);
- if(this.opt.tension){
- var apath = "L" + apoly[apoly.length-1].x + "," + (dim.height - offsets.b) +
- " L" + apoly[0].x + "," + (dim.height - offsets.b) +
- " L" + apoly[0].x + "," + apoly[0].y;
- run.dyn.fill = s.createPath(lpath + " " + apath).setFill(fill).getFill();
- } else {
- apoly.push({x: lpoly[lpoly.length - 1].x, y: dim.height - offsets.b});
- apoly.push({x: lpoly[0].x, y: dim.height - offsets.b});
- apoly.push(lpoly[0]);
- run.dyn.fill = s.createPolyline(apoly).setFill(fill).getFill();
- }
- }
- if(this.opt.lines || this.opt.markers){
-
- stroke = theme.series.stroke;
- if(theme.series.outline){
- outline = run.dyn.outline = dc.makeStroke(theme.series.outline);
- outline.width = 2 * outline.width + stroke.width;
- }
- }
- if(this.opt.markers){
- run.dyn.marker = theme.symbol;
- }
- var frontMarkers = null, outlineMarkers = null, shadowMarkers = null;
- if(stroke && theme.series.shadow && lpoly.length > 1){
- var shadow = theme.series.shadow,
- spoly = arr.map(lpoly, function(c){
- return {x: c.x + shadow.dx, y: c.y + shadow.dy};
- });
- if(this.opt.lines){
- if(this.opt.tension){
- run.dyn.shadow = s.createPath(dc.curve(spoly, this.opt.tension)).setStroke(shadow).getStroke();
- } else {
- run.dyn.shadow = s.createPolyline(spoly).setStroke(shadow).getStroke();
- }
- }
- if(this.opt.markers && theme.marker.shadow){
- shadow = theme.marker.shadow;
- shadowMarkers = arr.map(spoly, function(c){
- return this.createPath(run, s, "M" + c.x + " " + c.y + " " + theme.symbol).
- setStroke(shadow).setFill(shadow.color);
- }, this);
- }
- }
- if(this.opt.lines && lpoly.length > 1){
- if(outline){
- if(this.opt.tension){
- run.dyn.outline = s.createPath(lpath).setStroke(outline).getStroke();
- } else {
- run.dyn.outline = s.createPolyline(lpoly).setStroke(outline).getStroke();
- }
- }
- if(this.opt.tension){
- run.dyn.stroke = s.createPath(lpath).setStroke(stroke).getStroke();
- } else {
- run.dyn.stroke = s.createPolyline(lpoly).setStroke(stroke).getStroke();
- }
- }
- if(this.opt.markers){
- frontMarkers = new Array(lpoly.length);
- outlineMarkers = new Array(lpoly.length);
- outline = null;
- if(theme.marker.outline){
- outline = dc.makeStroke(theme.marker.outline);
- outline.width = 2 * outline.width + (theme.marker.stroke ? theme.marker.stroke.width : 0);
- }
- arr.forEach(lpoly, function(c, i){
- var path = "M" + c.x + " " + c.y + " " + theme.symbol;
- if(outline){
- outlineMarkers[i] = this.createPath(run, s, path).setStroke(outline);
- }
- frontMarkers[i] = this.createPath(run, s, path).setStroke(theme.marker.stroke).setFill(theme.marker.fill);
- }, this);
- run.dyn.markerFill = theme.marker.fill;
- run.dyn.markerStroke = theme.marker.stroke;
- if(events){
- arr.forEach(frontMarkers, function(s, i){
- var o = {
- element: "marker",
- index: i + startindexes[seg],
- run: run,
- shape: s,
- outline: outlineMarkers[i] || null,
- shadow: shadowMarkers && shadowMarkers[i] || null,
- cx: lpoly[i].x,
- cy: lpoly[i].y
- };
- if(typeof rsegments[seg][0] == "number"){
- o.x = i + startindexes[seg] + 1;
- o.y = rsegments[seg][i];
- }else{
- o.x = rsegments[seg][i].x;
- o.y = rsegments[seg][i].y;
- }
- this._connectEvents(o);
- eventSeries[i + startindexes[seg]] = o;
- }, this);
- }else{
- delete this._eventSeries[run.name];
- }
- }
- }
- run.dirty = false;
- }
- if(this.animate){
-
- var plotGroup = this.group;
- fx.animateTransform(lang.delegate({
- shape: plotGroup,
- duration: DEFAULT_ANIMATION_LENGTH,
- transform:[
- {name:"translate", start: [0, dim.height - offsets.b], end: [0, 0]},
- {name:"scale", start: [1, 0], end:[1, 1]},
- {name:"original"}
- ]
- }, this.animate)).play();
- }
- this.dirty = false;
- return this;
- }
- });
- });
- },
- 'dijit/main':function(){
- define("dijit/main", [
- "dojo/_base/kernel"
- ], function(dojo){
-
-
-
-
- return dojo.dijit;
- });
- },
- 'dojox/charting/plot2d/Base':function(){
- define("dojox/charting/plot2d/Base", ["dojo/_base/lang", "dojo/_base/declare", "dojo/_base/connect",
- "../Element", "./_PlotEvents", "dojo/_base/array",
- "../scaler/primitive", "./common", "dojox/gfx/fx"],
- function(lang, declare, hub, Element, PlotEvents, arr, primitive, common, fx){
- return declare("dojox.charting.plot2d.Base", [Element, PlotEvents], {
- constructor: function(chart, kwArgs){
-
-
-
-
-
-
- this.zoom = null,
- this.zoomQueue = [];
- this.lastWindow = {vscale: 1, hscale: 1, xoffset: 0, yoffset: 0};
- },
- clear: function(){
-
-
-
-
- this.series = [];
- this._hAxis = null;
- this._vAxis = null;
- this.dirty = true;
- return this;
- },
- setAxis: function(axis){
-
-
-
-
-
-
- if(axis){
- this[axis.vertical ? "_vAxis" : "_hAxis"] = axis;
- }
- return this;
- },
- toPage: function(coord){
-
-
-
-
-
-
-
-
-
- var ah = this._hAxis, av = this._vAxis,
- sh = ah.getScaler(), sv = av.getScaler(),
- th = sh.scaler.getTransformerFromModel(sh),
- tv = sv.scaler.getTransformerFromModel(sv),
- c = this.chart.getCoords(),
- o = this.chart.offsets, dim = this.chart.dim;
- var t = function(coord){
- var r = {};
- r.x = th(coord[ah.name]) + c.x + o.l;
- r.y = c.y + dim.height - o.b - tv(coord[av.name]);
- return r;
- };
-
-
- return coord?t(coord):t;
- },
- toData: function(coord){
-
-
-
-
-
-
-
-
-
- var ah = this._hAxis, av = this._vAxis,
- sh = ah.getScaler(), sv = av.getScaler(),
- th = sh.scaler.getTransformerFromPlot(sh),
- tv = sv.scaler.getTransformerFromPlot(sv),
- c = this.chart.getCoords(),
- o = this.chart.offsets, dim = this.chart.dim;
- var t = function(coord){
- var r = {};
- r[ah.name] = th(coord.x - c.x - o.l);
- r[av.name] = tv(c.y + dim.height - coord.y - o.b);
- return r;
- };
-
-
- return coord?t(coord):t;
- },
- addSeries: function(run){
-
-
-
-
-
-
- this.series.push(run);
- return this;
- },
- getSeriesStats: function(){
-
-
-
-
- return common.collectSimpleStats(this.series);
- },
- calculateAxes: function(dim){
-
-
-
-
-
-
- this.initializeScalers(dim, this.getSeriesStats());
- return this;
- },
- isDirty: function(){
-
-
-
-
- return this.dirty || this._hAxis && this._hAxis.dirty || this._vAxis && this._vAxis.dirty;
- },
- isDataDirty: function(){
-
-
-
-
- return arr.some(this.series, function(item){ return item.dirty; });
- },
- performZoom: function(dim, offsets){
-
-
-
-
-
-
-
-
-
- var vs = this._vAxis.scale || 1,
- hs = this._hAxis.scale || 1,
- vOffset = dim.height - offsets.b,
- hBounds = this._hScaler.bounds,
- xOffset = (hBounds.from - hBounds.lower) * hBounds.scale,
- vBounds = this._vScaler.bounds,
- yOffset = (vBounds.from - vBounds.lower) * vBounds.scale,
-
- rVScale = vs / this.lastWindow.vscale,
- rHScale = hs / this.lastWindow.hscale,
- rXOffset = (this.lastWindow.xoffset - xOffset)/
- ((this.lastWindow.hscale == 1)? hs : this.lastWindow.hscale),
- rYOffset = (yOffset - this.lastWindow.yoffset)/
- ((this.lastWindow.vscale == 1)? vs : this.lastWindow.vscale),
- shape = this.group,
- anim = fx.animateTransform(lang.delegate({
- shape: shape,
- duration: 1200,
- transform:[
- {name:"translate", start:[0, 0], end: [offsets.l * (1 - rHScale), vOffset * (1 - rVScale)]},
- {name:"scale", start:[1, 1], end: [rHScale, rVScale]},
- {name:"original"},
- {name:"translate", start: [0, 0], end: [rXOffset, rYOffset]}
- ]}, this.zoom));
- lang.mixin(this.lastWindow, {vscale: vs, hscale: hs, xoffset: xOffset, yoffset: yOffset});
-
-
- this.zoomQueue.push(anim);
-
- hub.connect(anim, "onEnd", this, function(){
- this.zoom = null;
- this.zoomQueue.shift();
- if(this.zoomQueue.length > 0){
- this.zoomQueue[0].play();
- }
- });
- if(this.zoomQueue.length == 1){
- this.zoomQueue[0].play();
- }
- return this;
- },
- render: function(dim, offsets){
-
-
-
-
-
-
-
-
- return this;
- },
- getRequiredColors: function(){
-
-
-
-
- return this.series.length;
- },
- initializeScalers: function(dim, stats){
-
-
-
-
-
-
-
-
- if(this._hAxis){
- if(!this._hAxis.initialized()){
- this._hAxis.calculate(stats.hmin, stats.hmax, dim.width);
- }
- this._hScaler = this._hAxis.getScaler();
- }else{
- this._hScaler = primitive.buildScaler(stats.hmin, stats.hmax, dim.width);
- }
- if(this._vAxis){
- if(!this._vAxis.initialized()){
- this._vAxis.calculate(stats.vmin, stats.vmax, dim.height);
- }
- this._vScaler = this._vAxis.getScaler();
- }else{
- this._vScaler = primitive.buildScaler(stats.vmin, stats.vmax, dim.height);
- }
- return this;
- }
- });
- });
- },
- 'dojox/charting/action2d/Tooltip':function(){
- define("dojox/charting/action2d/Tooltip", ["dojo/_base/kernel", "dijit/Tooltip","dojo/_base/lang", "dojo/_base/html", "dojo/_base/declare", "./PlotAction",
- "dojox/gfx/matrix", "dojox/lang/functional", "dojox/lang/functional/scan", "dojox/lang/functional/fold"],
- function(dojo, Tooltip, lang, html, declare, PlotAction, m, df, dfs, dff){
-
-
- var DEFAULT_TEXT = function(o){
- var t = o.run && o.run.data && o.run.data[o.index];
- if(t && typeof t != "number" && (t.tooltip || t.text)){
- return t.tooltip || t.text;
- }
- if(o.element == "candlestick"){
- return '<table cellpadding="1" cellspacing="0" border="0" style="font-size:0.9em;">'
- + '<tr><td>Open:</td><td align="right"><strong>' + o.data.open + '</strong></td></tr>'
- + '<tr><td>High:</td><td align="right"><strong>' + o.data.high + '</strong></td></tr>'
- + '<tr><td>Low:</td><td align="right"><strong>' + o.data.low + '</strong></td></tr>'
- + '<tr><td>Close:</td><td align="right"><strong>' + o.data.close + '</strong></td></tr>'
- + (o.data.mid !== undefined ? '<tr><td>Mid:</td><td align="right"><strong>' + o.data.mid + '</strong></td></tr>' : '')
- + '</table>';
- }
- return o.element == "bar" ? o.x : o.y;
- };
- var pi4 = Math.PI / 4, pi2 = Math.PI / 2;
-
- return declare("dojox.charting.action2d.Tooltip", PlotAction, {
-
-
-
- defaultParams: {
- text: DEFAULT_TEXT
- },
- optionalParams: {},
- constructor: function(chart, plot, kwArgs){
-
-
-
-
-
-
-
-
- this.text = kwArgs && kwArgs.text ? kwArgs.text : DEFAULT_TEXT;
-
- this.connect();
- },
-
- process: function(o){
-
-
-
-
- if(o.type === "onplotreset" || o.type === "onmouseout"){
- Tooltip.hide(this.aroundRect);
- this.aroundRect = null;
- if(o.type === "onplotreset"){
- delete this.angles;
- }
- return;
- }
-
- if(!o.shape || o.type !== "onmouseover"){ return; }
-
-
- var aroundRect = {type: "rect"}, position = ["after", "before"];
- switch(o.element){
- case "marker":
- aroundRect.x = o.cx;
- aroundRect.y = o.cy;
- aroundRect.w = aroundRect.h = 1;
- break;
- case "circle":
- aroundRect.x = o.cx - o.cr;
- aroundRect.y = o.cy - o.cr;
- aroundRect.w = aroundRect.h = 2 * o.cr;
- break;
- case "column":
- position = ["above", "below"];
-
- case "bar":
- aroundRect = lang.clone(o.shape.getShape());
- aroundRect.w = aroundRect.width;
- aroundRect.h = aroundRect.height;
- break;
- case "candlestick":
- aroundRect.x = o.x;
- aroundRect.y = o.y;
- aroundRect.w = o.width;
- aroundRect.h = o.height;
- break;
- default:
-
- if(!this.angles){
-
- if(typeof o.run.data[0] == "number"){
- this.angles = df.map(df.scanl(o.run.data, "+", 0),
- "* 2 * Math.PI / this", df.foldl(o.run.data, "+", 0));
- }else{
- this.angles = df.map(df.scanl(o.run.data, "a + b.y", 0),
- "* 2 * Math.PI / this", df.foldl(o.run.data, "a + b.y", 0));
- }
- }
- var startAngle = m._degToRad(o.plot.opt.startAngle),
- angle = (this.angles[o.index] + this.angles[o.index + 1]) / 2 + startAngle;
- aroundRect.x = o.cx + o.cr * Math.cos(angle);
- aroundRect.y = o.cy + o.cr * Math.sin(angle);
- aroundRect.w = aroundRect.h = 1;
-
- if(angle < pi4){
-
- }else if(angle < pi2 + pi4){
- position = ["below", "above"];
- }else if(angle < Math.PI + pi4){
- position = ["before", "after"];
- }else if(angle < 2 * Math.PI - pi4){
- position = ["above", "below"];
- }
-
- break;
- }
-
-
- var lt = this.chart.getCoords();
- aroundRect.x += lt.x;
- aroundRect.y += lt.y;
- aroundRect.x = Math.round(aroundRect.x);
- aroundRect.y = Math.round(aroundRect.y);
- aroundRect.w = Math.ceil(aroundRect.w);
- aroundRect.h = Math.ceil(aroundRect.h);
- this.aroundRect = aroundRect;
- var tooltip = this.text(o);
- if(this.chart.getTextDir){
- var isChartDirectionRtl = (html.style(this.chart.node,"direction") == "rtl");
- var isBaseTextDirRtl = (this.chart.getTextDir(tooltip) == "rtl");
- }
- if(tooltip){
- if(isBaseTextDirRtl && !isChartDirectionRtl){
- Tooltip.show("<span dir = 'rtl'>" + tooltip +"</span>", this.aroundRect, position);
- }
- else if(!isBaseTextDirRtl && isChartDirectionRtl){
- Tooltip.show("<span dir = 'ltr'>" + tooltip +"</span>", this.aroundRect, position);
- }else{
- Tooltip.show(tooltip, this.aroundRect, position);
- }
- }
- }
- });
- });
- },
- 'dojox/gfx':function(){
- require({cache:{
- 'dojox/gfx/_base':function(){
- define(["dojo/_base/lang", "dojo/_base/html", "dojo/_base/Color", "dojo/_base/sniff", "dojo/_base/window",
- "dojo/_base/array","dojo/dom", "dojo/dom-construct","dojo/dom-geometry"],
- function(lang, html, Color, has, win, arr, dom, domConstruct, domGeom){
-
-
-
-
- var g = lang.getObject("dojox.gfx", true),
- b = g._base = {};
-
-
-
- g._hasClass = function(/*DomNode*/node, /*String*/classStr){
-
-
-
-
- var cls = node.getAttribute("className");
- return cls && (" " + cls + " ").indexOf(" " + classStr + " ") >= 0;
- };
- g._addClass = function(/*DomNode*/node, /*String*/classStr){
-
-
-
- var cls = node.getAttribute("className") || "";
- if(!cls || (" " + cls + " ").indexOf(" " + classStr + " ") < 0){
- node.setAttribute("className", cls + (cls ? " " : "") + classStr);
- }
- };
- g._removeClass = function(/*DomNode*/node, /*String*/classStr){
-
- var cls = node.getAttribute("className");
- if(cls){
- node.setAttribute(
- "className",
- cls.replace(new RegExp('(^|\\s+)' + classStr + '(\\s+|$)'), "$1$2")
- );
- }
- };
-
-
- b._getFontMeasurements = function(){
-
-
-
- var heights = {
- '1em': 0, '1ex': 0, '100%': 0, '12pt': 0, '16px': 0, 'xx-small': 0,
- 'x-small': 0, 'small': 0, 'medium': 0, 'large': 0, 'x-large': 0,
- 'xx-large': 0
- };
- var p;
- if(has("ie")){
-
-
- win.doc.documentElement.style.fontSize="100%";
- }
-
- var div = domConstruct.create("div", {style: {
- position: "absolute",
- left: "0",
- top: "-100px",
- width: "30px",
- height: "1000em",
- borderWidth: "0",
- margin: "0",
- padding: "0",
- outline: "none",
- lineHeight: "1",
- overflow: "hidden"
- }}, win.body());
-
- for(p in heights){
- div.style.fontSize = p;
- heights[p] = Math.round(div.offsetHeight * 12/16) * 16/12 / 1000;
- }
- win.body().removeChild(div);
- return heights;
- };
- var fontMeasurements = null;
- b._getCachedFontMeasurements = function(recalculate){
- if(recalculate || !fontMeasurements){
- fontMeasurements = b._getFontMeasurements();
- }
- return fontMeasurements;
- };
-
- var measuringNode = null, empty = {};
- b._getTextBox = function( /*String*/ text,
- /*Object*/ style,
- /*String?*/ className){
- var m, s, al = arguments.length;
- var i;
- if(!measuringNode){
- measuringNode = domConstruct.create("div", {style: {
- position: "absolute",
- top: "-10000px",
- left: "0"
- }}, win.body());
- }
- m = measuringNode;
-
- m.className = "";
- s = m.style;
- s.borderWidth = "0";
- s.margin = "0";
- s.padding = "0";
- s.outline = "0";
-
- if(al > 1 && style){
- for(i in style){
- if(i in empty){ continue; }
- s[i] = style[i];
- }
- }
-
- if(al > 2 && className){
- m.className = className;
- }
-
- m.innerHTML = text;
- if(m["getBoundingClientRect"]){
- var bcr = m.getBoundingClientRect();
- return {l: bcr.left, t: bcr.top, w: bcr.width || (bcr.right - bcr.left), h: bcr.height || (bcr.bottom - bcr.top)};
- }else{
- return domGeom.getMarginBox(m);
- }
- };
-
- var uniqueId = 0;
- b._getUniqueId = function(){
-
- var id;
- do{
- id = dojo._scopeName + "xUnique" + (++uniqueId);
- }while(dom.byId(id));
- return id;
- };
- lang.mixin(g, {
-
-
-
- defaultPath: {
-
-
- type: "path",
-
-
- path: ""
-
-
-
- },
- defaultPolyline: {
-
-
- type: "polyline",
-
-
- points: []
-
-
- },
- defaultRect: {
-
-
- type: "rect",
-
-
- x: 0,
-
-
- y: 0,
-
-
- width: 100,
-
-
- height: 100,
-
-
- r: 0
-
-
- },
- defaultEllipse: {
-
-
- type: "ellipse",
-
-
- cx: 0,
-
-
- cy: 0,
-
-
- rx: 200,
-
-
- ry: 100
-
-
- },
- defaultCircle: {
-
-
- type: "circle",
-
-
- cx: 0,
-
-
- cy: 0,
-
-
- r: 100
-
-
- },
- defaultLine: {
-
-
- type: "line",
-
-
- x1: 0,
-
-
- y1: 0,
-
-
- x2: 100,
-
-
- y2: 100
-
-
- },
- defaultImage: {
-
-
- type: "image",
-
-
- x: 0,
-
-
- y: 0,
-
-
- width: 0,
-
-
- height: 0,
-
-
- src: ""
-
-
- },
- defaultText: {
-
-
- type: "text",
-
-
- x: 0,
-
-
- y: 0,
-
-
- text: "",
-
-
- align: "start",
-
-
- decoration: "none",
-
-
- rotated: false,
-
-
- kerning: true
-
-
- },
- defaultTextPath: {
-
-
- type: "textpath",
-
-
- text: "",
-
-
- align: "start",
-
-
- decoration: "none",
-
-
- rotated: false,
-
-
- kerning: true
-
-
- },
-
- defaultStroke: {
-
-
-
- type: "stroke",
-
-
- color: "black",
-
-
- style: "solid",
-
-
- width: 1,
-
-
- cap: "butt",
-
-
- join: 4
-
-
- },
- defaultLinearGradient: {
-
-
-
- type: "linear",
-
-
- x1: 0,
-
-
- y1: 0,
-
-
- x2: 100,
-
-
- y2: 100,
-
-
- colors: [
- { offset: 0, color: "black" }, { offset: 1, color: "white" }
- ]
-
-
-
-
- },
- defaultRadialGradient: {
-
-
- type: "radial",
-
-
- cx: 0,
-
-
- cy: 0,
-
-
- r: 100,
-
-
- colors: [
- { offset: 0, color: "black" }, { offset: 1, color: "white" }
- ]
-
-
-
-
- },
- defaultPattern: {
-
-
- type: "pattern",
-
-
- x: 0,
-
-
- y: 0,
-
-
- width: 0,
-
-
- height: 0,
-
-
- src: ""
-
-
- },
- defaultFont: {
-
-
- type: "font",
-
-
- style: "normal",
-
-
- variant: "normal",
-
-
- weight: "normal",
-
-
- size: "10pt",
-
-
- family: "serif"
-
-
- },
- getDefault: (function(){
-
-
- var typeCtorCache = {};
-
- return function(/*String*/ type){
- var t = typeCtorCache[type];
- if(t){
- return new t();
- }
- t = typeCtorCache[type] = new Function();
- t.prototype = g[ "default" + type ];
- return new t();
- }
- })(),
- normalizeColor: function(/*dojo.Color|Array|string|Object*/ color){
-
-
-
- return (color instanceof Color) ? color : new Color(color);
- },
- normalizeParameters: function(existed, update){
-
-
-
-
-
-
-
-
- var x;
- if(update){
- var empty = {};
- for(x in existed){
- if(x in update && !(x in empty)){
- existed[x] = update[x];
- }
- }
- }
- return existed;
- },
- makeParameters: function(defaults, update){
-
-
-
-
-
-
-
- var i = null;
- if(!update){
-
- return lang.delegate(defaults);
- }
- var result = {};
- for(i in defaults){
- if(!(i in result)){
- result[i] = lang.clone((i in update) ? update[i] : defaults[i]);
- }
- }
- return result;
- },
- formatNumber: function(x, addSpace){
-
-
-
-
-
- var val = x.toString();
- if(val.indexOf("e") >= 0){
- val = x.toFixed(4);
- }else{
- var point = val.indexOf(".");
- if(point >= 0 && val.length - point > 5){
- val = x.toFixed(4);
- }
- }
- if(x < 0){
- return val;
- }
- return addSpace ? " " + val : val;
- },
-
- makeFontString: function(font){
-
-
- return font.style + " " + font.variant + " " + font.weight + " " + font.size + " " + font.family;
- },
- splitFontString: function(str){
-
-
-
-
-
-
-
-
-
-
- var font = g.getDefault("Font");
- var t = str.split(/\s+/);
- do{
- if(t.length < 5){ break; }
- font.style = t[0];
- font.variant = t[1];
- font.weight = t[2];
- var i = t[3].indexOf("/");
- font.size = i < 0 ? t[3] : t[3].substring(0, i);
- var j = 4;
- if(i < 0){
- if(t[4] == "/"){
- j = 6;
- }else if(t[4].charAt(0) == "/"){
- j = 5;
- }
- }
- if(j < t.length){
- font.family = t.slice(j).join(" ");
- }
- }while(false);
- return font;
- },
-
- cm_in_pt: 72 / 2.54,
-
-
- mm_in_pt: 7.2 / 2.54,
-
-
- px_in_pt: function(){
-
- return g._base._getCachedFontMeasurements()["12pt"] / 12;
- },
- pt2px: function(len){
-
-
-
- return len * g.px_in_pt();
- },
- px2pt: function(len){
-
-
-
- return len / g.px_in_pt();
- },
- normalizedLength: function(len) {
-
-
-
- if(len.length === 0){ return 0; }
- if(len.length > 2){
- var px_in_pt = g.px_in_pt();
- var val = parseFloat(len);
- switch(len.slice(-2)){
- case "px": return val;
- case "pt": return val * px_in_pt;
- case "in": return val * 72 * px_in_pt;
- case "pc": return val * 12 * px_in_pt;
- case "mm": return val * g.mm_in_pt * px_in_pt;
- case "cm": return val * g.cm_in_pt * px_in_pt;
- }
- }
- return parseFloat(len);
- },
- pathVmlRegExp: /([A-Za-z]+)|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,
-
-
- pathSvgRegExp: /([A-Za-z])|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,
-
-
- equalSources: function(a /*Object*/, b /*Object*/){
-
-
-
- return a && b && a === b;
- },
- switchTo: function(renderer/*String|Object*/){
-
-
-
-
- var ns = typeof renderer == "string" ? g[renderer] : renderer;
- if(ns){
- arr.forEach(["Group", "Rect", "Ellipse", "Circle", "Line",
- "Polyline", "Image", "Text", "Path", "TextPath",
- "Surface", "createSurface", "fixTarget"], function(name){
- g[name] = ns[name];
- });
- }
- }
- });
- return g;
- });
- },
- 'dojox/gfx/renderer':function(){
- define("dojox/gfx/renderer", ["./_base","dojo/_base/lang", "dojo/_base/sniff", "dojo/_base/window", "dojo/_base/config"],
- function(g, lang, has, win, config){
-
- var currentRenderer = null;
- has.add("vml", function(global, document, element){
- element.innerHTML = "<v:shape adj=\"1\"/>";
- var supported = ("adj" in element.firstChild);
- element.innerHTML = "";
- return supported;
- });
- return {
- load: function(id, require, load){
- if(currentRenderer && id != "force"){
- load(currentRenderer);
- return;
- }
- var renderer = config.forceGfxRenderer,
- renderers = !renderer && (lang.isString(config.gfxRenderer) ?
- config.gfxRenderer : "svg,vml,canvas,silverlight").split(","),
- silverlightObject, silverlightFlag;
- while(!renderer && renderers.length){
- switch(renderers.shift()){
- case "svg":
-
- if("SVGAngle" in win.global){
- renderer = "svg";
- }
- break;
- case "vml":
- if(has("vml")){
- renderer = "vml";
- }
- break;
- case "silverlight":
- try{
- if(has("ie")){
- silverlightObject = new ActiveXObject("AgControl.AgControl");
- if(silverlightObject && silverlightObject.IsVersionSupported("1.0")){
- silverlightFlag = true;
- }
- }else{
- if(navigator.plugins["Silverlight Plug-In"]){
- silverlightFlag = true;
- }
- }
- }catch(e){
- silverlightFlag = false;
- }finally{
- silverlightObject = null;
- }
- if(silverlightFlag){
- renderer = "silverlight";
- }
- break;
- case "canvas":
- if(win.global.CanvasRenderingContext2D){
- renderer = "canvas";
- }
- break;
- }
- }
- if (renderer === 'canvas' && config.canvasEvents !== false) {
- renderer = "canvasWithEvents";
- }
- if(config.isDebug){
- console.log("gfx renderer = " + renderer);
- }
- function loadRenderer(){
- require(["dojox/gfx/" + renderer], function(module){
- g.renderer = renderer;
-
- currentRenderer = module;
-
- load(module);
- });
- }
- if(renderer == "svg" && typeof window.svgweb != "undefined"){
- window.svgweb.addOnLoad(loadRenderer);
- }else{
- loadRenderer();
- }
- }
- };
- });
- }}});
- define("dojox/gfx", ["dojo/_base/lang", "./gfx/_base", "./gfx/renderer!"],
- function(lang, gfxBase, renderer){
-
-
-
-
- gfxBase.switchTo(renderer);
- return gfxBase;
- });
- },
- 'dojox/gfx/shape':function(){
- define("dojox/gfx/shape", ["./_base", "dojo/_base/lang", "dojo/_base/declare", "dojo/_base/window", "dojo/_base/sniff",
- "dojo/_base/connect", "dojo/_base/array", "dojo/dom-construct", "dojo/_base/Color", "./matrix"],
- function(g, lang, declare, win, has, events, arr, domConstruct, Color, matrixLib){
- var shape = g.shape = {};
-
- var _ids = {};
-
- var registry = {};
- var disposeCount = 0, fixIELeak = has("ie") < 9;
- function repack(oldRegistry){
- var newRegistry = {};
- for(var key in oldRegistry){
- if(oldRegistry.hasOwnProperty(key)){
- newRegistry[key] = oldRegistry[key]
- }
- }
- return newRegistry;
- }
- shape.register = function(/*dojox.gfx.shape.Shape*/shape){
-
-
-
-
-
-
-
- var t = shape.declaredClass.split('.').pop();
- var i = t in _ids ? ++_ids[t] : ((_ids[t] = 0));
- var uid = t+i;
- registry[uid] = shape;
- return uid;
- };
-
- shape.byId = function(/*String*/id){
-
-
-
-
- return registry[id];
- };
-
- shape.dispose = function(/*dojox.gfx.shape.Shape*/shape){
-
-
-
-
- delete registry[shape.getUID()];
- ++disposeCount;
- if(fixIELeak && disposeCount>10000){
- registry = repack(registry);
- disposeCount = 0;
- }
- };
-
- declare("dojox.gfx.shape.Shape", null, {
-
-
-
- constructor: function(){
-
-
- this.rawNode = null;
-
-
-
-
-
-
-
-
- this.shape = null;
-
-
-
- this.matrix = null;
-
-
-
-
-
-
-
- this.fillStyle = null;
-
-
-
-
- this.strokeStyle = null;
-
-
-
-
- this.bbox = null;
-
-
-
-
-
-
-
-
- this.parent = null;
-
-
-
- this.parentMatrix = null;
-
- var uid = shape.register(this);
- this.getUID = function(){
- return uid;
- }
- },
-
-
-
- getNode: function(){
-
-
-
-
-
- return this.rawNode;
- },
- getShape: function(){
-
-
-
-
-
-
-
-
- return this.shape;
- },
- getTransform: function(){
-
- return this.matrix;
- },
- getFill: function(){
-
-
-
-
-
- return this.fillStyle;
- },
- getStroke: function(){
-
-
- return this.strokeStyle;
- },
- getParent: function(){
-
-
-
-
- return this.parent;
- },
- getBoundingBox: function(){
-
-
-
-
-
- return this.bbox;
- },
- getTransformedBoundingBox: function(){
-
-
- var b = this.getBoundingBox();
- if(!b){
- return null;
- }
- var m = this._getRealMatrix(),
- gm = matrixLib;
- return [
- gm.multiplyPoint(m, b.x, b.y),
- gm.multiplyPoint(m, b.x + b.width, b.y),
- gm.multiplyPoint(m, b.x + b.width, b.y + b.height),
- gm.multiplyPoint(m, b.x, b.y + b.height)
- ];
- },
- getEventSource: function(){
-
-
-
- return this.rawNode;
- },
-
-
-
- setShape: function(shape){
-
-
-
-
-
-
-
-
-
-
-
-
- this.shape = g.makeParameters(this.shape, shape);
- this.bbox = null;
- return this;
- },
- setFill: function(fill){
-
-
-
-
-
-
-
-
-
- if(!fill){
-
- this.fillStyle = null;
- return this;
- }
- var f = null;
- if(typeof(fill) == "object" && "type" in fill){
-
- switch(fill.type){
- case "linear":
- f = g.makeParameters(g.defaultLinearGradient, fill);
- break;
- case "radial":
- f = g.makeParameters(g.defaultRadialGradient, fill);
- break;
- case "pattern":
- f = g.makeParameters(g.defaultPattern, fill);
- break;
- }
- }else{
-
- f = g.normalizeColor(fill);
- }
- this.fillStyle = f;
- return this;
- },
- setStroke: function(stroke){
-
-
-
-
-
-
- if(!stroke){
-
- this.strokeStyle = null;
- return this;
- }
-
- if(typeof stroke == "string" || lang.isArray(stroke) || stroke instanceof Color){
- stroke = {color: stroke};
- }
- var s = this.strokeStyle = g.makeParameters(g.defaultStroke, stroke);
- s.color = g.normalizeColor(s.color);
- return this;
- },
- setTransform: function(matrix){
-
-
-
-
-
-
- this.matrix = matrixLib.clone(matrix ? matrixLib.normalize(matrix) : matrixLib.identity);
- return this._applyTransform();
- },
-
- _applyTransform: function(){
-
-
- return this;
- },
-
-
-
- moveToFront: function(){
-
- var p = this.getParent();
- if(p){
- p._moveChildToFront(this);
- this._moveToFront();
- }
- return this;
- },
- moveToBack: function(){
-
- var p = this.getParent();
- if(p){
- p._moveChildToBack(this);
- this._moveToBack();
- }
- return this;
- },
- _moveToFront: function(){
-
-
- },
- _moveToBack: function(){
-
-
- },
-
-
-
- applyRightTransform: function(matrix){
-
-
-
-
-
-
- return matrix ? this.setTransform([this.matrix, matrix]) : this;
- },
- applyLeftTransform: function(matrix){
-
-
-
-
-
-
- return matrix ? this.setTransform([matrix, this.matrix]) : this;
- },
- applyTransform: function(matrix){
-
-
-
-
-
- return matrix ? this.setTransform([this.matrix, matrix]) : this;
- },
-
-
-
- removeShape: function(silently){
-
-
-
- if(this.parent){
- this.parent.remove(this, silently);
- }
- return this;
- },
- _setParent: function(parent, matrix){
-
-
-
-
-
-
-
-
- this.parent = parent;
- return this._updateParentMatrix(matrix);
- },
- _updateParentMatrix: function(matrix){
-
-
-
- this.parentMatrix = matrix ? matrixLib.clone(matrix) : null;
- return this._applyTransform();
- },
- _getRealMatrix: function(){
-
-
- var m = this.matrix;
- var p = this.parent;
- while(p){
- if(p.matrix){
- m = matrixLib.multiply(p.matrix, m);
- }
- p = p.parent;
- }
- return m;
- }
- });
-
- shape._eventsProcessing = {
- connect: function(name, object, method){
-
-
-
-
- return events.connect(this.getEventSource(), name, shape.fixCallback(this, g.fixTarget, object, method));
-
- },
- disconnect: function(token){
-
-
-
- events.disconnect(token);
- }
- };
-
- shape.fixCallback = function(gfxElement, fixFunction, scope, method){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if(!method){
- method = scope;
- scope = null;
- }
- if(lang.isString(method)){
- scope = scope || win.global;
- if(!scope[method]){ throw(['dojox.gfx.shape.fixCallback: scope["', method, '"] is null (scope="', scope, '")'].join('')); }
- return function(e){
- return fixFunction(e,gfxElement) ? scope[method].apply(scope, arguments || []) : undefined; };
- }
- return !scope
- ? function(e){
- return fixFunction(e,gfxElement) ? method.apply(scope, arguments) : undefined; }
- : function(e){
- return fixFunction(e,gfxElement) ? method.apply(scope, arguments || []) : undefined; };
- };
- lang.extend(shape.Shape, shape._eventsProcessing);
-
- shape.Container = {
-
-
-
-
- _init: function() {
-
- this.children = [];
- },
-
-
-
- openBatch: function() {
-
-
- },
- closeBatch: function() {
-
- },
- add: function(shape){
-
-
-
- var oldParent = shape.getParent();
- if(oldParent){
- oldParent.remove(shape, true);
- }
- this.children.push(shape);
- return shape._setParent(this, this._getRealMatrix());
- },
- remove: function(shape, silently){
-
-
-
-
-
- for(var i = 0; i < this.children.length; ++i){
- if(this.children[i] == shape){
- if(silently){
-
- }else{
- shape.parent = null;
- shape.parentMatrix = null;
- }
- this.children.splice(i, 1);
- break;
- }
- }
- return this;
- },
- clear: function(){
-
- var shape;
- for(var i = 0; i < this.children.length;++i){
- shape = this.children[i];
- shape.parent = null;
- shape.parentMatrix = null;
- }
- this.children = [];
- return this;
- },
-
-
-
- _moveChildToFront: function(shape){
-
-
-
- for(var i = 0; i < this.children.length; ++i){
- if(this.children[i] == shape){
- this.children.splice(i, 1);
- this.children.push(shape);
- break;
- }
- }
- return this;
- },
- _moveChildToBack: function(shape){
-
-
-
- for(var i = 0; i < this.children.length; ++i){
- if(this.children[i] == shape){
- this.children.splice(i, 1);
- this.children.unshift(shape);
- break;
- }
- }
- return this;
- }
- };
-
- declare("dojox.gfx.shape.Surface", null, {
-
- constructor: function(){
-
- this.rawNode = null;
-
- this._parent = null;
-
- this._nodes = [];
-
- this._events = [];
- },
- destroy: function(){
-
-
-
-
- var _dispose = function(s){
- shape.dispose(s);
- s.parent = null;
- if(s.children && s.children.length){
- arr.forEach(s.children, _dispose);
- s.children = null;
- }
- };
- arr.forEach(this.children, _dispose);
- this.children = null;
-
- arr.forEach(this._nodes, domConstruct.destroy);
- this._nodes = [];
- arr.forEach(this._events, events.disconnect);
- this._events = [];
- this.rawNode = null;
- if(has("ie")){
- while(this._parent.lastChild){
- domConstruct.destroy(this._parent.lastChild);
- }
- }else{
- this._parent.innerHTML = "";
- }
- this._parent = null;
- },
- getEventSource: function(){
-
- return this.rawNode;
- },
- _getRealMatrix: function(){
-
- return null;
- },
- isLoaded: true,
- onLoad: function(/*dojox.gfx.Surface*/ surface){
-
-
-
- },
- whenLoaded: function(/*Object|Null*/ context, /*Function|String*/ method){
- var f = lang.hitch(context, method);
- if(this.isLoaded){
- f(this);
- }else{
- var h = events.connect(this, "onLoad", function(surface){
- events.disconnect(h);
- f(surface);
- });
- }
- }
- });
-
- lang.extend(shape.Surface, shape._eventsProcessing);
-
- declare("dojox.gfx.Point", null, {
-
-
-
- });
-
- declare("dojox.gfx.Rectangle", null, {
-
-
-
- });
-
- declare("dojox.gfx.shape.Rect", shape.Shape, {
-
- constructor: function(rawNode){
-
-
- this.shape = g.getDefault("Rect");
- this.rawNode = rawNode;
- },
- getBoundingBox: function(){
-
- return this.shape;
- }
- });
-
- declare("dojox.gfx.shape.Ellipse", shape.Shape, {
-
- constructor: function(rawNode){
-
-
- this.shape = g.getDefault("Ellipse");
- this.rawNode = rawNode;
- },
- getBoundingBox: function(){
-
- if(!this.bbox){
- var shape = this.shape;
- this.bbox = {x: shape.cx - shape.rx, y: shape.cy - shape.ry,
- width: 2 * shape.rx, height: 2 * shape.ry};
- }
- return this.bbox;
- }
- });
-
- declare("dojox.gfx.shape.Circle", shape.Shape, {
-
-
- constructor: function(rawNode){
-
-
- this.shape = g.getDefault("Circle");
- this.rawNode = rawNode;
- },
- getBoundingBox: function(){
-
- if(!this.bbox){
- var shape = this.shape;
- this.bbox = {x: shape.cx - shape.r, y: shape.cy - shape.r,
- width: 2 * shape.r, height: 2 * shape.r};
- }
- return this.bbox;
- }
- });
-
- declare("dojox.gfx.shape.Line", shape.Shape, {
-
-
- constructor: function(rawNode){
-
-
- this.shape = g.getDefault("Line");
- this.rawNode = rawNode;
- },
- getBoundingBox: function(){
-
- if(!this.bbox){
- var shape = this.shape;
- this.bbox = {
- x: Math.min(shape.x1, shape.x2),
- y: Math.min(shape.y1, shape.y2),
- width: Math.abs(shape.x2 - shape.x1),
- height: Math.abs(shape.y2 - shape.y1)
- };
- }
- return this.bbox;
- }
- });
-
- declare("dojox.gfx.shape.Polyline", shape.Shape, {
-
-
- constructor: function(rawNode){
-
-
- this.shape = g.getDefault("Polyline");
- this.rawNode = rawNode;
- },
- setShape: function(points, closed){
-
-
-
-
-
- if(points && points instanceof Array){
-
- this.inherited(arguments, [{points: points}]);
- if(closed && this.shape.points.length){
- this.shape.points.push(this.shape.points[0]);
- }
- }else{
- this.inherited(arguments, [points]);
- }
- return this;
- },
- _normalizePoints: function(){
-
- var p = this.shape.points, l = p && p.length;
- if(l && typeof p[0] == "number"){
- var points = [];
- for(var i = 0; i < l; i += 2){
- points.push({x: p[i], y: p[i + 1]});
- }
- this.shape.points = points;
- }
- },
- getBoundingBox: function(){
-
- if(!this.bbox && this.shape.points.length){
- var p = this.shape.points;
- var l = p.length;
- var t = p[0];
- var bbox = {l: t.x, t: t.y, r: t.x, b: t.y};
- for(var i = 1; i < l; ++i){
- t = p[i];
- if(bbox.l > t.x) bbox.l = t.x;
- if(bbox.r < t.x) bbox.r = t.x;
- if(bbox.t > t.y) bbox.t = t.y;
- if(bbox.b < t.y) bbox.b = t.y;
- }
- this.bbox = {
- x: bbox.l,
- y: bbox.t,
- width: bbox.r - bbox.l,
- height: bbox.b - bbox.t
- };
- }
- return this.bbox;
- }
- });
-
- declare("dojox.gfx.shape.Image", shape.Shape, {
-
-
- constructor: function(rawNode){
-
-
- this.shape = g.getDefault("Image");
- this.rawNode = rawNode;
- },
- getBoundingBox: function(){
-
- return this.shape;
- },
- setStroke: function(){
-
- return this;
- },
- setFill: function(){
-
- return this;
- }
- });
-
- declare("dojox.gfx.shape.Text", shape.Shape, {
-
- constructor: function(rawNode){
-
-
- this.fontStyle = null;
- this.shape = g.getDefault("Text");
- this.rawNode = rawNode;
- },
- getFont: function(){
-
- return this.fontStyle;
- },
- setFont: function(newFont){
-
-
-
- this.fontStyle = typeof newFont == "string" ? g.splitFontString(newFont) :
- g.makeParameters(g.defaultFont, newFont);
- this._setFont();
- return this;
- }
- });
-
- shape.Creator = {
-
- createShape: function(shape){
-
-
-
-
- switch(shape.type){
- case g.defaultPath.type: return this.createPath(shape);
- case g.defaultRect.type: return this.createRect(shape);
- case g.defaultCircle.type: return this.createCircle(shape);
- case g.defaultEllipse.type: return this.createEllipse(shape);
- case g.defaultLine.type: return this.createLine(shape);
- case g.defaultPolyline.type: return this.createPolyline(shape);
- case g.defaultImage.type: return this.createImage(shape);
- case g.defaultText.type: return this.createText(shape);
- case g.defaultTextPath.type: return this.createTextPath(shape);
- }
- return null;
- },
- createGroup: function(){
-
- return this.createObject(g.Group);
- },
- createRect: function(rect){
-
-
-
- return this.createObject(g.Rect, rect);
- },
- createEllipse: function(ellipse){
-
-
-
- return this.createObject(g.Ellipse, ellipse);
- },
- createCircle: function(circle){
-
-
-
- return this.createObject(g.Circle, circle);
- },
- createLine: function(line){
-
-
-
- return this.createObject(g.Line, line);
- },
- createPolyline: function(points){
-
-
-
-
- return this.createObject(g.Polyline, points);
- },
- createImage: function(image){
-
-
-
- return this.createObject(g.Image, image);
- },
- createText: function(text){
-
-
-
- return this.createObject(g.Text, text);
- },
- createPath: function(path){
-
-
-
- return this.createObject(g.Path, path);
- },
- createTextPath: function(text){
-
-
-
- return this.createObject(g.TextPath, {}).setText(text);
- },
- createObject: function(shapeType, rawShape){
-
-
-
-
-
-
-
- return null;
- }
- };
-
- return shape;
- });
- },
- 'dojox/charting/Chart2D':function(){
- define("dojox/charting/Chart2D", ["dojo/_base/kernel", "dojox", "./Chart",
- "./axis2d/Default", "./axis2d/Invisible", "./plot2d/Default", "./plot2d/Lines", "./plot2d/Areas",
- "./plot2d/Markers", "./plot2d/MarkersOnly", "./plot2d/Scatter", "./plot2d/Stacked", "./plot2d/StackedLines",
- "./plot2d/StackedAreas", "./plot2d/Columns", "./plot2d/StackedColumns", "./plot2d/ClusteredColumns",
- "./plot2d/Bars", "./plot2d/StackedBars", "./plot2d/ClusteredBars", "./plot2d/Grid", "./plot2d/Pie",
- "./plot2d/Bubble", "./plot2d/Candlesticks", "./plot2d/OHLC", "./plot2d/Spider"],
- function(dojo, dojox, Chart){
- dojo.deprecated("dojox.charting.Chart2D", "Use dojo.charting.Chart instead and require all other components explicitly", "2.0");
-
-
-
-
-
-
- return dojox.charting.Chart2D = Chart;
- });
- },
- 'dojox/charting/scaler/linear':function(){
- define(["dojo/_base/lang", "./common"],
- function(lang, common){
- var linear = lang.getObject("dojox.charting.scaler.linear", true);
-
- var deltaLimit = 3,
- findString = common.findString,
- getLabel = common.getNumericLabel;
-
- var calcTicks = function(min, max, kwArgs, majorTick, minorTick, microTick, span){
- kwArgs = lang.delegate(kwArgs);
- if(!majorTick){
- if(kwArgs.fixUpper == "major"){ kwArgs.fixUpper = "minor"; }
- if(kwArgs.fixLower == "major"){ kwArgs.fixLower = "minor"; }
- }
- if(!minorTick){
- if(kwArgs.fixUpper == "minor"){ kwArgs.fixUpper = "micro"; }
- if(kwArgs.fixLower == "minor"){ kwArgs.fixLower = "micro"; }
- }
- if(!microTick){
- if(kwArgs.fixUpper == "micro"){ kwArgs.fixUpper = "none"; }
- if(kwArgs.fixLower == "micro"){ kwArgs.fixLower = "none"; }
- }
- var lowerBound = findString(kwArgs.fixLower, ["major"]) ?
- Math.floor(kwArgs.min / majorTick) * majorTick :
- findString(kwArgs.fixLower, ["minor"]) ?
- Math.floor(kwArgs.min / minorTick) * minorTick :
- findString(kwArgs.fixLower, ["micro"]) ?
- Math.floor(kwArgs.min / microTick) * microTick : kwArgs.min,
- upperBound = findString(kwArgs.fixUpper, ["major"]) ?
- Math.ceil(kwArgs.max / majorTick) * majorTick :
- findString(kwArgs.fixUpper, ["minor"]) ?
- Math.ceil(kwArgs.max / minorTick) * minorTick :
- findString(kwArgs.fixUpper, ["micro"]) ?
- Math.ceil(kwArgs.max / microTick) * microTick : kwArgs.max;
-
- if(kwArgs.useMin){ min = lowerBound; }
- if(kwArgs.useMax){ max = upperBound; }
-
- var majorStart = (!majorTick || kwArgs.useMin && findString(kwArgs.fixLower, ["major"])) ?
- min : Math.ceil(min / majorTick) * majorTick,
- minorStart = (!minorTick || kwArgs.useMin && findString(kwArgs.fixLower, ["major", "minor"])) ?
- min : Math.ceil(min / minorTick) * minorTick,
- microStart = (! microTick || kwArgs.useMin && findString(kwArgs.fixLower, ["major", "minor", "micro"])) ?
- min : Math.ceil(min / microTick) * microTick,
- majorCount = !majorTick ? 0 : (kwArgs.useMax && findString(kwArgs.fixUpper, ["major"]) ?
- Math.round((max - majorStart) / majorTick) :
- Math.floor((max - majorStart) / majorTick)) + 1,
- minorCount = !minorTick ? 0 : (kwArgs.useMax && findString(kwArgs.fixUpper, ["major", "minor"]) ?
- Math.round((max - minorStart) / minorTick) :
- Math.floor((max - minorStart) / minorTick)) + 1,
- microCount = !microTick ? 0 : (kwArgs.useMax && findString(kwArgs.fixUpper, ["major", "minor", "micro"]) ?
- Math.round((max - microStart) / microTick) :
- Math.floor((max - microStart) / microTick)) + 1,
- minorPerMajor = minorTick ? Math.round(majorTick / minorTick) : 0,
- microPerMinor = microTick ? Math.round(minorTick / microTick) : 0,
- majorPrecision = majorTick ? Math.floor(Math.log(majorTick) / Math.LN10) : 0,
- minorPrecision = minorTick ? Math.floor(Math.log(minorTick) / Math.LN10) : 0,
- scale = span / (max - min);
- if(!isFinite(scale)){ scale = 1; }
-
- return {
- bounds: {
- lower: lowerBound,
- upper: upperBound,
- from: min,
- to: max,
- scale: scale,
- span: span
- },
- major: {
- tick: majorTick,
- start: majorStart,
- count: majorCount,
- prec: majorPrecision
- },
- minor: {
- tick: minorTick,
- start: minorStart,
- count: minorCount,
- prec: minorPrecision
- },
- micro: {
- tick: microTick,
- start: microStart,
- count: microCount,
- prec: 0
- },
- minorPerMajor: minorPerMajor,
- microPerMinor: microPerMinor,
- scaler: linear
- };
- };
-
- return lang.mixin(linear, {
- buildScaler: function(/*Number*/ min, /*Number*/ max, /*Number*/ span, /*Object*/ kwArgs){
- var h = {fixUpper: "none", fixLower: "none", natural: false};
- if(kwArgs){
- if("fixUpper" in kwArgs){ h.fixUpper = String(kwArgs.fixUpper); }
- if("fixLower" in kwArgs){ h.fixLower = String(kwArgs.fixLower); }
- if("natural" in kwArgs){ h.natural = Boolean(kwArgs.natural); }
- }
-
-
- if("min" in kwArgs){ min = kwArgs.min; }
- if("max" in kwArgs){ max = kwArgs.max; }
- if(kwArgs.includeZero){
- if(min > 0){ min = 0; }
- if(max < 0){ max = 0; }
- }
- h.min = min;
- h.useMin = true;
- h.max = max;
- h.useMax = true;
-
- if("from" in kwArgs){
- min = kwArgs.from;
- h.useMin = false;
- }
- if("to" in kwArgs){
- max = kwArgs.to;
- h.useMax = false;
- }
-
-
- if(max <= min){
- return calcTicks(min, max, h, 0, 0, 0, span);
- }
-
- var mag = Math.floor(Math.log(max - min) / Math.LN10),
- major = kwArgs && ("majorTickStep" in kwArgs) ? kwArgs.majorTickStep : Math.pow(10, mag),
- minor = 0, micro = 0, ticks;
-
-
- if(kwArgs && ("minorTickStep" in kwArgs)){
- minor = kwArgs.minorTickStep;
- }else{
- do{
- minor = major / 10;
- if(!h.natural || minor > 0.9){
- ticks = calcTicks(min, max, h, major, minor, 0, span);
- if(ticks.bounds.scale * ticks.minor.tick > deltaLimit){ break; }
- }
- minor = major / 5;
- if(!h.natural || minor > 0.9){
- ticks = calcTicks(min, max, h, major, minor, 0, span);
- if(ticks.bounds.scale * ticks.minor.tick > deltaLimit){ break; }
- }
- minor = major / 2;
- if(!h.natural || minor > 0.9){
- ticks = calcTicks(min, max, h, major, minor, 0, span);
- if(ticks.bounds.scale * ticks.minor.tick > deltaLimit){ break; }
- }
- return calcTicks(min, max, h, major, 0, 0, span);
- }while(false);
- }
-
-
- if(kwArgs && ("microTickStep" in kwArgs)){
- micro = kwArgs.microTickStep;
- ticks = calcTicks(min, max, h, major, minor, micro, span);
- }else{
- do{
- micro = minor / 10;
- if(!h.natural || micro > 0.9){
- ticks = calcTicks(min, max, h, major, minor, micro, span);
- if(ticks.bounds.scale * ticks.micro.tick > deltaLimit){ break; }
- }
- micro = minor / 5;
- if(!h.natural || micro > 0.9){
- ticks = calcTicks(min, max, h, major, minor, micro, span);
- if(ticks.bounds.scale * ticks.micro.tick > deltaLimit){ break; }
- }
- micro = minor / 2;
- if(!h.natural || micro > 0.9){
- ticks = calcTicks(min, max, h, major, minor, micro, span);
- if(ticks.bounds.scale * ticks.micro.tick > deltaLimit){ break; }
- }
- micro = 0;
- }while(false);
- }
-
- return micro ? ticks : calcTicks(min, max, h, major, minor, 0, span);
- },
- buildTicks: function(/*Object*/ scaler, /*Object*/ kwArgs){
- var step, next, tick,
- nextMajor = scaler.major.start,
- nextMinor = scaler.minor.start,
- nextMicro = scaler.micro.start;
- if(kwArgs.microTicks && scaler.micro.tick){
- step = scaler.micro.tick, next = nextMicro;
- }else if(kwArgs.minorTicks && scaler.minor.tick){
- step = scaler.minor.tick, next = nextMinor;
- }else if(scaler.major.tick){
- step = scaler.major.tick, next = nextMajor;
- }else{
-
- return null;
- }
-
- var revScale = 1 / scaler.bounds.scale;
- if(scaler.bounds.to <= scaler.bounds.from || isNaN(revScale) || !isFinite(revScale) ||
- step <= 0 || isNaN(step) || !isFinite(step)){
-
- return null;
- }
-
- var majorTicks = [], minorTicks = [], microTicks = [];
- while(next <= scaler.bounds.to + revScale){
- if(Math.abs(nextMajor - next) < step / 2){
-
- tick = {value: nextMajor};
- if(kwArgs.majorLabels){
- tick.label = getLabel(nextMajor, scaler.major.prec, kwArgs);
- }
- majorTicks.push(tick);
- nextMajor += scaler.major.tick;
- nextMinor += scaler.minor.tick;
- nextMicro += scaler.micro.tick;
- }else if(Math.abs(nextMinor - next) < step / 2){
-
- if(kwArgs.minorTicks){
- tick = {value: nextMinor};
- if(kwArgs.minorLabels && (scaler.minMinorStep <= scaler.minor.tick * scaler.bounds.scale)){
- tick.label = getLabel(nextMinor, scaler.minor.prec, kwArgs);
- }
- minorTicks.push(tick);
- }
- nextMinor += scaler.minor.tick;
- nextMicro += scaler.micro.tick;
- }else{
-
- if(kwArgs.microTicks){
- microTicks.push({value: nextMicro});
- }
- nextMicro += scaler.micro.tick;
- }
- next += step;
- }
- return {major: majorTicks, minor: minorTicks, micro: microTicks};
- },
- getTransformerFromModel: function(/*Object*/ scaler){
- var offset = scaler.bounds.from, scale = scaler.bounds.scale;
- return function(x){ return (x - offset) * scale; };
- },
- getTransformerFromPlot: function(/*Object*/ scaler){
- var offset = scaler.bounds.from, scale = scaler.bounds.scale;
- return function(x){ return x / scale + offset; };
- }
- });
- });
- },
- 'dojox/gfx/renderer':function(){
- define("dojox/gfx/renderer", ["./_base","dojo/_base/lang", "dojo/_base/sniff", "dojo/_base/window", "dojo/_base/config"],
- function(g, lang, has, win, config){
-
- var currentRenderer = null;
- has.add("vml", function(global, document, element){
- element.innerHTML = "<v:shape adj=\"1\"/>";
- var supported = ("adj" in element.firstChild);
- element.innerHTML = "";
- return supported;
- });
- return {
- load: function(id, require, load){
- if(currentRenderer && id != "force"){
- load(currentRenderer);
- return;
- }
- var renderer = config.forceGfxRenderer,
- renderers = !renderer && (lang.isString(config.gfxRenderer) ?
- config.gfxRenderer : "svg,vml,canvas,silverlight").split(","),
- silverlightObject, silverlightFlag;
- while(!renderer && renderers.length){
- switch(renderers.shift()){
- case "svg":
-
- if("SVGAngle" in win.global){
- renderer = "svg";
- }
- break;
- case "vml":
- if(has("vml")){
- renderer = "vml";
- }
- break;
- case "silverlight":
- try{
- if(has("ie")){
- silverlightObject = new ActiveXObject("AgControl.AgControl");
- if(silverlightObject && silverlightObject.IsVersionSupported("1.0")){
- silverlightFlag = true;
- }
- }else{
- if(navigator.plugins["Silverlight Plug-In"]){
- silverlightFlag = true;
- }
- }
- }catch(e){
- silverlightFlag = false;
- }finally{
- silverlightObject = null;
- }
- if(silverlightFlag){
- renderer = "silverlight";
- }
- break;
- case "canvas":
- if(win.global.CanvasRenderingContext2D){
- renderer = "canvas";
- }
- break;
- }
- }
- if (renderer === 'canvas' && config.canvasEvents !== false) {
- renderer = "canvasWithEvents";
- }
- if(config.isDebug){
- console.log("gfx renderer = " + renderer);
- }
- function loadRenderer(){
- require(["dojox/gfx/" + renderer], function(module){
- g.renderer = renderer;
-
- currentRenderer = module;
-
- load(module);
- });
- }
- if(renderer == "svg" && typeof window.svgweb != "undefined"){
- window.svgweb.addOnLoad(loadRenderer);
- }else{
- loadRenderer();
- }
- }
- };
- });
- },
- 'dojox/charting/widget/Chart':function(){
- define("dojox/charting/widget/Chart", ["dojo/_base/kernel", "dojo/_base/lang", "dojo/_base/array","dojo/_base/html","dojo/_base/declare", "dojo/query",
- "dijit/_Widget", "../Chart", "dojox/lang/utils", "dojox/lang/functional","dojox/lang/functional/lambda",
- "dijit/_base/manager"],
- function(kernel, lang, arr, html, declare, query, Widget, Chart, du, df, dfl){
- var collectParams, collectAxisParams, collectPlotParams,
- collectActionParams, collectDataParams,
- notNull = function(o){ return o; },
- dc = lang.getObject("dojox.charting");
-
- var ChartWidget = declare("dojox.charting.widget.Chart", Widget, {
-
-
-
- theme: null,
-
-
- margins: null,
-
-
-
-
- stroke: undefined,
- fill: undefined,
-
-
-
- buildRendering: function(){
- this.inherited(arguments);
-
- n = this.domNode;
-
-
- var axes = query("> .axis", n).map(collectAxisParams).filter(notNull),
- plots = query("> .plot", n).map(collectPlotParams).filter(notNull),
- actions = query("> .action", n).map(collectActionParams).filter(notNull),
- series = query("> .series", n).map(collectDataParams).filter(notNull);
-
-
- n.innerHTML = "";
- var c = this.chart = new Chart(n, {
- margins: this.margins,
- stroke: this.stroke,
- fill: this.fill,
- textDir: this.textDir
- });
-
-
- if(this.theme){
- c.setTheme(this.theme);
- }
- axes.forEach(function(axis){
- c.addAxis(axis.name, axis.kwArgs);
- });
- plots.forEach(function(plot){
- c.addPlot(plot.name, plot.kwArgs);
- });
-
- this.actions = actions.map(function(action){
- return new action.action(c, action.plot, action.kwArgs);
- });
-
- var render = df.foldl(series, function(render, series){
- if(series.type == "data"){
- c.addSeries(series.name, series.data, series.kwArgs);
- render = true;
- }else{
- c.addSeries(series.name, [0], series.kwArgs);
- var kw = {};
- du.updateWithPattern(
- kw,
- series.kwArgs,
- {
- "query": "",
- "queryOptions": null,
- "start": 0,
- "count": 1
-
- },
- true
- );
- if(series.kwArgs.sort){
-
- kw.sort = lang.clone(series.kwArgs.sort);
- }
- lang.mixin(kw, {
- onComplete: function(data){
- var values;
- if("valueFn" in series.kwArgs){
- var fn = series.kwArgs.valueFn;
- values = arr.map(data, function(x){
- return fn(series.data.getValue(x, series.field, 0));
- });
- }else{
- values = arr.map(data, function(x){
- return series.data.getValue(x, series.field, 0);
- });
- }
- c.addSeries(series.name, values, series.kwArgs).render();
- }
- });
- series.data.fetch(kw);
- }
- return render;
- }, false);
- if(render){ c.render(); }
- },
- destroy: function(){
-
- this.chart.destroy();
- this.inherited(arguments);
- },
- resize: function(box){
-
-
-
-
-
-
-
-
- this.chart.resize(box);
- }
- });
-
- collectParams = function(node, type, kw){
- var dp = eval("(" + type + ".prototype.defaultParams)");
- var x, attr;
- for(x in dp){
- if(x in kw){ continue; }
- attr = node.getAttribute(x);
- kw[x] = du.coerceType(dp[x], attr == null || typeof attr == "undefined" ? dp[x] : attr);
- }
- var op = eval("(" + type + ".prototype.optionalParams)");
- for(x in op){
- if(x in kw){ continue; }
- attr = node.getAttribute(x);
- if(attr != null){
- kw[x] = du.coerceType(op[x], attr);
- }
- }
- };
-
- collectAxisParams = function(node){
- var name = node.getAttribute("name"), type = node.getAttribute("type");
- if(!name){ return null; }
- var o = {name: name, kwArgs: {}}, kw = o.kwArgs;
- if(type){
- if(dc.axis2d[type]){
- type = dojo._scopeName + "x.charting.axis2d." + type;
- }
- var axis = eval("(" + type + ")");
- if(axis){ kw.type = axis; }
- }else{
- type = dojo._scopeName + "x.charting.axis2d.Default";
- }
- collectParams(node, type, kw);
-
- if(kw.font || kw.fontColor){
- if(!kw.tick){
- kw.tick = {};
- }
- if(kw.font){
- kw.tick.font = kw.font;
- }
- if(kw.fontColor){
- kw.tick.fontColor = kw.fontColor;
- }
- }
- return o;
- };
-
- collectPlotParams = function(node){
-
- var name = node.getAttribute("name"), type = node.getAttribute("type");
- if(!name){ return null; }
- var o = {name: name, kwArgs: {}}, kw = o.kwArgs;
- if(type){
- if(dc.plot2d && dc.plot2d[type]){
- type = dojo._scopeName + "x.charting.plot2d." + type;
- }
- var plot = eval("(" + type + ")");
- if(plot){ kw.type = plot; }
- }else{
- type = dojo._scopeName + "x.charting.plot2d.Default";
- }
- collectParams(node, type, kw);
- return o;
- };
-
- collectActionParams = function(node){
-
- var plot = node.getAttribute("plot"), type = node.getAttribute("type");
- if(!plot){ plot = "default"; }
- var o = {plot: plot, kwArgs: {}}, kw = o.kwArgs;
- if(type){
- if(dc.action2d[type]){
- type = dojo._scopeName + "x.charting.action2d." + type;
- }
- var action = eval("(" + type + ")");
- if(!action){ return null; }
- o.action = action;
- }else{
- return null;
- }
- collectParams(node, type, kw);
- return o;
- };
- collectDataParams = function(node){
- var ga = lang.partial(html.attr, node);
- var name = ga("name");
- if(!name){ return null; }
- var o = { name: name, kwArgs: {} }, kw = o.kwArgs, t;
- t = ga("plot");
- if(t != null){ kw.plot = t; }
- t = ga("marker");
- if(t != null){ kw.marker = t; }
- t = ga("stroke");
- if(t != null){ kw.stroke = eval("(" + t + ")"); }
- t = ga("outline");
- if(t != null){ kw.outline = eval("(" + t + ")"); }
- t = ga("shadow");
- if(t != null){ kw.shadow = eval("(" + t + ")"); }
- t = ga("fill");
- if(t != null){ kw.fill = eval("(" + t + ")"); }
- t = ga("font");
- if(t != null){ kw.font = t; }
- t = ga("fontColor");
- if(t != null){ kw.fontColor = eval("(" + t + ")"); }
- t = ga("legend");
- if(t != null){ kw.legend = t; }
- t = ga("data");
- if(t != null){
- o.type = "data";
- o.data = t ? arr.map(String(t).split(','), Number) : [];
- return o;
- }
- t = ga("array");
- if(t != null){
- o.type = "data";
- o.data = eval("(" + t + ")");
- return o;
- }
- t = ga("store");
- if(t != null){
- o.type = "store";
- o.data = eval("(" + t + ")");
- t = ga("field");
- o.field = t != null ? t : "value";
- t = ga("query");
- if(!!t){ kw.query = t; }
- t = ga("queryOptions");
- if(!!t){ kw.queryOptions = eval("(" + t + ")"); }
- t = ga("start");
- if(!!t){ kw.start = Number(t); }
- t = ga("count");
- if(!!t){ kw.count = Number(t); }
- t = ga("sort");
- if(!!t){ kw.sort = eval("("+t+")"); }
- t = ga("valueFn");
- if(!!t){ kw.valueFn = dfl.lambda(t); }
- return o;
- }
- return null;
- };
-
- return ChartWidget;
- });
- },
- 'dojox/lang/functional':function(){
- define("dojox/lang/functional", ["./functional/lambda", "./functional/array", "./functional/object"], function(df){
- return df;
- });
- },
- 'dojox/charting/scaler/common':function(){
- define("dojox/charting/scaler/common", ["dojo/_base/lang"], function(lang){
- var eq = function(/*Number*/ a, /*Number*/ b){
-
- return Math.abs(a - b) <= 1e-6 * (Math.abs(a) + Math.abs(b));
- };
-
- var common = lang.getObject("dojox.charting.scaler.common", true);
-
- var testedModules = {};
- return lang.mixin(common, {
- doIfLoaded: function(moduleName, ifloaded, ifnotloaded){
- if(testedModules[moduleName] == undefined){
- try{
- testedModules[moduleName] = require(moduleName);
- }catch(e){
- testedModules[moduleName] = null;
- }
- }
- if(testedModules[moduleName]){
- return ifloaded(testedModules[moduleName]);
- }else{
- return ifnotloaded();
- }
- },
- findString: function(/*String*/ val, /*Array*/ text){
- val = val.toLowerCase();
- for(var i = 0; i < text.length; ++i){
- if(val == text[i]){ return true; }
- }
- return false;
- },
- getNumericLabel: function(/*Number*/ number, /*Number*/ precision, /*Object*/ kwArgs){
- var def = "";
- common.doIfLoaded("dojo/number", function(numberLib){
- def = (kwArgs.fixed ? numberLib.format(number, {places : precision < 0 ? -precision : 0}) :
- numberLib.format(number)) || "";
- }, function(){
- def = kwArgs.fixed ? number.toFixed(precision < 0 ? -precision : 0) : number.toString();
- });
- if(kwArgs.labelFunc){
- var r = kwArgs.labelFunc(def, number, precision);
- if(r){ return r; }
-
- }
- if(kwArgs.labels){
-
- var l = kwArgs.labels, lo = 0, hi = l.length;
- while(lo < hi){
- var mid = Math.floor((lo + hi) / 2), val = l[mid].value;
- if(val < number){
- lo = mid + 1;
- }else{
- hi = mid;
- }
- }
-
- if(lo < l.length && eq(l[lo].value, number)){
- return l[lo].text;
- }
- --lo;
- if(lo >= 0 && lo < l.length && eq(l[lo].value, number)){
- return l[lo].text;
- }
- lo += 2;
- if(lo < l.length && eq(l[lo].value, number)){
- return l[lo].text;
- }
-
- }
- return def;
- }
- });
- });
- },
- 'dojox/charting/axis2d/common':function(){
- define("dojox/charting/axis2d/common", ["dojo/_base/lang", "dojo/_base/html", "dojo/_base/window", "dojo/dom-geometry", "dojox/gfx"],
- function(lang, html, win, domGeom, g){
- var common = lang.getObject("dojox.charting.axis2d.common", true);
-
- var clearNode = function(s){
- s.marginLeft = "0px";
- s.marginTop = "0px";
- s.marginRight = "0px";
- s.marginBottom = "0px";
- s.paddingLeft = "0px";
- s.paddingTop = "0px";
- s.paddingRight = "0px";
- s.paddingBottom = "0px";
- s.borderLeftWidth = "0px";
- s.borderTopWidth = "0px";
- s.borderRightWidth = "0px";
- s.borderBottomWidth = "0px";
- };
- var getBoxWidth = function(n){
-
- if(n["getBoundingClientRect"]){
- var bcr = n.getBoundingClientRect();
- return bcr.width || (bcr.right - bcr.left);
- }else{
- return domGeom.getMarginBox(n).w;
- }
- };
- return lang.mixin(common, {
-
-
- createText: {
- gfx: function(chart, creator, x, y, align, text, font, fontColor){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- return creator.createText({
- x: x, y: y, text: text, align: align
- }).setFont(font).setFill(fontColor);
- },
- html: function(chart, creator, x, y, align, text, font, fontColor, labelWidth){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var p = win.doc.createElement("div"), s = p.style, boxWidth;
-
- if(chart.getTextDir){
- p.dir = chart.getTextDir(text);
- }
- clearNode(s);
- s.font = font;
- p.innerHTML = String(text).replace(/\s/g, " ");
- s.color = fontColor;
-
- s.position = "absolute";
- s.left = "-10000px";
- win.body().appendChild(p);
- var size = g.normalizedLength(g.splitFontString(font).size);
-
- if(!labelWidth){
- boxWidth = getBoxWidth(p);
- }
-
-
- if(p.dir == "rtl"){
- x += labelWidth ? labelWidth : boxWidth;
- }
-
- win.body().removeChild(p);
- s.position = "relative";
- if(labelWidth){
- s.width = labelWidth + "px";
-
- switch(align){
- case "middle":
- s.textAlign = "center";
- s.left = (x - labelWidth / 2) + "px";
- break;
- case "end":
- s.textAlign = "right";
- s.left = (x - labelWidth) + "px";
- break;
- default:
- s.left = x + "px";
- s.textAlign = "left";
- break;
- }
- }else{
- switch(align){
- case "middle":
- s.left = Math.floor(x - boxWidth / 2) + "px";
-
- break;
- case "end":
- s.left = Math.floor(x - boxWidth) + "px";
-
- break;
-
- default:
- s.left = Math.floor(x) + "px";
- break;
- }
- }
- s.top = Math.floor(y - size) + "px";
- s.whiteSpace = "nowrap";
-
- var wrap = win.doc.createElement("div"), w = wrap.style;
- clearNode(w);
- w.width = "0px";
- w.height = "0px";
-
- wrap.appendChild(p)
- chart.node.insertBefore(wrap, chart.node.firstChild);
- return wrap;
- }
- }
- });
- });
- },
- 'dijit/_TemplatedMixin':function(){
- define("dijit/_TemplatedMixin", [
- "dojo/_base/lang",
- "dojo/touch",
- "./_WidgetBase",
- "dojo/string",
- "dojo/cache",
- "dojo/_base/array",
- "dojo/_base/declare",
- "dojo/dom-construct",
- "dojo/_base/sniff",
- "dojo/_base/unload",
- "dojo/_base/window"
- ], function(lang, touch, _WidgetBase, string, cache, array, declare, domConstruct, has, unload, win) {
-
-
-
-
- var _TemplatedMixin = declare("dijit._TemplatedMixin", null, {
-
-
-
-
-
- templateString: null,
-
-
-
- templatePath: null,
-
-
-
-
- _skipNodeCache: false,
-
-
-
-
-
-
-
- _earlyTemplatedStartup: false,
- constructor: function(){
- this._attachPoints = [];
- this._attachEvents = [];
- },
- _stringRepl: function(tmpl){
-
-
-
-
- var className = this.declaredClass, _this = this;
-
-
- return string.substitute(tmpl, this, function(value, key){
- if(key.charAt(0) == '!'){ value = lang.getObject(key.substr(1), false, _this); }
- if(typeof value == "undefined"){ throw new Error(className+" template:"+key); }
- if(value == null){ return ""; }
-
-
- return key.charAt(0) == "!" ? value :
-
-
- value.toString().replace(/"/g,""");
- }, this);
- },
- buildRendering: function(){
-
-
-
-
- if(!this.templateString){
- this.templateString = cache(this.templatePath, {sanitize: true});
- }
-
-
-
- var cached = _TemplatedMixin.getCachedTemplate(this.templateString, this._skipNodeCache);
- var node;
- if(lang.isString(cached)){
- node = domConstruct.toDom(this._stringRepl(cached));
- if(node.nodeType != 1){
-
- throw new Error("Invalid template: " + cached);
- }
- }else{
-
- node = cached.cloneNode(true);
- }
- this.domNode = node;
-
-
- this.inherited(arguments);
-
-
- this._attachTemplateNodes(node, function(n,p){ return n.getAttribute(p); });
- this._beforeFillContent();
- this._fillContent(this.srcNodeRef);
- },
- _beforeFillContent: function(){
- },
- _fillContent: function(/*DomNode*/ source){
-
-
-
-
-
- var dest = this.containerNode;
- if(source && dest){
- while(source.hasChildNodes()){
- dest.appendChild(source.firstChild);
- }
- }
- },
- _attachTemplateNodes: function(rootNode, getAttrFunc){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var nodes = lang.isArray(rootNode) ? rootNode : (rootNode.all || rootNode.getElementsByTagName("*"));
- var x = lang.isArray(rootNode) ? 0 : -1;
- for(; x<nodes.length; x++){
- var baseNode = (x == -1) ? rootNode : nodes[x];
- if(this.widgetsInTemplate && (getAttrFunc(baseNode, "dojoType") || getAttrFunc(baseNode, "data-dojo-type"))){
- continue;
- }
-
- var attachPoint = getAttrFunc(baseNode, "dojoAttachPoint") || getAttrFunc(baseNode, "data-dojo-attach-point");
- if(attachPoint){
- var point, points = attachPoint.split(/\s*,\s*/);
- while((point = points.shift())){
- if(lang.isArray(this[point])){
- this[point].push(baseNode);
- }else{
- this[point]=baseNode;
- }
- this._attachPoints.push(point);
- }
- }
-
- var attachEvent = getAttrFunc(baseNode, "dojoAttachEvent") || getAttrFunc(baseNode, "data-dojo-attach-event");
- if(attachEvent){
-
-
- var event, events = attachEvent.split(/\s*,\s*/);
- var trim = lang.trim;
- while((event = events.shift())){
- if(event){
- var thisFunc = null;
- if(event.indexOf(":") != -1){
-
- var funcNameArr = event.split(":");
- event = trim(funcNameArr[0]);
- thisFunc = trim(funcNameArr[1]);
- }else{
- event = trim(event);
- }
- if(!thisFunc){
- thisFunc = event;
- }
-
- this._attachEvents.push(this.connect(baseNode, touch[event] || event, thisFunc));
- }
- }
- }
- }
- },
- destroyRendering: function(){
-
- array.forEach(this._attachPoints, function(point){
- delete this[point];
- }, this);
- this._attachPoints = [];
-
- array.forEach(this._attachEvents, this.disconnect, this);
- this._attachEvents = [];
- this.inherited(arguments);
- }
- });
-
- _TemplatedMixin._templateCache = {};
- _TemplatedMixin.getCachedTemplate = function(templateString, alwaysUseString){
-
-
-
-
-
-
-
-
-
-
-
- var tmplts = _TemplatedMixin._templateCache;
- var key = templateString;
- var cached = tmplts[key];
- if(cached){
- try{
-
- if(!cached.ownerDocument || cached.ownerDocument == win.doc){
-
- return cached;
- }
- }catch(e){ }
- domConstruct.destroy(cached);
- }
- templateString = string.trim(templateString);
- if(alwaysUseString || templateString.match(/\$\{([^\}]+)\}/g)){
-
- return (tmplts[key] = templateString);
- }else{
-
- var node = domConstruct.toDom(templateString);
- if(node.nodeType != 1){
- throw new Error("Invalid template: " + templateString);
- }
- return (tmplts[key] = node);
- }
- };
- if(has("ie")){
- unload.addOnWindowUnload(function(){
- var cache = _TemplatedMixin._templateCache;
- for(var key in cache){
- var value = cache[key];
- if(typeof value == "object"){
- domConstruct.destroy(value);
- }
- delete cache[key];
- }
- });
- }
-
-
-
- lang.extend(_WidgetBase,{
- dojoAttachEvent: "",
- dojoAttachPoint: ""
- });
- return _TemplatedMixin;
- });
- },
- 'dojox/lang/functional/object':function(){
- define("dojox/lang/functional/object", ["dojo/_base/kernel", "dojo/_base/lang", "dojo/_base/window", "./lambda"], function(dojo, lang, win, df){
- var empty = {};
- lang.mixin(df, {
-
- keys: function(/*Object*/ obj){
-
- var t = [];
- for(var i in obj){
- if(!(i in empty)){
- t.push(i);
- }
- }
- return t;
- },
- values: function(/*Object*/ obj){
-
- var t = [];
- for(var i in obj){
- if(!(i in empty)){
- t.push(obj[i]);
- }
- }
- return t;
- },
- filterIn: function(/*Object*/ obj, /*Function|String|Array*/ f, /*Object?*/ o){
-
-
- o = o || win.global; f = df.lambda(f);
- var t = {}, v, i;
- for(i in obj){
- if(!(i in empty)){
- v = obj[i];
- if(f.call(o, v, i, obj)){ t[i] = v; }
- }
- }
- return t;
- },
- forIn: function(/*Object*/ obj, /*Function|String|Array*/ f, /*Object?*/ o){
-
- o = o || win.global; f = df.lambda(f);
- for(var i in obj){
- if(!(i in empty)){
- f.call(o, obj[i], i, obj);
- }
- }
- return o;
- },
- mapIn: function(/*Object*/ obj, /*Function|String|Array*/ f, /*Object?*/ o){
-
-
- o = o || win.global; f = df.lambda(f);
- var t = {}, i;
- for(i in obj){
- if(!(i in empty)){
- t[i] = f.call(o, obj[i], i, obj);
- }
- }
- return t;
- }
- });
-
- return df;
- });
- },
- 'dojo/window':function(){
- define(["./_base/lang", "./_base/sniff", "./_base/window", "./dom", "./dom-geometry", "./dom-style", "./dom-construct"],
- function(lang, has, baseWindow, dom, geom, style, domConstruct) {
-
-
- has.add("rtl-adjust-position-for-verticalScrollBar", function(win, doc){
- var body = baseWindow.body(doc),
- scrollable = domConstruct.create('div', {
- style: {overflow:'scroll', overflowX:'visible', direction:'rtl', visibility:'hidden', position:'absolute', left:'0', top:'0', width:'64px', height:'64px'}
- }, body, "last"),
- div = domConstruct.create('div', {
- style: {overflow:'hidden', direction:'ltr'}
- }, scrollable, "last"),
- ret = geom.position(div).x != 0;
- scrollable.removeChild(div);
- body.removeChild(scrollable);
- return ret;
- });
- has.add("position-fixed-support", function(win, doc){
-
- var body = baseWindow.body(doc),
- outer = domConstruct.create('span', {
- style: {visibility:'hidden', position:'fixed', left:'1px', top:'1px'}
- }, body, "last"),
- inner = domConstruct.create('span', {
- style: {position:'fixed', left:'0', top:'0'}
- }, outer, "last"),
- ret = geom.position(inner).x != geom.position(outer).x;
- outer.removeChild(inner);
- body.removeChild(outer);
- return ret;
- });
- var window = lang.getObject("dojo.window", true);
- window.getBox = function(){
-
-
- var
- scrollRoot = (baseWindow.doc.compatMode == 'BackCompat') ? baseWindow.body() : baseWindow.doc.documentElement,
-
- scroll = geom.docScroll(),
- w, h;
- if(has("touch")){
- var uiWindow = baseWindow.doc.parentWindow || baseWindow.doc.defaultView;
-
- w = uiWindow.innerWidth || scrollRoot.clientWidth;
- h = uiWindow.innerHeight || scrollRoot.clientHeight;
- }else{
-
-
- w = scrollRoot.clientWidth;
- h = scrollRoot.clientHeight;
- }
- return {
- l: scroll.x,
- t: scroll.y,
- w: w,
- h: h
- };
- };
- window.get = function(doc){
-
-
-
-
-
-
- if(has("ie") < 9 && window !== document.parentWindow){
-
- doc.parentWindow.execScript("document._parentWindow = window;", "Javascript");
-
-
- var win = doc._parentWindow;
- doc._parentWindow = null;
- return win;
- }
- return doc.parentWindow || doc.defaultView;
- };
- window.scrollIntoView = function(/*DomNode*/ node, /*Object?*/ pos){
-
-
-
-
-
-
- try{
- node = dom.byId(node);
- var doc = node.ownerDocument || baseWindow.doc,
- body = baseWindow.body(doc),
- html = doc.documentElement || body.parentNode,
- isIE = has("ie"),
- isWK = has("webkit");
-
- if(node == body || node == html){ return; }
- if(!(has("mozilla") || isIE || isWK || has("opera") || has("trident")) && ("scrollIntoView" in node)){
- node.scrollIntoView(false);
- return;
- }
- var backCompat = doc.compatMode == 'BackCompat',
- rootWidth = Math.min(body.clientWidth || html.clientWidth, html.clientWidth || body.clientWidth),
- rootHeight = Math.min(body.clientHeight || html.clientHeight, html.clientHeight || body.clientHeight),
- scrollRoot = (isWK || backCompat) ? body : html,
- nodePos = pos || geom.position(node),
- el = node.parentNode,
- isFixed = function(el){
- return (isIE <= 6 || (isIE == 7 && backCompat))
- ? false
- : (has("position-fixed-support") && (style.get(el, 'position').toLowerCase() == "fixed"));
- },
- self = this,
- scrollElementBy = function(el, x, y){
- if(el.tagName == "BODY" || el.tagName == "HTML"){
- self.get(el.ownerDocument).scrollBy(x, y);
- }else{
- x && (el.scrollLeft += x);
- y && (el.scrollTop += y);
- }
- };
- if(isFixed(node)){ return; }
- while(el){
- if(el == body){ el = scrollRoot; }
- var elPos = geom.position(el),
- fixedPos = isFixed(el),
- rtl = style.getComputedStyle(el).direction.toLowerCase() == "rtl";
- if(el == scrollRoot){
- elPos.w = rootWidth; elPos.h = rootHeight;
- if(scrollRoot == html && (isIE || has("trident")) && rtl){ elPos.x += scrollRoot.offsetWidth-elPos.w; }
- if(elPos.x < 0 || !isIE || isIE >= 9 || has("trident")){ elPos.x = 0; }
- if(elPos.y < 0 || !isIE || isIE >= 9 || has("trident")){ elPos.y = 0; }
- }else{
- var pb = geom.getPadBorderExtents(el);
- elPos.w -= pb.w; elPos.h -= pb.h; elPos.x += pb.l; elPos.y += pb.t;
- var clientSize = el.clientWidth,
- scrollBarSize = elPos.w - clientSize;
- if(clientSize > 0 && scrollBarSize > 0){
- if(rtl && has("rtl-adjust-position-for-verticalScrollBar")){
- elPos.x += scrollBarSize;
- }
- elPos.w = clientSize;
- }
- clientSize = el.clientHeight;
- scrollBarSize = elPos.h - clientSize;
- if(clientSize > 0 && scrollBarSize > 0){
- elPos.h = clientSize;
- }
- }
- if(fixedPos){
- if(elPos.y < 0){
- elPos.h += elPos.y; elPos.y = 0;
- }
- if(elPos.x < 0){
- elPos.w += elPos.x; elPos.x = 0;
- }
- if(elPos.y + elPos.h > rootHeight){
- elPos.h = rootHeight - elPos.y;
- }
- if(elPos.x + elPos.w > rootWidth){
- elPos.w = rootWidth - elPos.x;
- }
- }
-
- var l = nodePos.x - elPos.x,
- t = nodePos.y - elPos.y,
- r = l + nodePos.w - elPos.w,
- bot = t + nodePos.h - elPos.h;
- var s, old;
- if(r * l > 0 && (!!el.scrollLeft || el == scrollRoot || el.scrollWidth > el.offsetHeight)){
- s = Math[l < 0? "max" : "min"](l, r);
- if(rtl && ((isIE == 8 && !backCompat) || isIE >= 9 || has("trident"))){ s = -s; }
- old = el.scrollLeft;
- scrollElementBy(el, s, 0);
- s = el.scrollLeft - old;
- nodePos.x -= s;
- }
- if(bot * t > 0 && (!!el.scrollTop || el == scrollRoot || el.scrollHeight > el.offsetHeight)){
- s = Math.ceil(Math[t < 0? "max" : "min"](t, bot));
- old = el.scrollTop;
- scrollElementBy(el, 0, s);
- s = el.scrollTop - old;
- nodePos.y -= s;
- }
- el = (el != scrollRoot) && !fixedPos && el.parentNode;
- }
- }catch(error){
- console.error('scrollIntoView: ' + error);
- node.scrollIntoView(false);
- }
- };
- return window;
- });
- },
- 'dojox/charting/axis2d/Default':function(){
- define("dojox/charting/axis2d/Default", ["dojo/_base/lang", "dojo/_base/array","dojo/_base/sniff", "dojo/_base/declare",
- "dojo/_base/connect", "dojo/_base/html", "dojo/dom-geometry", "./Invisible",
- "../scaler/common", "../scaler/linear", "./common", "dojox/gfx", "dojox/lang/utils"],
- function(lang, arr, has, declare, connect, html, domGeom, Invisible, scommon,
- lin, acommon, g, du){
-
- var labelGap = 4,
- centerAnchorLimit = 45;
- return declare("dojox.charting.axis2d.Default", Invisible, {
-
-
-
-
-
-
-
-
- defaultParams: {
- vertical: false,
- fixUpper: "none",
- fixLower: "none",
- natural: false,
- leftBottom: true,
- includeZero: false,
- fixed: true,
- majorLabels: true,
- minorTicks: true,
- minorLabels: true,
- microTicks: false,
- rotation: 0,
- htmlLabels: true,
- enableCache: false
- },
- optionalParams: {
- min: 0,
- max: 1,
- from: 0,
- to: 1,
- majorTickStep: 4,
- minorTickStep: 2,
- microTickStep: 1,
- labels: [],
-
-
- labelFunc: null,
- maxLabelSize: 0,
- maxLabelCharCount: 0,
- trailingSymbol: null,
-
-
-
- stroke: {},
- majorTick: {},
- minorTick: {},
- microTick: {},
- tick: {},
- font: "",
- fontColor: "",
- title: "",
- titleGap: 0,
- titleFont: "",
- titleFontColor: "",
- titleOrientation: ""
- },
- constructor: function(chart, kwArgs){
-
-
-
-
-
-
- this.opt = lang.clone(this.defaultParams);
- du.updateWithObject(this.opt, kwArgs);
- du.updateWithPattern(this.opt, kwArgs, this.optionalParams);
- if(this.opt.enableCache){
- this._textFreePool = [];
- this._lineFreePool = [];
- this._textUsePool = [];
- this._lineUsePool = [];
- }
- },
- getOffsets: function(){
-
-
-
-
- var s = this.scaler, offsets = { l: 0, r: 0, t: 0, b: 0 };
- if(!s){
- return offsets;
- }
- var o = this.opt, labelWidth = 0, a, b, c, d,
- gl = scommon.getNumericLabel,
- offset = 0, ma = s.major, mi = s.minor,
- ta = this.chart.theme.axis,
-
- taFont = o.font || (ta.majorTick && ta.majorTick.font) || (ta.tick && ta.tick.font),
- taTitleFont = o.titleFont || (ta.tick && ta.tick.titleFont),
- taTitleGap = (o.titleGap==0) ? 0 : o.titleGap || (ta.tick && ta.tick.titleGap) || 15,
- taMajorTick = this.chart.theme.getTick("major", o),
- taMinorTick = this.chart.theme.getTick("minor", o),
- size = taFont ? g.normalizedLength(g.splitFontString(taFont).size) : 0,
- tsize = taTitleFont ? g.normalizedLength(g.splitFontString(taTitleFont).size) : 0,
- rotation = o.rotation % 360, leftBottom = o.leftBottom,
- cosr = Math.abs(Math.cos(rotation * Math.PI / 180)),
- sinr = Math.abs(Math.sin(rotation * Math.PI / 180));
- this.trailingSymbol = (o.trailingSymbol === undefined || o.trailingSymbol === null) ? this.trailingSymbol : o.trailingSymbol;
- if(rotation < 0){
- rotation += 360;
- }
- if(size){
-
- if(this.labels){
- labelWidth = this._groupLabelWidth(this.labels, taFont, o.maxLabelCharCount);
- }else{
- labelWidth = this._groupLabelWidth([
- gl(ma.start, ma.prec, o),
- gl(ma.start + ma.count * ma.tick, ma.prec, o),
- gl(mi.start, mi.prec, o),
- gl(mi.start + mi.count * mi.tick, mi.prec, o)
- ], taFont, o.maxLabelCharCount);
- }
- labelWidth = o.maxLabelSize ? Math.min(o.maxLabelSize, labelWidth) : labelWidth;
- if(this.vertical){
- var side = leftBottom ? "l" : "r";
- switch(rotation){
- case 0:
- case 180:
- offsets[side] = labelWidth;
- offsets.t = offsets.b = size / 2;
- break;
- case 90:
- case 270:
- offsets[side] = size;
- offsets.t = offsets.b = labelWidth / 2;
- break;
- default:
- if(rotation <= centerAnchorLimit || (180 < rotation && rotation <= (180 + centerAnchorLimit))){
- offsets[side] = size * sinr / 2 + labelWidth * cosr;
- offsets[leftBottom ? "t" : "b"] = size * cosr / 2 + labelWidth * sinr;
- offsets[leftBottom ? "b" : "t"] = size * cosr / 2;
- }else if(rotation > (360 - centerAnchorLimit) || (180 > rotation && rotation > (180 - centerAnchorLimit))){
- offsets[side] = size * sinr / 2 + labelWidth * cosr;
- offsets[leftBottom ? "b" : "t"] = size * cosr / 2 + labelWidth * sinr;
- offsets[leftBottom ? "t" : "b"] = size * cosr / 2;
- }else if(rotation < 90 || (180 < rotation && rotation < 270)){
- offsets[side] = size * sinr + labelWidth * cosr;
- offsets[leftBottom ? "t" : "b"] = size * cosr + labelWidth * sinr;
- }else{
- offsets[side] = size * sinr + labelWidth * cosr;
- offsets[leftBottom ? "b" : "t"] = size * cosr + labelWidth * sinr;
- }
- break;
- }
- offsets[side] += labelGap + Math.max(taMajorTick.length, taMinorTick.length) + (o.title ? (tsize + taTitleGap) : 0);
- }else{
- var side = leftBottom ? "b" : "t";
- switch(rotation){
- case 0:
- case 180:
- offsets[side] = size;
- offsets.l = offsets.r = labelWidth / 2;
- break;
- case 90:
- case 270:
- offsets[side] = labelWidth;
- offsets.l = offsets.r = size / 2;
- break;
- default:
- if((90 - centerAnchorLimit) <= rotation && rotation <= 90 || (270 - centerAnchorLimit) <= rotation && rotation <= 270){
- offsets[side] = size * sinr / 2 + labelWidth * cosr;
- offsets[leftBottom ? "r" : "l"] = size * cosr / 2 + labelWidth * sinr;
- offsets[leftBottom ? "l" : "r"] = size * cosr / 2;
- }else if(90 <= rotation && rotation <= (90 + centerAnchorLimit) || 270 <= rotation && rotation <= (270 + centerAnchorLimit)){
- offsets[side] = size * sinr / 2 + labelWidth * cosr;
- offsets[leftBottom ? "l" : "r"] = size * cosr / 2 + labelWidth * sinr;
- offsets[leftBottom ? "r" : "l"] = size * cosr / 2;
- }else if(rotation < centerAnchorLimit || (180 < rotation && rotation < (180 - centerAnchorLimit))){
- offsets[side] = size * sinr + labelWidth * cosr;
- offsets[leftBottom ? "r" : "l"] = size * cosr + labelWidth * sinr;
- }else{
- offsets[side] = size * sinr + labelWidth * cosr;
- offsets[leftBottom ? "l" : "r"] = size * cosr + labelWidth * sinr;
- }
- break;
- }
- offsets[side] += labelGap + Math.max(taMajorTick.length, taMinorTick.length) + (o.title ? (tsize + taTitleGap) : 0);
- }
- }
- if(labelWidth){
- this._cachedLabelWidth = labelWidth;
- }
- return offsets;
- },
- cleanGroup: function(creator){
- if(this.opt.enableCache && this.group){
- this._lineFreePool = this._lineFreePool.concat(this._lineUsePool);
- this._lineUsePool = [];
- this._textFreePool = this._textFreePool.concat(this._textUsePool);
- this._textUsePool = [];
- }
- this.inherited(arguments);
- },
- createText: function(labelType, creator, x, y, align, textContent, font, fontColor, labelWidth){
- if(!this.opt.enableCache || labelType=="html"){
- return acommon.createText[labelType](
- this.chart,
- creator,
- x,
- y,
- align,
- textContent,
- font,
- fontColor,
- labelWidth
- );
- }
- var text;
- if (this._textFreePool.length > 0){
- text = this._textFreePool.pop();
- text.setShape({x: x, y: y, text: textContent, align: align});
-
-
-
- creator.add(text);
- }else{
- text = acommon.createText[labelType](
- this.chart,
- creator,
- x,
- y,
- align,
- textContent,
- font,
- fontColor,
- labelWidth
- ); }
- this._textUsePool.push(text);
- return text;
- },
- createLine: function(creator, params){
- var line;
- if(this.opt.enableCache && this._lineFreePool.length > 0){
- line = this._lineFreePool.pop();
- line.setShape(params);
-
- creator.add(line);
- }else{
- line = creator.createLine(params);
- }
- if(this.opt.enableCache){
- this._lineUsePool.push(line);
- }
- return line;
- },
- render: function(dim, offsets){
-
-
-
-
-
-
-
-
- if(!this.dirty){
- return this;
- }
-
- var o = this.opt, ta = this.chart.theme.axis, leftBottom = o.leftBottom, rotation = o.rotation % 360,
- start, stop, titlePos, titleRotation=0, titleOffset, axisVector, tickVector, anchorOffset, labelOffset, labelAlign,
-
- taFont = o.font || (ta.majorTick && ta.majorTick.font) || (ta.tick && ta.tick.font),
- taTitleFont = o.titleFont || (ta.tick && ta.tick.titleFont),
-
- taFontColor = o.fontColor || (ta.majorTick && ta.majorTick.fontColor) || (ta.tick && ta.tick.fontColor) || "black",
- taTitleFontColor = o.titleFontColor || (ta.tick && ta.tick.titleFontColor) || "black",
- taTitleGap = (o.titleGap==0) ? 0 : o.titleGap || (ta.tick && ta.tick.titleGap) || 15,
- taTitleOrientation = o.titleOrientation || (ta.tick && ta.tick.titleOrientation) || "axis",
- taMajorTick = this.chart.theme.getTick("major", o),
- taMinorTick = this.chart.theme.getTick("minor", o),
- taMicroTick = this.chart.theme.getTick("micro", o),
- tickSize = Math.max(taMajorTick.length, taMinorTick.length, taMicroTick.length),
- taStroke = "stroke" in o ? o.stroke : ta.stroke,
- size = taFont ? g.normalizedLength(g.splitFontString(taFont).size) : 0,
- cosr = Math.abs(Math.cos(rotation * Math.PI / 180)),
- sinr = Math.abs(Math.sin(rotation * Math.PI / 180)),
- tsize = taTitleFont ? g.normalizedLength(g.splitFontString(taTitleFont).size) : 0;
- if(rotation < 0){
- rotation += 360;
- }
- if(this.vertical){
- start = {y: dim.height - offsets.b};
- stop = {y: offsets.t};
- titlePos = {y: (dim.height - offsets.b + offsets.t)/2};
- titleOffset = size * sinr + (this._cachedLabelWidth || 0) * cosr + labelGap + Math.max(taMajorTick.length, taMinorTick.length) + tsize + taTitleGap;
- axisVector = {x: 0, y: -1};
- labelOffset = {x: 0, y: 0};
- tickVector = {x: 1, y: 0};
- anchorOffset = {x: labelGap, y: 0};
- switch(rotation){
- case 0:
- labelAlign = "end";
- labelOffset.y = size * 0.4;
- break;
- case 90:
- labelAlign = "middle";
- labelOffset.x = -size;
- break;
- case 180:
- labelAlign = "start";
- labelOffset.y = -size * 0.4;
- break;
- case 270:
- labelAlign = "middle";
- break;
- default:
- if(rotation < centerAnchorLimit){
- labelAlign = "end";
- labelOffset.y = size * 0.4;
- }else if(rotation < 90){
- labelAlign = "end";
- labelOffset.y = size * 0.4;
- }else if(rotation < (180 - centerAnchorLimit)){
- labelAlign = "start";
- }else if(rotation < (180 + centerAnchorLimit)){
- labelAlign = "start";
- labelOffset.y = -size * 0.4;
- }else if(rotation < 270){
- labelAlign = "start";
- labelOffset.x = leftBottom ? 0 : size * 0.4;
- }else if(rotation < (360 - centerAnchorLimit)){
- labelAlign = "end";
- labelOffset.x = leftBottom ? 0 : size * 0.4;
- }else{
- labelAlign = "end";
- labelOffset.y = size * 0.4;
- }
- }
- if(leftBottom){
- start.x = stop.x = offsets.l;
- titleRotation = (taTitleOrientation && taTitleOrientation == "away") ? 90 : 270;
- titlePos.x = offsets.l - titleOffset + (titleRotation == 270 ? tsize : 0);
- tickVector.x = -1;
- anchorOffset.x = -anchorOffset.x;
- }else{
- start.x = stop.x = dim.width - offsets.r;
- titleRotation = (taTitleOrientation && taTitleOrientation == "axis") ? 90 : 270;
- titlePos.x = dim.width - offsets.r + titleOffset - (titleRotation == 270 ? 0 : tsize);
- switch(labelAlign){
- case "start":
- labelAlign = "end";
- break;
- case "end":
- labelAlign = "start";
- break;
- case "middle":
- labelOffset.x += size;
- break;
- }
- }
- }else{
- start = {x: offsets.l};
- stop = {x: dim.width - offsets.r};
- titlePos = {x: (dim.width - offsets.r + offsets.l)/2};
- titleOffset = size * cosr + (this._cachedLabelWidth || 0) * sinr + labelGap + Math.max(taMajorTick.length, taMinorTick.length) + tsize + taTitleGap;
- axisVector = {x: 1, y: 0};
- labelOffset = {x: 0, y: 0};
- tickVector = {x: 0, y: 1};
- anchorOffset = {x: 0, y: labelGap};
- switch(rotation){
- case 0:
- labelAlign = "middle";
- labelOffset.y = size;
- break;
- case 90:
- labelAlign = "start";
- labelOffset.x = -size * 0.4;
- break;
- case 180:
- labelAlign = "middle";
- break;
- case 270:
- labelAlign = "end";
- labelOffset.x = size * 0.4;
- break;
- default:
- if(rotation < (90 - centerAnchorLimit)){
- labelAlign = "start";
- labelOffset.y = leftBottom ? size : 0;
- }else if(rotation < (90 + centerAnchorLimit)){
- labelAlign = "start";
- labelOffset.x = -size * 0.4;
- }else if(rotation < 180){
- labelAlign = "start";
- labelOffset.y = leftBottom ? 0 : -size;
- }else if(rotation < (270 - centerAnchorLimit)){
- labelAlign = "end";
- labelOffset.y = leftBottom ? 0 : -size;
- }else if(rotation < (270 + centerAnchorLimit)){
- labelAlign = "end";
- labelOffset.y = leftBottom ? size * 0.4 : 0;
- }else{
- labelAlign = "end";
- labelOffset.y = leftBottom ? size : 0;
- }
- }
- if(leftBottom){
- start.y = stop.y = dim.height - offsets.b;
- titleRotation = (taTitleOrientation && taTitleOrientation == "axis") ? 180 : 0;
- titlePos.y = dim.height - offsets.b + titleOffset - (titleRotation ? tsize : 0);
- }else{
- start.y = stop.y = offsets.t;
- titleRotation = (taTitleOrientation && taTitleOrientation == "away") ? 180 : 0;
- titlePos.y = offsets.t - titleOffset + (titleRotation ? 0 : tsize);
- tickVector.y = -1;
- anchorOffset.y = -anchorOffset.y;
- switch(labelAlign){
- case "start":
- labelAlign = "end";
- break;
- case "end":
- labelAlign = "start";
- break;
- case "middle":
- labelOffset.y -= size;
- break;
- }
- }
- }
-
- this.cleanGroup();
- try{
- var s = this.group,
- c = this.scaler,
- t = this.ticks,
- canLabel,
- f = lin.getTransformerFromModel(this.scaler),
-
-
- labelType = (!o.title || !titleRotation) && !rotation && this.opt.htmlLabels && !has("ie") && !has("opera") ? "html" : "gfx",
- dx = tickVector.x * taMajorTick.length,
- dy = tickVector.y * taMajorTick.length;
- s.createLine({
- x1: start.x,
- y1: start.y,
- x2: stop.x,
- y2: stop.y
- }).setStroke(taStroke);
-
-
- if(o.title){
- var axisTitle = acommon.createText[labelType](
- this.chart,
- s,
- titlePos.x,
- titlePos.y,
- "middle",
- o.title,
- taTitleFont,
- taTitleFontColor
- );
- if(labelType == "html"){
- this.htmlElements.push(axisTitle);
- }else{
-
-
- axisTitle.setTransform(g.matrix.rotategAt(titleRotation, titlePos.x, titlePos.y));
- }
- }
-
-
- if(t==null){
- this.dirty = false;
- return this;
- }
- arr.forEach(t.major, function(tick){
- var offset = f(tick.value), elem,
- x = start.x + axisVector.x * offset,
- y = start.y + axisVector.y * offset;
- this.createLine(s, {
- x1: x, y1: y,
- x2: x + dx,
- y2: y + dy
- }).setStroke(taMajorTick);
- if(tick.label){
- var label = o.maxLabelCharCount ? this.getTextWithLimitCharCount(tick.label, taFont, o.maxLabelCharCount) : {
- text: tick.label,
- truncated: false
- };
- label = o.maxLabelSize ? this.getTextWithLimitLength(label.text, taFont, o.maxLabelSize, label.truncated) : label;
- elem = this.createText(labelType,
- s,
- x + dx + anchorOffset.x + (rotation ? 0 : labelOffset.x),
- y + dy + anchorOffset.y + (rotation ? 0 : labelOffset.y),
- labelAlign,
- label.text,
- taFont,
- taFontColor
-
- );
-
-
-
-
-
-
- if(this.chart.truncateBidi && label.truncated){
- this.chart.truncateBidi(elem, tick.label, labelType);
- }
- label.truncated && this.labelTooltip(elem, this.chart, tick.label, label.text, taFont, labelType);
- if(labelType == "html"){
- this.htmlElements.push(elem);
- }else if(rotation){
- elem.setTransform([
- {dx: labelOffset.x, dy: labelOffset.y},
- g.matrix.rotategAt(
- rotation,
- x + dx + anchorOffset.x,
- y + dy + anchorOffset.y
- )
- ]);
- }
- }
- }, this);
- dx = tickVector.x * taMinorTick.length;
- dy = tickVector.y * taMinorTick.length;
- canLabel = c.minMinorStep <= c.minor.tick * c.bounds.scale;
- arr.forEach(t.minor, function(tick){
- var offset = f(tick.value), elem,
- x = start.x + axisVector.x * offset,
- y = start.y + axisVector.y * offset;
- this.createLine(s, {
- x1: x, y1: y,
- x2: x + dx,
- y2: y + dy
- }).setStroke(taMinorTick);
- if(canLabel && tick.label){
- var label = o.maxLabelCharCount ? this.getTextWithLimitCharCount(tick.label, taFont, o.maxLabelCharCount) : {
- text: tick.label,
- truncated: false
- };
- label = o.maxLabelSize ? this.getTextWithLimitLength(label.text, taFont, o.maxLabelSize, label.truncated) : label;
- elem = this.createText(labelType,
- s,
- x + dx + anchorOffset.x + (rotation ? 0 : labelOffset.x),
- y + dy + anchorOffset.y + (rotation ? 0 : labelOffset.y),
- labelAlign,
- label.text,
- taFont,
- taFontColor
-
- );
-
-
-
-
-
- if(this.chart.getTextDir && label.truncated){
- this.chart.truncateBidi(elem, tick.label, labelType);
- }
- label.truncated && this.labelTooltip(elem, this.chart, tick.label, label.text, taFont, labelType);
- if(labelType == "html"){
- this.htmlElements.push(elem);
- }else if(rotation){
- elem.setTransform([
- {dx: labelOffset.x, dy: labelOffset.y},
- g.matrix.rotategAt(
- rotation,
- x + dx + anchorOffset.x,
- y + dy + anchorOffset.y
- )
- ]);
- }
- }
- }, this);
- dx = tickVector.x * taMicroTick.length;
- dy = tickVector.y * taMicroTick.length;
- arr.forEach(t.micro, function(tick){
- var offset = f(tick.value), elem,
- x = start.x + axisVector.x * offset,
- y = start.y + axisVector.y * offset;
- this.createLine(s, {
- x1: x, y1: y,
- x2: x + dx,
- y2: y + dy
- }).setStroke(taMicroTick);
- }, this);
- }catch(e){
-
- }
- this.dirty = false;
- return this;
- },
- labelTooltip: function(elem, chart, label, truncatedLabel, font, elemType){
- var modules = ["dijit/Tooltip"];
- var aroundRect = {type: "rect"}, position = ["above", "below"],
- fontWidth = g._base._getTextBox(truncatedLabel, {font: font}).w || 0,
- fontHeight = font ? g.normalizedLength(g.splitFontString(font).size) : 0;
- if(elemType == "html"){
- lang.mixin(aroundRect, html.coords(elem.firstChild, true));
- aroundRect.width = Math.ceil(fontWidth);
- aroundRect.height = Math.ceil(fontHeight);
- this._events.push({
- shape: dojo,
- handle: connect.connect(elem.firstChild, "onmouseover", this, function(e){
- require(modules, function(Tooltip){
- Tooltip.show(label, aroundRect, position);
- });
- })
- });
- this._events.push({
- shape: dojo,
- handle: connect.connect(elem.firstChild, "onmouseout", this, function(e){
- require(modules, function(Tooltip){
- Tooltip.hide(aroundRect);
- });
- })
- });
- }else{
- var shp = elem.getShape(),
- lt = html.coords(chart.node, true);
- aroundRect = lang.mixin(aroundRect, {
- x: shp.x - fontWidth / 2,
- y: shp.y
- });
- aroundRect.x += lt.x;
- aroundRect.y += lt.y;
- aroundRect.x = Math.round(aroundRect.x);
- aroundRect.y = Math.round(aroundRect.y);
- aroundRect.width = Math.ceil(fontWidth);
- aroundRect.height = Math.ceil(fontHeight);
- this._events.push({
- shape: elem,
- handle: elem.connect("onmouseenter", this, function(e){
- require(modules, function(Tooltip){
- Tooltip.show(label, aroundRect, position);
- });
- })
- });
- this._events.push({
- shape: elem,
- handle: elem.connect("onmouseleave", this, function(e){
- require(modules, function(Tooltip){
- Tooltip.hide(aroundRect);
- });
- })
- });
- }
- }
- });
- });
- },
- 'dojox/charting/plot2d/ClusteredBars':function(){
- define("dojox/charting/plot2d/ClusteredBars", ["dojo/_base/lang", "dojo/_base/array", "dojo/_base/declare", "./Bars", "./common",
- "dojox/lang/functional", "dojox/lang/functional/reversed", "dojox/lang/utils"],
- function(lang, arr, declare, Bars, dc, df, dfr, du){
- var purgeGroup = dfr.lambda("item.purgeGroup()");
- return declare("dojox.charting.plot2d.ClusteredBars", Bars, {
-
-
- render: function(dim, offsets){
-
-
-
-
-
-
-
-
- if(this.zoom && !this.isDataDirty()){
- return this.performZoom(dim, offsets);
- }
- this.resetEvents();
- this.dirty = this.isDirty();
- if(this.dirty){
- arr.forEach(this.series, purgeGroup);
- this._eventSeries = {};
- this.cleanGroup();
- var s = this.group;
- df.forEachRev(this.series, function(item){ item.cleanGroup(s); });
- }
- var t = this.chart.theme, f, gap, height, thickness,
- ht = this._hScaler.scaler.getTransformerFromModel(this._hScaler),
- vt = this._vScaler.scaler.getTransformerFromModel(this._vScaler),
- baseline = Math.max(0, this._hScaler.bounds.lower),
- baselineWidth = ht(baseline),
- events = this.events();
- f = dc.calculateBarSize(this._vScaler.bounds.scale, this.opt, this.series.length);
- gap = f.gap;
- height = thickness = f.size;
- for(var i = this.series.length - 1; i >= 0; --i){
- var run = this.series[i], shift = thickness * (this.series.length - i - 1);
- if(!this.dirty && !run.dirty){
- t.skip();
- this._reconnectEvents(run.name);
- continue;
- }
- run.cleanGroup();
- var theme = t.next("bar", [this.opt, run]), s = run.group,
- eventSeries = new Array(run.data.length);
- for(var j = 0; j < run.data.length; ++j){
- var value = run.data[j];
- if(value !== null){
- var v = typeof value == "number" ? value : value.y,
- hv = ht(v),
- width = hv - baselineWidth,
- w = Math.abs(width),
- finalTheme = typeof value != "number" ?
- t.addMixin(theme, "bar", value, true) :
- t.post(theme, "bar");
- if(w >= 0 && height >= 1){
- var rect = {
- x: offsets.l + (v < baseline ? hv : baselineWidth),
- y: dim.height - offsets.b - vt(j + 1.5) + gap + shift,
- width: w, height: height
- };
- var specialFill = this._plotFill(finalTheme.series.fill, dim, offsets);
- specialFill = this._shapeFill(specialFill, rect);
- var shape = s.createRect(rect).setFill(specialFill).setStroke(finalTheme.series.stroke);
- run.dyn.fill = shape.getFill();
- run.dyn.stroke = shape.getStroke();
- if(events){
- var o = {
- element: "bar",
- index: j,
- run: run,
- shape: shape,
- x: v,
- y: j + 1.5
- };
- this._connectEvents(o);
- eventSeries[j] = o;
- }
- if(this.animate){
- this._animateBar(shape, offsets.l + baselineWidth, -width);
- }
- }
- }
- }
- this._eventSeries[run.name] = eventSeries;
- run.dirty = false;
- }
- this.dirty = false;
- return this;
- }
- });
- });
- },
- 'dojox/charting/action2d/MoveSlice':function(){
- define("dojox/charting/action2d/MoveSlice", ["dojo/_base/connect", "dojo/_base/declare", "./PlotAction", "dojo/fx/easing", "dojox/gfx/matrix",
- "dojox/gfx/fx", "dojox/lang/functional", "dojox/lang/functional/scan", "dojox/lang/functional/fold"],
- function(hub, declare, PlotAction, dfe, m, gf, df, dfs, dff){
-
-
- var DEFAULT_SCALE = 1.05,
- DEFAULT_SHIFT = 7;
- return declare("dojox.charting.action2d.MoveSlice", PlotAction, {
-
-
-
- defaultParams: {
- duration: 400,
- easing: dfe.backOut,
- scale: DEFAULT_SCALE,
- shift: DEFAULT_SHIFT
- },
- optionalParams: {},
- constructor: function(chart, plot, kwArgs){
-
-
-
-
-
-
-
-
- if(!kwArgs){ kwArgs = {}; }
- this.scale = typeof kwArgs.scale == "number" ? kwArgs.scale : DEFAULT_SCALE;
- this.shift = typeof kwArgs.shift == "number" ? kwArgs.shift : DEFAULT_SHIFT;
- this.connect();
- },
- process: function(o){
-
-
-
-
- if(!o.shape || o.element != "slice" || !(o.type in this.overOutEvents)){ return; }
- if(!this.angles){
-
- var startAngle = m._degToRad(o.plot.opt.startAngle);
- if(typeof o.run.data[0] == "number"){
- this.angles = df.map(df.scanl(o.run.data, "+", startAngle),
- "* 2 * Math.PI / this", df.foldl(o.run.data, "+", 0));
- }else{
- this.angles = df.map(df.scanl(o.run.data, "a + b.y", startAngle),
- "* 2 * Math.PI / this", df.foldl(o.run.data, "a + b.y", 0));
- }
- }
- var index = o.index, anim, startScale, endScale, startOffset, endOffset,
- angle = (this.angles[index] + this.angles[index + 1]) / 2,
- rotateTo0 = m.rotateAt(-angle, o.cx, o.cy),
- rotateBack = m.rotateAt( angle, o.cx, o.cy);
- anim = this.anim[index];
- if(anim){
- anim.action.stop(true);
- }else{
- this.anim[index] = anim = {};
- }
- if(o.type == "onmouseover"){
- startOffset = 0;
- endOffset = this.shift;
- startScale = 1;
- endScale = this.scale;
- }else{
- startOffset = this.shift;
- endOffset = 0;
- startScale = this.scale;
- endScale = 1;
- }
- anim.action = gf.animateTransform({
- shape: o.shape,
- duration: this.duration,
- easing: this.easing,
- transform: [
- rotateBack,
- {name: "translate", start: [startOffset, 0], end: [endOffset, 0]},
- {name: "scaleAt", start: [startScale, o.cx, o.cy], end: [endScale, o.cx, o.cy]},
- rotateTo0
- ]
- });
- if(o.type == "onmouseout"){
- hub.connect(anim.action, "onEnd", this, function(){
- delete this.anim[index];
- });
- }
- anim.action.play();
- },
- reset: function(){
- delete this.angles;
- }
- });
- });
- },
- 'dojo/colors':function(){
- define(["./_base/kernel", "./_base/lang", "./_base/Color", "./_base/array"], function(dojo, lang, Color, ArrayUtil) {
-
-
-
-
- var ColorExt = lang.getObject("dojo.colors", true);
-
- var hue2rgb = function(m1, m2, h){
- if(h < 0){ ++h; }
- if(h > 1){ --h; }
- var h6 = 6 * h;
- if(h6 < 1){ return m1 + (m2 - m1) * h6; }
- if(2 * h < 1){ return m2; }
- if(3 * h < 2){ return m1 + (m2 - m1) * (2 / 3 - h) * 6; }
- return m1;
- };
-
- dojo.colorFromRgb = Color.fromRgb = function(/*String*/ color, /*dojo.Color?*/ obj){
-
-
-
-
-
- var m = color.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);
- if(m){
- var c = m[2].split(/\s*,\s*/), l = c.length, t = m[1], a;
- if((t == "rgb" && l == 3) || (t == "rgba" && l == 4)){
- var r = c[0];
- if(r.charAt(r.length - 1) == "%"){
-
- a = ArrayUtil.map(c, function(x){
- return parseFloat(x) * 2.56;
- });
- if(l == 4){ a[3] = c[3]; }
- return Color.fromArray(a, obj);
- }
- return Color.fromArray(c, obj);
- }
- if((t == "hsl" && l == 3) || (t == "hsla" && l == 4)){
-
- var H = ((parseFloat(c[0]) % 360) + 360) % 360 / 360,
- S = parseFloat(c[1]) / 100,
- L = parseFloat(c[2]) / 100,
-
-
- m2 = L <= 0.5 ? L * (S + 1) : L + S - L * S,
- m1 = 2 * L - m2;
- a = [
- hue2rgb(m1, m2, H + 1 / 3) * 256,
- hue2rgb(m1, m2, H) * 256,
- hue2rgb(m1, m2, H - 1 / 3) * 256,
- 1
- ];
- if(l == 4){ a[3] = c[3]; }
- return Color.fromArray(a, obj);
- }
- }
- return null;
- };
- var confine = function(c, low, high){
-
-
-
- c = Number(c);
- return isNaN(c) ? high : c < low ? low : c > high ? high : c;
- };
- Color.prototype.sanitize = function(){
-
- var t = this;
- t.r = Math.round(confine(t.r, 0, 255));
- t.g = Math.round(confine(t.g, 0, 255));
- t.b = Math.round(confine(t.b, 0, 255));
- t.a = confine(t.a, 0, 1);
- return this;
- };
- ColorExt.makeGrey = Color.makeGrey = function(/*Number*/ g, /*Number?*/ a){
-
- return Color.fromArray([g, g, g, a]);
- };
-
- lang.mixin(Color.named, {
- "aliceblue": [240,248,255],
- "antiquewhite": [250,235,215],
- "aquamarine": [127,255,212],
- "azure": [240,255,255],
- "beige": [245,245,220],
- "bisque": [255,228,196],
- "blanchedalmond": [255,235,205],
- "blueviolet": [138,43,226],
- "brown": [165,42,42],
- "burlywood": [222,184,135],
- "cadetblue": [95,158,160],
- "chartreuse": [127,255,0],
- "chocolate": [210,105,30],
- "coral": [255,127,80],
- "cornflowerblue": [100,149,237],
- "cornsilk": [255,248,220],
- "crimson": [220,20,60],
- "cyan": [0,255,255],
- "darkblue": [0,0,139],
- "darkcyan": [0,139,139],
- "darkgoldenrod": [184,134,11],
- "darkgray": [169,169,169],
- "darkgreen": [0,100,0],
- "darkgrey": [169,169,169],
- "darkkhaki": [189,183,107],
- "darkmagenta": [139,0,139],
- "darkolivegreen": [85,107,47],
- "darkorange": [255,140,0],
- "darkorchid": [153,50,204],
- "darkred": [139,0,0],
- "darksalmon": [233,150,122],
- "darkseagreen": [143,188,143],
- "darkslateblue": [72,61,139],
- "darkslategray": [47,79,79],
- "darkslategrey": [47,79,79],
- "darkturquoise": [0,206,209],
- "darkviolet": [148,0,211],
- "deeppink": [255,20,147],
- "deepskyblue": [0,191,255],
- "dimgray": [105,105,105],
- "dimgrey": [105,105,105],
- "dodgerblue": [30,144,255],
- "firebrick": [178,34,34],
- "floralwhite": [255,250,240],
- "forestgreen": [34,139,34],
- "gainsboro": [220,220,220],
- "ghostwhite": [248,248,255],
- "gold": [255,215,0],
- "goldenrod": [218,165,32],
- "greenyellow": [173,255,47],
- "grey": [128,128,128],
- "honeydew": [240,255,240],
- "hotpink": [255,105,180],
- "indianred": [205,92,92],
- "indigo": [75,0,130],
- "ivory": [255,255,240],
- "khaki": [240,230,140],
- "lavender": [230,230,250],
- "lavenderblush": [255,240,245],
- "lawngreen": [124,252,0],
- "lemonchiffon": [255,250,205],
- "lightblue": [173,216,230],
- "lightcoral": [240,128,128],
- "lightcyan": [224,255,255],
- "lightgoldenrodyellow": [250,250,210],
- "lightgray": [211,211,211],
- "lightgreen": [144,238,144],
- "lightgrey": [211,211,211],
- "lightpink": [255,182,193],
- "lightsalmon": [255,160,122],
- "lightseagreen": [32,178,170],
- "lightskyblue": [135,206,250],
- "lightslategray": [119,136,153],
- "lightslategrey": [119,136,153],
- "lightsteelblue": [176,196,222],
- "lightyellow": [255,255,224],
- "limegreen": [50,205,50],
- "linen": [250,240,230],
- "magenta": [255,0,255],
- "mediumaquamarine": [102,205,170],
- "mediumblue": [0,0,205],
- "mediumorchid": [186,85,211],
- "mediumpurple": [147,112,219],
- "mediumseagreen": [60,179,113],
- "mediumslateblue": [123,104,238],
- "mediumspringgreen": [0,250,154],
- "mediumturquoise": [72,209,204],
- "mediumvioletred": [199,21,133],
- "midnightblue": [25,25,112],
- "mintcream": [245,255,250],
- "mistyrose": [255,228,225],
- "moccasin": [255,228,181],
- "navajowhite": [255,222,173],
- "oldlace": [253,245,230],
- "olivedrab": [107,142,35],
- "orange": [255,165,0],
- "orangered": [255,69,0],
- "orchid": [218,112,214],
- "palegoldenrod": [238,232,170],
- "palegreen": [152,251,152],
- "paleturquoise": [175,238,238],
- "palevioletred": [219,112,147],
- "papayawhip": [255,239,213],
- "peachpuff": [255,218,185],
- "peru": [205,133,63],
- "pink": [255,192,203],
- "plum": [221,160,221],
- "powderblue": [176,224,230],
- "rosybrown": [188,143,143],
- "royalblue": [65,105,225],
- "saddlebrown": [139,69,19],
- "salmon": [250,128,114],
- "sandybrown": [244,164,96],
- "seagreen": [46,139,87],
- "seashell": [255,245,238],
- "sienna": [160,82,45],
- "skyblue": [135,206,235],
- "slateblue": [106,90,205],
- "slategray": [112,128,144],
- "slategrey": [112,128,144],
- "snow": [255,250,250],
- "springgreen": [0,255,127],
- "steelblue": [70,130,180],
- "tan": [210,180,140],
- "thistle": [216,191,216],
- "tomato": [255,99,71],
- "turquoise": [64,224,208],
- "violet": [238,130,238],
- "wheat": [245,222,179],
- "whitesmoke": [245,245,245],
- "yellowgreen": [154,205,50]
- });
- return Color;
- });
- },
- 'dijit/Tooltip':function(){
- require({cache:{
- 'url:dijit/templates/Tooltip.html':"<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\"\n\t><div class=\"dijitTooltipContainer dijitTooltipContents\" data-dojo-attach-point=\"containerNode\" role='alert'></div\n\t><div class=\"dijitTooltipConnector\" data-dojo-attach-point=\"connectorNode\"></div\n></div>\n"}});
- define("dijit/Tooltip", [
- "dojo/_base/array",
- "dojo/_base/declare",
- "dojo/_base/fx",
- "dojo/dom",
- "dojo/dom-class",
- "dojo/dom-geometry",
- "dojo/dom-style",
- "dojo/_base/lang",
- "dojo/_base/sniff",
- "dojo/_base/window",
- "./_base/manager",
- "./place",
- "./_Widget",
- "./_TemplatedMixin",
- "./BackgroundIframe",
- "dojo/text!./templates/Tooltip.html",
- "."
- ], function(array, declare, fx, dom, domClass, domGeometry, domStyle, lang, has, win,
- manager, place, _Widget, _TemplatedMixin, BackgroundIframe, template, dijit){
-
-
-
-
- var MasterTooltip = declare("dijit._MasterTooltip", [_Widget, _TemplatedMixin], {
-
-
-
-
-
-
-
-
-
- duration: manager.defaultDuration,
- templateString: template,
- postCreate: function(){
- win.body().appendChild(this.domNode);
- this.bgIframe = new BackgroundIframe(this.domNode);
-
- this.fadeIn = fx.fadeIn({ node: this.domNode, duration: this.duration, onEnd: lang.hitch(this, "_onShow") });
- this.fadeOut = fx.fadeOut({ node: this.domNode, duration: this.duration, onEnd: lang.hitch(this, "_onHide") });
- },
- show: function(innerHTML, aroundNode, position, rtl, textDir){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if(this.aroundNode && this.aroundNode === aroundNode && this.containerNode.innerHTML == innerHTML){
- return;
- }
-
- this.domNode.width = "auto";
- if(this.fadeOut.status() == "playing"){
-
- this._onDeck=arguments;
- return;
- }
- this.containerNode.innerHTML=innerHTML;
-
- if(textDir){
- this.set("textDir", textDir);
- }
- this.containerNode.align = rtl? "right" : "left";
- var pos = place.around(this.domNode, aroundNode,
- position && position.length ? position : Tooltip.defaultPosition, !rtl, lang.hitch(this, "orient"));
-
-
- var aroundNodeCoords = pos.aroundNodePos;
- if(pos.corner.charAt(0) == 'M' && pos.aroundCorner.charAt(0) == 'M'){
- this.connectorNode.style.top = aroundNodeCoords.y + ((aroundNodeCoords.h - this.connectorNode.offsetHeight) >> 1) - pos.y + "px";
- this.connectorNode.style.left = "";
- }else if(pos.corner.charAt(1) == 'M' && pos.aroundCorner.charAt(1) == 'M'){
- this.connectorNode.style.left = aroundNodeCoords.x + ((aroundNodeCoords.w - this.connectorNode.offsetWidth) >> 1) - pos.x + "px";
- }
-
- domStyle.set(this.domNode, "opacity", 0);
- this.fadeIn.play();
- this.isShowingNow = true;
- this.aroundNode = aroundNode;
- },
- orient: function(/*DomNode*/ node, /*String*/ aroundCorner, /*String*/ tooltipCorner, /*Object*/ spaceAvailable, /*Object*/ aroundNodeCoords){
-
-
-
-
-
-
- this.connectorNode.style.top = "";
-
-
- var heightAvailable = spaceAvailable.h,
- widthAvailable = spaceAvailable.w;
- if(aroundCorner.charAt(1) != tooltipCorner.charAt(1)){
-
- widthAvailable -= this.connectorNode.offsetWidth;
- }else{
-
- heightAvailable -= this.connectorNode.offsetHeight;
- }
- node.className = "dijitTooltip " +
- {
- "MR-ML": "dijitTooltipRight",
- "ML-MR": "dijitTooltipLeft",
- "TM-BM": "dijitTooltipAbove",
- "BM-TM": "dijitTooltipBelow",
- "BL-TL": "dijitTooltipBelow dijitTooltipABLeft",
- "TL-BL": "dijitTooltipAbove dijitTooltipABLeft",
- "BR-TR": "dijitTooltipBelow dijitTooltipABRight",
- "TR-BR": "dijitTooltipAbove dijitTooltipABRight",
- "BR-BL": "dijitTooltipRight",
- "BL-BR": "dijitTooltipLeft"
- }[aroundCorner + "-" + tooltipCorner];
-
- this.domNode.style.width = "auto";
- var size = domGeometry.getContentBox(this.domNode);
- var width = Math.min((Math.max(widthAvailable,1)), size.w);
- var widthWasReduced = width < size.w;
- this.domNode.style.width = width+"px";
-
- if(tooltipCorner.charAt(0) == 'B' && aroundCorner.charAt(0) == 'B'){
- var bb = domGeometry.position(node);
- var tooltipConnectorHeight = this.connectorNode.offsetHeight;
- if(bb.h > heightAvailable){
-
- var aroundNodePlacement = heightAvailable - ((aroundNodeCoords.h + tooltipConnectorHeight) >> 1);
- this.connectorNode.style.top = aroundNodePlacement + "px";
- this.connectorNode.style.bottom = "";
- }else{
-
-
-
- this.connectorNode.style.bottom = Math.min(
- Math.max(aroundNodeCoords.h/2 - tooltipConnectorHeight/2, 0),
- bb.h - tooltipConnectorHeight) + "px";
- this.connectorNode.style.top = "";
- }
- }else{
-
- this.connectorNode.style.top = "";
- this.connectorNode.style.bottom = "";
- }
- return Math.max(0, size.w - widthAvailable);
- },
- _onShow: function(){
-
-
-
-
- if(has("ie")){
-
- this.domNode.style.filter="";
- }
- },
- hide: function(aroundNode){
-
-
- if(this._onDeck && this._onDeck[1] == aroundNode){
-
-
- this._onDeck=null;
- }else if(this.aroundNode === aroundNode){
-
- this.fadeIn.stop();
- this.isShowingNow = false;
- this.aroundNode = null;
- this.fadeOut.play();
- }else{
-
- }
- },
- _onHide: function(){
-
-
-
-
- this.domNode.style.cssText="";
- this.containerNode.innerHTML="";
- if(this._onDeck){
-
- this.show.apply(this, this._onDeck);
- this._onDeck=null;
- }
- },
-
- _setAutoTextDir: function(/*Object*/node){
-
-
-
-
- this.applyTextDir(node, has("ie") ? node.outerText : node.textContent);
- array.forEach(node.children, function(child){this._setAutoTextDir(child); }, this);
- },
-
- _setTextDirAttr: function(/*String*/ textDir){
-
-
-
-
-
-
-
-
- this._set("textDir", textDir);
- if (textDir == "auto"){
- this._setAutoTextDir(this.containerNode);
- }else{
- this.containerNode.dir = this.textDir;
- }
- }
- });
- dijit.showTooltip = function(innerHTML, aroundNode, position, rtl, textDir){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if(position){
- position = array.map(position, function(val){
- return {after: "after-centered", before: "before-centered"}[val] || val;
- });
- }
- if(!Tooltip._masterTT){ dijit._masterTT = Tooltip._masterTT = new MasterTooltip(); }
- return Tooltip._masterTT.show(innerHTML, aroundNode, position, rtl, textDir);
- };
- dijit.hideTooltip = function(aroundNode){
-
-
- return Tooltip._masterTT && Tooltip._masterTT.hide(aroundNode);
- };
- var Tooltip = declare("dijit.Tooltip", _Widget, {
-
-
-
-
-
- label: "",
-
-
-
- showDelay: 400,
-
-
-
- connectId: [],
-
-
- position: [],
- _setConnectIdAttr: function(/*String|String[]*/ newId){
-
-
-
- array.forEach(this._connections || [], function(nested){
- array.forEach(nested, lang.hitch(this, "disconnect"));
- }, this);
-
- this._connectIds = array.filter(lang.isArrayLike(newId) ? newId : (newId ? [newId] : []),
- function(id){ return dom.byId(id); });
-
- this._connections = array.map(this._connectIds, function(id){
- var node = dom.byId(id);
- return [
- this.connect(node, "onmouseenter", "_onHover"),
- this.connect(node, "onmouseleave", "_onUnHover"),
- this.connect(node, "onfocus", "_onHover"),
- this.connect(node, "onblur", "_onUnHover")
- ];
- }, this);
- this._set("connectId", newId);
- },
- addTarget: function(/*DOMNODE || String*/ node){
-
-
-
- var id = node.id || node;
- if(array.indexOf(this._connectIds, id) == -1){
- this.set("connectId", this._connectIds.concat(id));
- }
- },
- removeTarget: function(/*DomNode || String*/ node){
-
-
-
- var id = node.id || node,
- idx = array.indexOf(this._connectIds, id);
- if(idx >= 0){
-
- this._connectIds.splice(idx, 1);
- this.set("connectId", this._connectIds);
- }
- },
- buildRendering: function(){
- this.inherited(arguments);
- domClass.add(this.domNode,"dijitTooltipData");
- },
- startup: function(){
- this.inherited(arguments);
-
-
- var ids = this.connectId;
- array.forEach(lang.isArrayLike(ids) ? ids : [ids], this.addTarget, this);
- },
- _onHover: function(/*Event*/ e){
-
-
-
-
-
- if(!this._showTimer){
- var target = e.target;
- this._showTimer = setTimeout(lang.hitch(this, function(){this.open(target)}), this.showDelay);
- }
- },
- _onUnHover: function(/*Event*/ /*===== e =====*/){
-
-
-
-
-
-
-
- if(this._focus){ return; }
- if(this._showTimer){
- clearTimeout(this._showTimer);
- delete this._showTimer;
- }
- this.close();
- },
- open: function(/*DomNode*/ target){
-
-
-
-
- if(this._showTimer){
- clearTimeout(this._showTimer);
- delete this._showTimer;
- }
- Tooltip.show(this.label || this.domNode.innerHTML, target, this.position, !this.isLeftToRight(), this.textDir);
- this._connectNode = target;
- this.onShow(target, this.position);
- },
- close: function(){
-
-
-
-
- if(this._connectNode){
-
- Tooltip.hide(this._connectNode);
- delete this._connectNode;
- this.onHide();
- }
- if(this._showTimer){
-
- clearTimeout(this._showTimer);
- delete this._showTimer;
- }
- },
- onShow: function(/*===== target, position =====*/){
-
-
-
-
- },
- onHide: function(){
-
-
-
-
- },
- uninitialize: function(){
- this.close();
- this.inherited(arguments);
- }
- });
- Tooltip._MasterTooltip = MasterTooltip;
- Tooltip.show = dijit.showTooltip;
- Tooltip.hide = dijit.hideTooltip;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Tooltip.defaultPosition = ["after-centered", "before-centered"];
- return Tooltip;
- });
- },
- 'dojox/charting/Element':function(){
- define("dojox/charting/Element", ["dojo/_base/lang", "dojo/_base/array", "dojo/dom-construct", "dojo/_base/declare", "dojox/gfx", "dojox/gfx/utils", "dojox/gfx/shape"],
- function(lang, arr, domConstruct, declare, gfx, utils, shape){
-
- return declare("dojox.charting.Element", null, {
-
-
-
-
-
-
-
-
-
-
-
-
- chart: null,
- group: null,
- htmlElements: null,
- dirty: true,
-
- constructor: function(chart){
-
-
-
-
- this.chart = chart;
- this.group = null;
- this.htmlElements = [];
- this.dirty = true;
- this.trailingSymbol = "...";
- this._events = [];
- },
- createGroup: function(creator){
-
-
-
-
-
-
- if(!creator){ creator = this.chart.surface; }
- if(!this.group){
- this.group = creator.createGroup();
- }
- return this;
- },
- purgeGroup: function(){
-
-
-
-
- this.destroyHtmlElements();
- if(this.group){
-
- utils.forEach(this.group, function(child){
- shape.dispose(child);
- });
- if(this.group.rawNode){
- domConstruct.empty(this.group.rawNode);
- }
- this.group.clear();
- this.group.removeShape();
- shape.dispose(this.group);
- this.group = null;
- }
- this.dirty = true;
- if(this._events.length){
- arr.forEach(this._events, function(item){
- item.shape.disconnect(item.handle);
- });
- this._events = [];
- }
- return this;
- },
- cleanGroup: function(creator){
-
-
-
-
-
-
- this.destroyHtmlElements();
- if(!creator){ creator = this.chart.surface; }
- if(this.group){
- var bgnode;
- utils.forEach(this.group, function(child){
- shape.dispose(child);
- });
- if(this.group.rawNode){
- bgnode = this.group.bgNode;
- domConstruct.empty(this.group.rawNode);
- }
- this.group.clear();
- if(bgnode){
- this.group.rawNode.appendChild(bgnode);
- }
- }else{
- this.group = creator.createGroup();
- }
- this.dirty = true;
- return this;
- },
- destroyHtmlElements: function(){
-
-
- if(this.htmlElements.length){
- arr.forEach(this.htmlElements, domConstruct.destroy);
- this.htmlElements = [];
- }
- },
- destroy: function(){
-
-
- this.purgeGroup();
- },
-
- getTextWidth: function(s, font){
- return gfx._base._getTextBox(s, {font: font}).w || 0;
- },
- getTextWithLimitLength: function(s, font, limitWidth, truncated){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if (!s || s.length <= 0) {
- return {
- text: "",
- truncated: truncated || false
- };
- }
- if(!limitWidth || limitWidth <= 0){
- return {
- text: s,
- truncated: truncated || false
- };
- }
- var delta = 2,
-
- trucPercentage = 0.618,
- minStr = s.substring(0,1) + this.trailingSymbol,
- minWidth = this.getTextWidth(minStr, font);
- if (limitWidth <= minWidth) {
- return {
- text: minStr,
- truncated: true
- };
- }
- var width = this.getTextWidth(s, font);
- if(width <= limitWidth){
- return {
- text: s,
- truncated: truncated || false
- };
- }else{
- var begin = 0,
- end = s.length;
- while(begin < end){
- if(end - begin <= delta ){
- while (this.getTextWidth(s.substring(0, begin) + this.trailingSymbol, font) > limitWidth) {
- begin -= 1;
- }
- return {
- text: (s.substring(0,begin) + this.trailingSymbol),
- truncated: true
- };
- }
- var index = begin + Math.round((end - begin) * trucPercentage),
- widthIntercepted = this.getTextWidth(s.substring(0, index), font);
- if(widthIntercepted < limitWidth){
- begin = index;
- end = end;
- }else{
- begin = begin;
- end = index;
- }
- }
- }
- },
- getTextWithLimitCharCount: function(s, font, wcLimit, truncated){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if (!s || s.length <= 0) {
- return {
- text: "",
- truncated: truncated || false
- };
- }
- if(!wcLimit || wcLimit <= 0 || s.length <= wcLimit){
- return {
- text: s,
- truncated: truncated || false
- };
- }
- return {
- text: s.substring(0, wcLimit) + this.trailingSymbol,
- truncated: true
- };
- },
-
- _plotFill: function(fill, dim, offsets){
-
- if(!fill || !fill.type || !fill.space){
- return fill;
- }
- var space = fill.space;
- switch(fill.type){
- case "linear":
- if(space === "plot" || space === "shapeX" || space === "shapeY"){
-
- fill = gfx.makeParameters(gfx.defaultLinearGradient, fill);
- fill.space = space;
-
- if(space === "plot" || space === "shapeX"){
-
- var span = dim.height - offsets.t - offsets.b;
- fill.y1 = offsets.t + span * fill.y1 / 100;
- fill.y2 = offsets.t + span * fill.y2 / 100;
- }
- if(space === "plot" || space === "shapeY"){
-
- var span = dim.width - offsets.l - offsets.r;
- fill.x1 = offsets.l + span * fill.x1 / 100;
- fill.x2 = offsets.l + span * fill.x2 / 100;
- }
- }
- break;
- case "radial":
- if(space === "plot"){
-
-
- fill = gfx.makeParameters(gfx.defaultRadialGradient, fill);
- fill.space = space;
-
- var spanX = dim.width - offsets.l - offsets.r,
- spanY = dim.height - offsets.t - offsets.b;
- fill.cx = offsets.l + spanX * fill.cx / 100;
- fill.cy = offsets.t + spanY * fill.cy / 100;
- fill.r = fill.r * Math.sqrt(spanX * spanX + spanY * spanY) / 200;
- }
- break;
- case "pattern":
- if(space === "plot" || space === "shapeX" || space === "shapeY"){
-
- fill = gfx.makeParameters(gfx.defaultPattern, fill);
- fill.space = space;
-
- if(space === "plot" || space === "shapeX"){
-
- var span = dim.height - offsets.t - offsets.b;
- fill.y = offsets.t + span * fill.y / 100;
- fill.height = span * fill.height / 100;
- }
- if(space === "plot" || space === "shapeY"){
-
- var span = dim.width - offsets.l - offsets.r;
- fill.x = offsets.l + span * fill.x / 100;
- fill.width = span * fill.width / 100;
- }
- }
- break;
- }
- return fill;
- },
- _shapeFill: function(fill, bbox){
-
- if(!fill || !fill.space){
- return fill;
- }
- var space = fill.space;
- switch(fill.type){
- case "linear":
- if(space === "shape" || space === "shapeX" || space === "shapeY"){
-
- fill = gfx.makeParameters(gfx.defaultLinearGradient, fill);
- fill.space = space;
-
- if(space === "shape" || space === "shapeX"){
-
- var span = bbox.width;
- fill.x1 = bbox.x + span * fill.x1 / 100;
- fill.x2 = bbox.x + span * fill.x2 / 100;
- }
- if(space === "shape" || space === "shapeY"){
-
- var span = bbox.height;
- fill.y1 = bbox.y + span * fill.y1 / 100;
- fill.y2 = bbox.y + span * fill.y2 / 100;
- }
- }
- break;
- case "radial":
- if(space === "shape"){
-
-
- fill = gfx.makeParameters(gfx.defaultRadialGradient, fill);
- fill.space = space;
-
- fill.cx = bbox.x + bbox.width / 2;
- fill.cy = bbox.y + bbox.height / 2;
- fill.r = fill.r * bbox.width / 200;
- }
- break;
- case "pattern":
- if(space === "shape" || space === "shapeX" || space === "shapeY"){
-
- fill = gfx.makeParameters(gfx.defaultPattern, fill);
- fill.space = space;
-
- if(space === "shape" || space === "shapeX"){
-
- var span = bbox.width;
- fill.x = bbox.x + span * fill.x / 100;
- fill.width = span * fill.width / 100;
- }
- if(space === "shape" || space === "shapeY"){
-
- var span = bbox.height;
- fill.y = bbox.y + span * fill.y / 100;
- fill.height = span * fill.height / 100;
- }
- }
- break;
- }
- return fill;
- },
- _pseudoRadialFill: function(fill, center, radius, start, end){
-
- if(!fill || fill.type !== "radial" || fill.space !== "shape"){
- return fill;
- }
-
- var space = fill.space;
- fill = gfx.makeParameters(gfx.defaultRadialGradient, fill);
- fill.space = space;
- if(arguments.length < 4){
-
- fill.cx = center.x;
- fill.cy = center.y;
- fill.r = fill.r * radius / 100;
- return fill;
- }
-
- var angle = arguments.length < 5 ? start : (end + start) / 2;
- return {
- type: "linear",
- x1: center.x,
- y1: center.y,
- x2: center.x + fill.r * radius * Math.cos(angle) / 100,
- y2: center.y + fill.r * radius * Math.sin(angle) / 100,
- colors: fill.colors
- };
- return fill;
- }
- });
- });
- },
- 'dijit/_WidgetBase':function(){
- define("dijit/_WidgetBase", [
- "require",
- "dojo/_base/array",
- "dojo/aspect",
- "dojo/_base/config",
- "dojo/_base/connect",
- "dojo/_base/declare",
- "dojo/dom",
- "dojo/dom-attr",
- "dojo/dom-class",
- "dojo/dom-construct",
- "dojo/dom-geometry",
- "dojo/dom-style",
- "dojo/_base/kernel",
- "dojo/_base/lang",
- "dojo/on",
- "dojo/ready",
- "dojo/Stateful",
- "dojo/topic",
- "dojo/_base/window",
- "./registry"
- ], function(require, array, aspect, config, connect, declare,
- dom, domAttr, domClass, domConstruct, domGeometry, domStyle, kernel,
- lang, on, ready, Stateful, topic, win, registry){
- if(!kernel.isAsync){
- ready(0, function(){
- var requires = ["dijit/_base/manager"];
- require(requires);
- });
- }
- var tagAttrs = {};
- function getAttrs(obj){
- var ret = {};
- for(var attr in obj){
- ret[attr.toLowerCase()] = true;
- }
- return ret;
- }
- function nonEmptyAttrToDom(attr){
-
-
-
-
- return function(val){
- domAttr[val ? "set" : "remove"](this.domNode, attr, val);
- this._set(attr, val);
- };
- }
- function isEqual(a, b){
-
-
-
-
- return a === b || ( a !== a && b !== b);
- }
- return declare("dijit._WidgetBase", Stateful, {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- id: "",
- _setIdAttr: "domNode",
-
-
-
-
-
- lang: "",
-
- _setLangAttr: nonEmptyAttrToDom("lang"),
-
-
-
-
- dir: "",
-
- _setDirAttr: nonEmptyAttrToDom("dir"),
-
-
-
-
-
-
-
-
-
- textDir: "",
-
-
- "class": "",
- _setClassAttr: { node: "domNode", type: "class" },
-
-
- style: "",
-
-
-
-
-
-
-
-
- title: "",
-
-
-
- tooltip: "",
-
-
-
- baseClass: "",
-
-
- srcNodeRef: null,
-
-
-
-
-
- domNode: null,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- containerNode: null,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- attributeMap: {},
-
-
-
- _blankGif: config.blankGif || require.toUrl("dojo/resources/blank.gif"),
-
- postscript: function(/*Object?*/params, /*DomNode|String*/srcNodeRef){
-
-
-
-
- this.create(params, srcNodeRef);
- },
- create: function(/*Object?*/params, /*DomNode|String?*/srcNodeRef){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- this.srcNodeRef = dom.byId(srcNodeRef);
-
- this._connects = [];
-
- this._supportingWidgets = [];
-
- if(this.srcNodeRef && (typeof this.srcNodeRef.id == "string")){ this.id = this.srcNodeRef.id; }
-
- if(params){
- this.params = params;
- lang.mixin(this, params);
- }
- this.postMixInProperties();
-
-
-
- if(!this.id){
- this.id = registry.getUniqueId(this.declaredClass.replace(/\./g,"_"));
- }
- registry.add(this);
- this.buildRendering();
- if(this.domNode){
-
-
- this._applyAttributes();
-
-
-
-
- var source = this.srcNodeRef;
- if(source && source.parentNode && this.domNode !== source){
- source.parentNode.replaceChild(this.domNode, source);
- }
- }
- if(this.domNode){
-
-
- this.domNode.setAttribute("widgetId", this.id);
- }
- this.postCreate();
-
- if(this.srcNodeRef && !this.srcNodeRef.parentNode){
- delete this.srcNodeRef;
- }
- this._created = true;
- },
- _applyAttributes: function(){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var ctor = this.constructor,
- list = ctor._setterAttrs;
- if(!list){
- list = (ctor._setterAttrs = []);
- for(var attr in this.attributeMap){
- list.push(attr);
- }
- var proto = ctor.prototype;
- for(var fxName in proto){
- if(fxName in this.attributeMap){ continue; }
- var setterName = "_set" + fxName.replace(/^[a-z]|-[a-zA-Z]/g, function(c){ return c.charAt(c.length-1).toUpperCase(); }) + "Attr";
- if(setterName in proto){
- list.push(fxName);
- }
- }
- }
-
-
-
-
-
- array.forEach(list, function(attr){
- if(this.params && attr in this.params){
-
- }else if(this[attr]){
- this.set(attr, this[attr]);
- }
- }, this);
- for(var param in this.params){
- this.set(param, this[param]);
- }
- },
- postMixInProperties: function(){
-
-
-
-
-
-
-
- },
- buildRendering: function(){
-
-
-
-
-
- if(!this.domNode){
-
- this.domNode = this.srcNodeRef || domConstruct.create('div');
- }
-
-
-
- if(this.baseClass){
- var classes = this.baseClass.split(" ");
- if(!this.isLeftToRight()){
- classes = classes.concat( array.map(classes, function(name){ return name+"Rtl"; }));
- }
- domClass.add(this.domNode, classes);
- }
- },
- postCreate: function(){
-
-
-
-
-
-
-
-
- },
- startup: function(){
-
-
-
-
-
-
-
- if(this._started){ return; }
- this._started = true;
- array.forEach(this.getChildren(), function(obj){
- if(!obj._started && !obj._destroyed && lang.isFunction(obj.startup)){
- obj.startup();
- obj._started = true;
- }
- });
- },
-
- destroyRecursive: function(/*Boolean?*/ preserveDom){
-
-
-
-
-
-
-
-
-
-
- this._beingDestroyed = true;
- this.destroyDescendants(preserveDom);
- this.destroy(preserveDom);
- },
- destroy: function(/*Boolean*/ preserveDom){
-
-
-
-
-
-
- this._beingDestroyed = true;
- this.uninitialize();
-
- var c;
- while((c = this._connects.pop())){
- c.remove();
- }
-
- var w;
- while((w = this._supportingWidgets.pop())){
- if(w.destroyRecursive){
- w.destroyRecursive();
- }else if(w.destroy){
- w.destroy();
- }
- }
- this.destroyRendering(preserveDom);
- registry.remove(this.id);
- this._destroyed = true;
- },
- destroyRendering: function(/*Boolean?*/ preserveDom){
-
-
-
-
-
-
-
-
- if(this.bgIframe){
- this.bgIframe.destroy(preserveDom);
- delete this.bgIframe;
- }
- if(this.domNode){
- if(preserveDom){
- domAttr.remove(this.domNode, "widgetId");
- }else{
- domConstruct.destroy(this.domNode);
- }
- delete this.domNode;
- }
- if(this.srcNodeRef){
- if(!preserveDom){
- domConstruct.destroy(this.srcNodeRef);
- }
- delete this.srcNodeRef;
- }
- },
- destroyDescendants: function(/*Boolean?*/ preserveDom){
-
-
-
-
-
-
-
-
- array.forEach(this.getChildren(), function(widget){
- if(widget.destroyRecursive){
- widget.destroyRecursive(preserveDom);
- }
- });
- },
- uninitialize: function(){
-
-
-
-
-
- return false;
- },
-
- _setStyleAttr: function(/*String||Object*/ value){
-
-
-
-
-
-
-
-
-
- var mapNode = this.domNode;
-
-
- if(lang.isObject(value)){
- domStyle.set(mapNode, value);
- }else{
- if(mapNode.style.cssText){
- mapNode.style.cssText += "; " + value;
- }else{
- mapNode.style.cssText = value;
- }
- }
- this._set("style", value);
- },
- _attrToDom: function(/*String*/ attr, /*String*/ value, /*Object?*/ commands){
-
-
-
-
-
-
-
-
-
- commands = arguments.length >= 3 ? commands : this.attributeMap[attr];
- array.forEach(lang.isArray(commands) ? commands : [commands], function(command){
-
- var mapNode = this[command.node || command || "domNode"];
- var type = command.type || "attribute";
- switch(type){
- case "attribute":
- if(lang.isFunction(value)){
- value = lang.hitch(this, value);
- }
-
-
-
- var attrName = command.attribute ? command.attribute :
- (/^on[A-Z][a-zA-Z]*$/.test(attr) ? attr.toLowerCase() : attr);
- domAttr.set(mapNode, attrName, value);
- break;
- case "innerText":
- mapNode.innerHTML = "";
- mapNode.appendChild(win.doc.createTextNode(value));
- break;
- case "innerHTML":
- mapNode.innerHTML = value;
- break;
- case "class":
- domClass.replace(mapNode, value, this[attr]);
- break;
- }
- }, this);
- },
- get: function(name){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var names = this._getAttrNames(name);
- return this[names.g] ? this[names.g]() : this[name];
- },
- set: function(name, value){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if(typeof name === "object"){
- for(var x in name){
- this.set(x, name[x]);
- }
- return this;
- }
- var names = this._getAttrNames(name),
- setter = this[names.s];
- if(lang.isFunction(setter)){
-
- var result = setter.apply(this, Array.prototype.slice.call(arguments, 1));
- }else{
-
-
-
-
-
-
-
-
- var defaultNode = this.focusNode && !lang.isFunction(this.focusNode) ? "focusNode" : "domNode",
- tag = this[defaultNode].tagName,
- attrsForTag = tagAttrs[tag] || (tagAttrs[tag] = getAttrs(this[defaultNode])),
- map = name in this.attributeMap ? this.attributeMap[name] :
- names.s in this ? this[names.s] :
- ((names.l in attrsForTag && typeof value != "function") ||
- /^aria-|^data-|^role$/.test(name)) ? defaultNode : null;
- if(map != null){
- this._attrToDom(name, value, map);
- }
- this._set(name, value);
- }
- return result || this;
- },
- _attrPairNames: {},
- _getAttrNames: function(name){
-
-
-
-
-
- var apn = this._attrPairNames;
- if(apn[name]){ return apn[name]; }
- var uc = name.replace(/^[a-z]|-[a-zA-Z]/g, function(c){ return c.charAt(c.length-1).toUpperCase(); });
- return (apn[name] = {
- n: name+"Node",
- s: "_set"+uc+"Attr",
- g: "_get"+uc+"Attr",
- l: uc.toLowerCase()
- });
- },
- _set: function(/*String*/ name, /*anything*/ value){
-
-
-
- var oldValue = this[name];
- this[name] = value;
- if(this._watchCallbacks && this._created && !isEqual(value, oldValue)){
- this._watchCallbacks(name, oldValue, value);
- }
- },
- on: function(/*String*/ type, /*Function*/ func){
-
-
-
-
-
-
- return aspect.after(this, this._onMap(type), func, true);
- },
- _onMap: function(/*String*/ type){
-
-
- var ctor = this.constructor, map = ctor._onMap;
- if(!map){
- map = (ctor._onMap = {});
- for(var attr in ctor.prototype){
- if(/^on/.test(attr)){
- map[attr.replace(/^on/, "").toLowerCase()] = attr;
- }
- }
- }
- return map[type.toLowerCase()];
- },
- toString: function(){
-
-
-
-
-
-
- return '[Widget ' + this.declaredClass + ', ' + (this.id || 'NO ID') + ']';
- },
- getChildren: function(){
-
-
-
- return this.containerNode ? registry.findWidgets(this.containerNode) : [];
- },
- getParent: function(){
-
-
- return registry.getEnclosingWidget(this.domNode.parentNode);
- },
- connect: function(
- /*Object|null*/ obj,
- /*String|Function*/ event,
- /*String|Function*/ method){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var handle = connect.connect(obj, event, this, method);
- this._connects.push(handle);
- return handle;
- },
- disconnect: function(handle){
-
-
-
-
-
- var i = array.indexOf(this._connects, handle);
- if(i != -1){
- handle.remove();
- this._connects.splice(i, 1);
- }
- },
- subscribe: function(t, method){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var handle = topic.subscribe(t, lang.hitch(this, method));
- this._connects.push(handle);
- return handle;
- },
- unsubscribe: function(/*Object*/ handle){
-
-
-
-
-
- this.disconnect(handle);
- },
- isLeftToRight: function(){
-
-
-
-
- return this.dir ? (this.dir == "ltr") : domGeometry.isBodyLtr();
- },
- isFocusable: function(){
-
-
-
- return this.focus && (domStyle.get(this.domNode, "display") != "none");
- },
- placeAt: function(/* String|DomNode|_Widget */reference, /* String?|Int? */position){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if(reference.declaredClass && reference.addChild){
- reference.addChild(this, position);
- }else{
- domConstruct.place(this.domNode, reference, position);
- }
- return this;
- },
- getTextDir: function(/*String*/ text,/*String*/ originalDir){
-
-
-
-
-
-
-
- return originalDir;
- },
- applyTextDir: function(/*===== element, text =====*/){
-
-
-
-
-
-
-
-
- },
- defer: function(fcn, delay){
-
-
-
-
-
-
-
-
- var timer = setTimeout(lang.hitch(this,
- function(){
- if(!timer){ return; }
- timer = null;
- if(!this._destroyed){
- lang.hitch(this, fcn)();
- }
- }),
- delay || 0
- );
- return {
- remove: function(){
- if(timer){
- clearTimeout(timer);
- timer = null;
- }
- return null;
- }
- };
- }
- });
- });
- }}});
- define("dojox/charting/widget/Chart2D", ["dojo/_base/kernel", "./Chart", "../Chart2D",
- "../action2d/Highlight", "../action2d/Magnify",
- "../action2d/MoveSlice", "../action2d/Shake", "../action2d/Tooltip"], function(dojo, Chart) {
- dojo.deprecated("dojox.charting.widget.Chart2D", "Use dojo.charting.widget.Chart instead and require all other components explicitly", "2.0");
- return dojox.charting.widget.Chart2D = Chart;
- });
|