1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806 |
- 'use strict';
- $(document).ready(function() {
- var chart = AmCharts.makeChart("revenue-map", {
- "type": "serial",
- "theme": "light",
- "dataDateFormat": "YYYY-MM-DD",
- "precision": 2,
- "valueAxes": [{
- "id": "v1",
- "title": "Sales",
- "position": "left",
- "autoGridCount": false,
- "labelFunction": function(value) {
- return "$" + Math.round(value) + "M";
- }
- }, {
- "id": "v2",
- "title": "Revenue Market",
- "gridAlpha": 0,
- "autoGridCount": false
- }],
- "graphs": [{
- "id": "g1",
- "valueAxis": "v2",
- "bullet": "round",
- "bulletBorderAlpha": 1,
- "bulletColor": "#FFFFFF",
- "bulletSize": 5,
- "hideBulletsCount": 50,
- "lineThickness": 2,
- "lineColor": "#448aff",
- "type": "smoothedLine",
- "title": "Market Days",
- "useLineColorForBulletBorder": true,
- "valueField": "market1",
- "balloonText": "[[title]]<br /><b style='font-size: 130%'>[[value]]</b>"
- }, {
- "id": "g2",
- "valueAxis": "v2",
- "bullet": "round",
- "bulletBorderAlpha": 1,
- "bulletColor": "#FFFFFF",
- "bulletSize": 5,
- "hideBulletsCount": 50,
- "lineThickness": 2,
- "lineColor": "#536dfe",
- "type": "smoothedLine",
- "title": "Market Days ALL",
- "useLineColorForBulletBorder": true,
- "valueField": "market2",
- "balloonText": "[[title]]<br /><b style='font-size: 130%'>[[value]]</b>"
- }],
- "chartCursor": {
- "pan": true,
- "valueLineEnabled": true,
- "valueLineBalloonEnabled": true,
- "cursorAlpha": 0,
- "valueLineAlpha": 0.2
- },
- "categoryField": "date",
- "categoryAxis": {
- "parseDates": true,
- "dashLength": 1,
- "minorGridEnabled": true
- },
- "legend": {
- "useGraphSettings": true,
- "position": "top"
- },
- "balloon": {
- "borderThickness": 1,
- "shadowAlpha": 0
- },
- "export": {
- "enabled": true
- },
- "dataProvider": [{
- "date": "2013-01-16",
- "market1": 85,
- "market2": 75
- }, {
- "date": "2013-01-17",
- "market1": 74,
- "market2": 80
- }, {
- "date": "2013-01-18",
- "market1": 78,
- "market2": 88
- }, {
- "date": "2013-01-19",
- "market1": 85,
- "market2": 75
- }, {
- "date": "2013-01-20",
- "market1": 82,
- "market2": 89
- }, {
- "date": "2013-01-21",
- "market1": 83,
- "market2": 78
- }, {
- "date": "2013-01-22",
- "market1": 72,
- "market2": 92
- }, {
- "date": "2013-01-23",
- "market1": 85,
- "market2": 76
- }]
- });
- var chart = AmCharts.makeChart( "sales-analytics", {
- "type": "serial",
- "theme": "light",
- "marginRight": 40,
- "marginLeft": 40,
- "autoMarginOffset": 20,
- "dataDateFormat": "YYYY-MM-DD",
- "valueAxes": [ {
- "id": "v1",
- "axisAlpha": 0,
- "position": "left",
- "ignoreAxisWidth": true
- } ],
- "balloon": {
- "borderThickness": 1,
- "shadowAlpha": 0
- },
- "graphs": [ {
- "id": "g1",
- "balloon": {
- "drop": true,
- "adjustBorderColor": false,
- "color": "#ffffff",
- "type": "smoothedLine"
- },
- "fillAlphas": 0.5,
- "bullet": "round",
- "bulletBorderAlpha": 1,
- "bulletColor": "#FFFFFF",
- "lineColor": "#11c15b",
- "bulletSize": 5,
- "hideBulletsCount": 50,
- "lineThickness": 3,
- "title": "red line",
- "useLineColorForBulletBorder": true,
- "valueField": "value",
- "balloonText": "<span style='font-size:18px;'>[[value]]</span>"
- } ],
- "chartCursor": {
- "valueLineEnabled": true,
- "valueLineBalloonEnabled": true,
- "cursorAlpha": 0,
- "zoomable": false,
- "valueZoomable": true,
- "valueLineAlpha": 0.5
- },
- "chartScrollbar": {
- "autoGridCount": true,
- "graph": "g1",
- "oppositeAxis": true,
- "scrollbarHeight": 90
- },
- "categoryField": "date",
- "categoryAxis": {
- "parseDates": true,
- "dashLength": 1,
- "minorGridEnabled": true
- },
- "export": {
- "enabled": true
- },
- "dataProvider": [ {
- "date": "2012-07-27",
- "value": 13
- }, {
- "date": "2012-07-28",
- "value": 11
- }, {
- "date": "2012-07-29",
- "value": 15
- }, {
- "date": "2012-07-30",
- "value": 16
- }, {
- "date": "2012-07-31",
- "value": 18
- }, {
- "date": "2012-08-01",
- "value": 13
- }, {
- "date": "2012-08-02",
- "value": 22
- }, {
- "date": "2012-08-03",
- "value": 23
- }, {
- "date": "2012-08-04",
- "value": 20
- }, {
- "date": "2012-08-05",
- "value": 17
- }, {
- "date": "2012-08-06",
- "value": 16
- }, {
- "date": "2012-08-07",
- "value": 18
- }, {
- "date": "2012-08-08",
- "value": 21
- }, {
- "date": "2012-08-09",
- "value": 26
- }, {
- "date": "2012-08-10",
- "value": 24
- }, {
- "date": "2012-08-11",
- "value": 29
- }, {
- "date": "2012-08-12",
- "value": 32
- }, {
- "date": "2012-08-13",
- "value": 18
- }, {
- "date": "2012-08-14",
- "value": 24
- }, {
- "date": "2012-08-15",
- "value": 22
- }, {
- "date": "2012-08-16",
- "value": 18
- }, {
- "date": "2012-08-17",
- "value": 19
- }, {
- "date": "2012-08-18",
- "value": 14
- }, {
- "date": "2012-08-19",
- "value": 15
- }, {
- "date": "2012-08-20",
- "value": 12
- }, {
- "date": "2012-08-21",
- "value": 8
- }, {
- "date": "2012-08-22",
- "value": 9
- }, {
- "date": "2012-08-23",
- "value": 8
- }, {
- "date": "2012-08-24",
- "value": 7
- }, {
- "date": "2012-08-25",
- "value": 5
- }, {
- "date": "2012-08-26",
- "value": 11
- }, {
- "date": "2012-08-27",
- "value": 13
- }, {
- "date": "2012-08-28",
- "value": 18
- }, {
- "date": "2012-08-29",
- "value": 20
- }, {
- "date": "2012-08-30",
- "value": 29
- }, {
- "date": "2012-08-31",
- "value": 33
- }, {
- "date": "2012-09-01",
- "value": 42
- }, {
- "date": "2012-09-02",
- "value": 35
- }, {
- "date": "2012-09-03",
- "value": 31
- }, {
- "date": "2012-09-04",
- "value": 47
- }, {
- "date": "2012-09-05",
- "value": 52
- }, {
- "date": "2012-09-06",
- "value": 46
- }, {
- "date": "2012-09-07",
- "value": 41
- }, {
- "date": "2012-09-08",
- "value": 43
- }, {
- "date": "2012-09-09",
- "value": 40
- }, {
- "date": "2012-09-10",
- "value": 39
- }, {
- "date": "2012-09-11",
- "value": 34
- }, {
- "date": "2012-09-12",
- "value": 29
- }, {
- "date": "2012-09-13",
- "value": 34
- }, {
- "date": "2012-09-14",
- "value": 37
- }, {
- "date": "2012-09-15",
- "value": 42
- }, {
- "date": "2012-09-16",
- "value": 49
- }, {
- "date": "2012-09-17",
- "value": 46
- }, {
- "date": "2012-09-18",
- "value": 47
- }, {
- "date": "2012-09-19",
- "value": 55
- }, {
- "date": "2012-09-20",
- "value": 59
- }, {
- "date": "2012-09-21",
- "value": 58
- }, {
- "date": "2012-09-22",
- "value": 57
- }, {
- "date": "2012-09-23",
- "value": 61
- }, {
- "date": "2012-09-24",
- "value": 59
- }, {
- "date": "2012-09-25",
- "value": 67
- }, {
- "date": "2012-09-26",
- "value": 65
- }, {
- "date": "2012-09-27",
- "value": 61
- }, {
- "date": "2012-09-28",
- "value": 66
- }, {
- "date": "2012-09-29",
- "value": 69
- }, {
- "date": "2012-09-30",
- "value": 71
- }, {
- "date": "2012-10-01",
- "value": 67
- }, {
- "date": "2012-10-02",
- "value": 63
- }, {
- "date": "2012-10-03",
- "value": 46
- }, {
- "date": "2012-10-04",
- "value": 32
- }, {
- "date": "2012-10-05",
- "value": 21
- }, {
- "date": "2012-10-06",
- "value": 18
- }, {
- "date": "2012-10-07",
- "value": 21
- }, {
- "date": "2012-10-08",
- "value": 28
- }, {
- "date": "2012-10-09",
- "value": 27
- }, {
- "date": "2012-10-10",
- "value": 36
- }, {
- "date": "2012-10-11",
- "value": 33
- }, {
- "date": "2012-10-12",
- "value": 31
- }, {
- "date": "2012-10-13",
- "value": 30
- }, {
- "date": "2012-10-14",
- "value": 34
- }, {
- "date": "2012-10-15",
- "value": 38
- }, {
- "date": "2012-10-16",
- "value": 37
- }, {
- "date": "2012-10-17",
- "value": 44
- }, {
- "date": "2012-10-18",
- "value": 49
- }, {
- "date": "2012-10-19",
- "value": 53
- }, {
- "date": "2012-10-20",
- "value": 57
- }, {
- "date": "2012-10-21",
- "value": 60
- }, {
- "date": "2012-10-22",
- "value": 61
- }, {
- "date": "2012-10-23",
- "value": 69
- }, {
- "date": "2012-10-24",
- "value": 67
- }, {
- "date": "2012-10-25",
- "value": 72
- }, {
- "date": "2012-10-26",
- "value": 77
- }, {
- "date": "2012-10-27",
- "value": 75
- }, {
- "date": "2012-10-28",
- "value": 70
- }, {
- "date": "2012-10-29",
- "value": 72
- }, {
- "date": "2012-10-30",
- "value": 70
- }, {
- "date": "2012-10-31",
- "value": 72
- }, {
- "date": "2012-11-01",
- "value": 73
- }, {
- "date": "2012-11-02",
- "value": 67
- }, {
- "date": "2012-11-03",
- "value": 68
- }, {
- "date": "2012-11-04",
- "value": 65
- }, {
- "date": "2012-11-05",
- "value": 71
- }, {
- "date": "2012-11-06",
- "value": 75
- }, {
- "date": "2012-11-07",
- "value": 74
- }, {
- "date": "2012-11-08",
- "value": 71
- }, {
- "date": "2012-11-09",
- "value": 76
- }, {
- "date": "2012-11-10",
- "value": 77
- }, {
- "date": "2012-11-11",
- "value": 81
- }, {
- "date": "2012-11-12",
- "value": 83
- }, {
- "date": "2012-11-13",
- "value": 80
- }, {
- "date": "2012-11-14",
- "value": 81
- }, {
- "date": "2012-11-15",
- "value": 87
- }, {
- "date": "2012-11-16",
- "value": 82
- }, {
- "date": "2012-11-17",
- "value": 86
- }, {
- "date": "2012-11-18",
- "value": 80
- }, {
- "date": "2012-11-19",
- "value": 87
- }, {
- "date": "2012-11-20",
- "value": 83
- }, {
- "date": "2012-11-21",
- "value": 85
- }, {
- "date": "2012-11-22",
- "value": 84
- }, {
- "date": "2012-11-23",
- "value": 82
- }, {
- "date": "2012-11-24",
- "value": 73
- }, {
- "date": "2012-11-25",
- "value": 71
- }, {
- "date": "2012-11-26",
- "value": 75
- }, {
- "date": "2012-11-27",
- "value": 79
- }, {
- "date": "2012-11-28",
- "value": 70
- }, {
- "date": "2012-11-29",
- "value": 73
- }, {
- "date": "2012-11-30",
- "value": 61
- }, {
- "date": "2012-12-01",
- "value": 62
- }, {
- "date": "2012-12-02",
- "value": 66
- }, {
- "date": "2012-12-03",
- "value": 65
- }, {
- "date": "2012-12-04",
- "value": 73
- }, {
- "date": "2012-12-05",
- "value": 79
- }, {
- "date": "2012-12-06",
- "value": 78
- }, {
- "date": "2012-12-07",
- "value": 78
- }, {
- "date": "2012-12-08",
- "value": 78
- }, {
- "date": "2012-12-09",
- "value": 74
- }, {
- "date": "2012-12-10",
- "value": 73
- }, {
- "date": "2012-12-11",
- "value": 75
- }, {
- "date": "2012-12-12",
- "value": 70
- }, {
- "date": "2012-12-13",
- "value": 77
- }, {
- "date": "2012-12-14",
- "value": 67
- }, {
- "date": "2012-12-15",
- "value": 62
- }, {
- "date": "2012-12-16",
- "value": 64
- }, {
- "date": "2012-12-17",
- "value": 61
- }, {
- "date": "2012-12-18",
- "value": 59
- }, {
- "date": "2012-12-19",
- "value": 53
- }, {
- "date": "2012-12-20",
- "value": 54
- }, {
- "date": "2012-12-21",
- "value": 56
- }, {
- "date": "2012-12-22",
- "value": 59
- }, {
- "date": "2012-12-23",
- "value": 58
- }, {
- "date": "2012-12-24",
- "value": 55
- }, {
- "date": "2012-12-25",
- "value": 52
- }, {
- "date": "2012-12-26",
- "value": 54
- }, {
- "date": "2012-12-27",
- "value": 50
- }, {
- "date": "2012-12-28",
- "value": 50
- }, {
- "date": "2012-12-29",
- "value": 51
- }, {
- "date": "2012-12-30",
- "value": 52
- }, {
- "date": "2012-12-31",
- "value": 58
- }, {
- "date": "2013-01-01",
- "value": 60
- }, {
- "date": "2013-01-02",
- "value": 67
- }, {
- "date": "2013-01-03",
- "value": 64
- }, {
- "date": "2013-01-04",
- "value": 66
- }, {
- "date": "2013-01-05",
- "value": 60
- }, {
- "date": "2013-01-06",
- "value": 63
- }, {
- "date": "2013-01-07",
- "value": 61
- }, {
- "date": "2013-01-08",
- "value": 60
- }, {
- "date": "2013-01-09",
- "value": 65
- }, {
- "date": "2013-01-10",
- "value": 75
- }, {
- "date": "2013-01-11",
- "value": 77
- }, {
- "date": "2013-01-12",
- "value": 78
- }, {
- "date": "2013-01-13",
- "value": 70
- }, {
- "date": "2013-01-14",
- "value": 70
- }, {
- "date": "2013-01-15",
- "value": 73
- }, {
- "date": "2013-01-16",
- "value": 71
- }, {
- "date": "2013-01-17",
- "value": 74
- }, {
- "date": "2013-01-18",
- "value": 78
- }, {
- "date": "2013-01-19",
- "value": 85
- }, {
- "date": "2013-01-20",
- "value": 82
- }, {
- "date": "2013-01-21",
- "value": 83
- }, {
- "date": "2013-01-22",
- "value": 88
- }, {
- "date": "2013-01-23",
- "value": 85
- }, {
- "date": "2013-01-24",
- "value": 85
- }, {
- "date": "2013-01-25",
- "value": 80
- }, {
- "date": "2013-01-26",
- "value": 87
- }, {
- "date": "2013-01-27",
- "value": 84
- }, {
- "date": "2013-01-28",
- "value": 83
- }, {
- "date": "2013-01-29",
- "value": 84
- }, {
- "date": "2013-01-30",
- "value": 81
- } ]
- } );
- function avgvalchart(a, b, f) {
- if (f == null) {
- f = "rgba(0,0,0,0)";
- }
- return {
- labels: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October"],
- datasets: [{
- label: "",
- borderColor: a,
- borderWidth: 2,
- hitRadius: 30,
- pointHoverRadius: 4,
- pointBorderWidth: 50,
- pointHoverBorderWidth: 12,
- pointBackgroundColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
- pointBorderColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
- pointHoverBackgroundColor: a,
- pointHoverBorderColor: Chart.helpers.color("#000000").alpha(.1).rgbString(),
- fill: true,
- backgroundColor: f,
- data: b,
- }]
- };
- }
- function buildavgchartoption() {
- return {
- title: {
- display: !1
- },
- tooltips: {
- position: 'nearest',
- mode: 'index',
- intersect: false,
- yPadding: 10,
- xPadding: 10,
- },
- legend: {
- display: !1,
- labels: {
- usePointStyle: !1
- }
- },
- responsive: !0,
- maintainAspectRatio: !0,
- hover: {
- mode: "index"
- },
- scales: {
- xAxes: [{
- display: !1,
- gridLines: !1,
- scaleLabel: {
- display: !0,
- labelString: "Month"
- }
- }],
- yAxes: [{
- display: !1,
- gridLines: !1,
- scaleLabel: {
- display: !0,
- labelString: "Value"
- },
- ticks: {
- beginAtZero: !0
- }
- }]
- },
- elements: {
- point: {
- radius: 4,
- borderWidth: 12
- }
- },
- layout: {
- padding: {
- left: 0,
- right: 0,
- top: 120,
- bottom: 0
- }
- }
- };
- }
- var ctx = document.getElementById('this-month').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'bar',
- data: avgvalchart('#11c15b', [30, 15, 25, 35, 30, 20, 25, 30, 15, 1], '#11c15b'),
- options: buildchartoption(),
- });
- function buildchartoption() {
- return {
- title: {
- display: !1
- },
- tooltips: {
- position: 'nearest',
- mode: 'index',
- intersect: false,
- yPadding: 10,
- xPadding: 10,
- },
- legend: {
- display: !1,
- labels: {
- usePointStyle: !1
- }
- },
- responsive: !0,
- maintainAspectRatio: !0,
- hover: {
- mode: "index"
- },
- scales: {
- xAxes: [{
- display: !1,
- gridLines: !1,
- scaleLabel: {
- display: !0,
- labelString: "Month"
- }
- }],
- yAxes: [{
- display: !1,
- gridLines: !1,
- scaleLabel: {
- display: !0,
- labelString: "Value"
- },
- ticks: {
- beginAtZero: !0
- }
- }]
- },
- elements: {
- point: {
- radius: 4,
- borderWidth: 12
- }
- },
- layout: {
- padding: {
- left: 0,
- right: 0,
- top: 0,
- bottom: 0
- }
- }
- };
- }
- // sale order start
- var ctx = document.getElementById('sale-chart1').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'line',
- data: salechart('#b71c1c', [25, 30, 15, 20, 25, 30, 15, 25, 35, 30, 20, 10, 12, 1], 'transparent'),
- options: salebuildoption(),
- });
- var ctx = document.getElementById('sale-chart2').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'line',
- data: salechart('#00692c', [30, 15, 25, 35, 30, 20, 25, 30, 15, 20, 25,10, 12, 1], 'transparent'),
- options: salebuildoption(),
- });
- var ctx = document.getElementById('sale-chart3').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'line',
- data: salechart('#0f4aa5', [15, 20, 25,10, 30, 15, 25, 35, 30, 20, 25, 30, 12, 1], 'transparent'),
- options: salebuildoption(),
- });
- function salechart(a, b, f) {
- if (f == null) {
- f = "rgba(0,0,0,0)";
- }
- return {
- labels: ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"],
- datasets: [{
- label: "",
- borderColor: a,
- borderWidth: 2,
- hitRadius: 30,
- pointRadius: 3,
- pointHoverRadius: 4,
- pointBorderWidth: 5,
- pointHoverBorderWidth: 12,
- pointBackgroundColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
- // pointBorderColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
- pointBorderColor: a,
- pointHoverBackgroundColor: a,
- pointHoverBorderColor: Chart.helpers.color("#000000").alpha(.1).rgbString(),
- fill: true,
- lineTension: 0,
- backgroundColor: f,
- data: b,
- }]
- };
- }
- function salebuildoption() {
- return {
- title: {
- display: !1
- },
- tooltips: {
- position: 'nearest',
- mode: 'index',
- intersect: false,
- yPadding: 10,
- xPadding: 10,
- },
- legend: {
- display: !1,
- labels: {
- usePointStyle: !1
- }
- },
- responsive: !0,
- maintainAspectRatio: !0,
- hover: {
- mode: "index"
- },
- scales: {
- xAxes: [{
- display: !1,
- gridLines: !1,
- scaleLabel: {
- display: !0,
- labelString: "Month"
- }
- }],
- yAxes: [{
- display: !1,
- gridLines: !1,
- scaleLabel: {
- display: !0,
- labelString: "Value"
- },
- ticks: {
- beginAtZero: !0
- }
- }]
- },
- elements: {
- point: {
- radius: 4,
- borderWidth: 12
- }
- },
- layout: {
- padding: {
- left: 10,
- right: 10,
- top: 25,
- bottom: 25
- }
- }
- };
- }
- // sale order end
-
- // monthly expence start
- $(function() {
- var chart = AmCharts.makeChart("monthly-expence", {
- "theme": "light",
- "type": "gauge",
- "axes": [{
- "topTextFontSize": 1,
- "topTextYOffset": 0,
- "topTextColor": "#fff",
- "axisColor": "#31d6ea",
- "axisThickness": 0,
- "endValue": 100,
- "gridInside": false,
- "inside": true,
- "radius": "50%",
- "fontSize": 0,
- "valueInterval": 100,
- "tickAlpha": 0,
- "startAngle": -90,
- "endAngle": 90,
- "unit": "%",
- "bandOutlineAlpha": 0,
- "bands": [{
- "color": "#d6d6d6",
- "endValue": 100,
- "innerRadius": "105%",
- "radius": "170%",
- "gradientRatio": [0],
- "startValue": 0
- }, {
- "color": "#11c15b",
- "endValue": 0,
- "innerRadius": "105%",
- "radius": "170%",
- "gradientRatio": [0],
- "startValue": 0
- }]
- }],
- "arrows": [{
- "alpha": 1,
- "innerRadius": "0%",
- "startWidth": 13,
- "nailRadius": 10,
- "nailAlpha": 1,
- "radius": "140%"
- }]
- });
-
- setInterval(randomValue, 2000);
-
- // set random value
- function randomValue() {
- var value = Math.round(Math.random() * 100);
- chart.arrows[0].setValue(value);
- chart.axes[0].setTopText(value + " %");
- document.getElementById("exp-val").innerHTML = ("$ " + (value * 10));
- chart.axes[0].bands[1].setEndValue(value);
- }
- });
- // monthly expence end
-
- // daily visitor start
- var chart = AmCharts.makeChart("daily-visitor", {
- "type": "serial",
- "theme": "light",
- "precision": 2,
- "graphs": [{
- "id": "g1",
- "valueAxis": "v2",
- "bullet": "round",
- "bulletBorderAlpha": 1,
- "bulletColor": "#FFFFFF",
- "bulletSize": 5,
- "hideBulletsCount": 50,
- "lineThickness": 2,
- "lineColor": "#448aff",
- "type": "smoothedLine",
- "title": "Market Days",
- "useLineColorForBulletBorder": true,
- "valueField": "market1",
- "balloonText": "[[title]]<br /><b style='font-size: 130%'>[[value]]</b>"
- }],
- "chartCursor": {
- "pan": true,
- "valueLineEnabled": true,
- "valueLineBalloonEnabled": true,
- "cursorAlpha": 0,
- "valueLineAlpha": 0.2
- },
- "categoryField": "date",
- "categoryAxis": {
- "dashLength": 1,
- "axisAlpha":0,
- "lineAlpha":0,
- "gridAlpha":0,
- "minorGridEnabled": true
- },
- "legend": {
- "enabled": false
- },
- "balloon": {
- "borderThickness": 1,
- "shadowAlpha": 0
- },
- "export": {
- "enabled": true
- },
- "dataProvider": [{
- "date": "1",
- "market1": 85
- }, {
- "date": "2",
- "market1": 74
- }, {
- "date": "3",
- "market1": 78
- }, {
- "date": "4",
- "market1": 85
- }, {
- "date": "5",
- "market1": 82
- }, {
- "date": "6",
- "market1": 83
- }, {
- "date": "7",
- "market1": 72
- }, {
- "date": "8",
- "market1": 85
- }]
- });
- // daily visitor end
-
- // daily sales start
- var chart = AmCharts.makeChart("daily-sales", {
- "type": "serial",
- "theme": "light",
- "dataProvider": [{
- "country": "USA",
- "visits": 10,
- "color": "#536dfe"
- }, {
- "country": "Russia",
- "visits": 8,
- "color": "#ff5252"
- }, {
- "country": "South Korea",
- "visits": 5,
- "color": "#11c15b"
- }, {
- "country": "Canada",
- "visits": 7,
- "color": "#448aff"
- }],
- "valueAxes": [{
- "axisAlpha": 0,
- "lineAlpha": 0,
- "gridAlpha": 0,
- "position": "left",
- "fontSize": 0
- }],
- "startDuration": 1,
- "graphs": [{
- "balloonText": "<b>[[category]]: [[value]]</b>",
- "fillColorsField": "color",
- "fillAlphas": 0.9,
- "lineAlpha": 0.2,
- "type": "column",
- "valueField": "visits"
- }],
- "chartCursor": {
- "categoryBalloonEnabled": false,
- "cursorAlpha": 0,
- "zoomable": false
- },
- "categoryField": "country",
- "categoryAxis": {
- "gridPosition": "start",
- "axisAlpha": 1,
- "lineAlpha": 0,
- "gridAlpha": 0
- },
- "export": {
- "enabled": true
- }
- });
- // daily sales end
-
- // storage-space start
- var chart = AmCharts.makeChart("storage-space", {
- "type": "pie",
- "startDuration": 0,
- "theme": "light",
- "labelRadius": 0,
- "pullOutRadius": 0,
- "labelText": "",
- "colorField": "color",
- "legend":{
- "enabled":false,
- },
- "innerRadius": "00%",
- "dataProvider": [{
- "country": "Lithuania",
- "litres": 501.9,
- "color": "#448aff"
- }, {
- "country": "Czech Republic",
- "litres": 301.9,
- "color": "#ffe100"
- }, {
- "country": "Ireland",
- "litres": 201.1,
- "color": "#ff5252"
- }, {
- "country": "india",
- "litres": 220.1,
- "color": "#11c15b"
- }],
- "valueField": "litres",
- "export": {
- "enabled": true
- }
- });
- // storage-space end
-
- // allocation map start
- var map = AmCharts.makeChart( "allocation-map", {
- "type": "map",
- "theme": "light",
- "colorSteps": 10,
- "dataProvider": {
- "map": "usaLow",
- "areas": [ {
- "id": "US-AL",
- "value": 4447100
- }, {
- "id": "US-AK",
- "value": 626932
- }, {
- "id": "US-AZ",
- "value": 5130632
- }, {
- "id": "US-AR",
- "value": 2673400
- }, {
- "id": "US-CA",
- "value": 33871648
- }, {
- "id": "US-CO",
- "value": 4301261
- }, {
- "id": "US-CT",
- "value": 3405565
- }, {
- "id": "US-DE",
- "value": 783600
- }, {
- "id": "US-FL",
- "value": 15982378
- }, {
- "id": "US-GA",
- "value": 8186453
- }, {
- "id": "US-HI",
- "value": 1211537
- }, {
- "id": "US-ID",
- "value": 1293953
- }, {
- "id": "US-IL",
- "value": 12419293
- }, {
- "id": "US-IN",
- "value": 6080485
- }, {
- "id": "US-IA",
- "value": 2926324
- }, {
- "id": "US-KS",
- "value": 2688418
- }, {
- "id": "US-KY",
- "value": 4041769
- }, {
- "id": "US-LA",
- "value": 4468976
- }, {
- "id": "US-ME",
- "value": 1274923
- }, {
- "id": "US-MD",
- "value": 5296486
- }, {
- "id": "US-MA",
- "value": 6349097
- }, {
- "id": "US-MI",
- "value": 9938444
- }, {
- "id": "US-MN",
- "value": 4919479
- }, {
- "id": "US-MS",
- "value": 2844658
- }, {
- "id": "US-MO",
- "value": 5595211
- }, {
- "id": "US-MT",
- "value": 902195
- }, {
- "id": "US-NE",
- "value": 1711263
- }, {
- "id": "US-NV",
- "value": 1998257
- }, {
- "id": "US-NH",
- "value": 1235786
- }, {
- "id": "US-NJ",
- "value": 8414350
- }, {
- "id": "US-NM",
- "value": 1819046
- }, {
- "id": "US-NY",
- "value": 18976457
- }, {
- "id": "US-NC",
- "value": 8049313
- }, {
- "id": "US-ND",
- "value": 642200
- }, {
- "id": "US-OH",
- "value": 11353140
- }, {
- "id": "US-OK",
- "value": 3450654
- }, {
- "id": "US-OR",
- "value": 3421399
- }, {
- "id": "US-PA",
- "value": 12281054
- }, {
- "id": "US-RI",
- "value": 1048319
- }, {
- "id": "US-SC",
- "value": 4012012
- }, {
- "id": "US-SD",
- "value": 754844
- }, {
- "id": "US-TN",
- "value": 5689283
- }, {
- "id": "US-TX",
- "value": 20851820
- }, {
- "id": "US-UT",
- "value": 2233169
- }, {
- "id": "US-VT",
- "value": 608827
- }, {
- "id": "US-VA",
- "value": 7078515
- }, {
- "id": "US-WA",
- "value": 5894121
- }, {
- "id": "US-WV",
- "value": 1808344
- }, {
- "id": "US-WI",
- "value": 5363675
- }, {
- "id": "US-WY",
- "value": 493782
- } ]
- },
-
- "areasSettings": {
- "autoZoom": true
- },
- "export": {
- "enabled": true
- }
-
- } );
- var chart = AmCharts.makeChart("allocation-chart", {
- "type": "pie",
- "startDuration": 0,
- "theme": "light",
- "labelRadius": 0,
- "pullOutRadius": 0,
- "labelText": "",
- "colorField": "color",
- "legend":{
- // "enabled":false,
- },
- "innerRadius": "70%",
- "dataProvider": [{
- "country": "Lithuania",
- "litres": 501.9,
- "color": "#85C5E3"
- }, {
- "country": "Czech Republic",
- "litres": 301.9,
- "color": "#6AA3C4"
- }, {
- "country": "Ireland",
- "litres": 201.1,
- "color": "#6097B9"
- }, {
- "country": "india",
- "litres": 220.1,
- "color": "#4E81A4"
- }],
- "valueField": "litres",
- });
- // allocation map end
-
- // seo start
- var ctx = document.getElementById('seo-chart1').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'line',
- data: seochart('#536dfe', [1, 30, 15, 20, 25, 30, 15, 25, 35, 30, 20, 10, 12, 1], '#7c90fe'),
- options: seobuildoption(),
- });
- var ctx = document.getElementById('seo-chart2').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'bar',
- data: seochart('#11c15b', [1, 30, 15, 20, 25, 30, 15, 25, 35, 30, 20, 10, 12, 1], '#11c15b'),
- options: seobuildoption(),
- });
- var ctx = document.getElementById('seo-chart3').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'line',
- data: seochart('#448aff', [1, 30, 15, 20, 25, 30, 15, 25, 35, 30, 20, 10, 12, 1], 'transparent'),
- options: seobuildoption(),
- });
- function seochart(a, b, f) {
- if (f == null) {
- f = "rgba(0,0,0,0)";
- }
- return {
- labels: ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"],
- datasets: [{
- label: "",
- borderColor: a,
- borderWidth: 2,
- hitRadius: 30,
- pointRadius: 2,
- pointHoverRadius: 4,
- pointBorderWidth: 5,
- pointHoverBorderWidth: 12,
- pointBackgroundColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
- // pointBorderColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
- pointBorderColor: a,
- pointHoverBackgroundColor: a,
- pointHoverBorderColor: Chart.helpers.color("#000000").alpha(.1).rgbString(),
- fill: true,
- lineTension: 0,
- backgroundColor: f,
- data: b,
- }]
- };
- }
- function seobuildoption() {
- return {
- title: {
- display: !1
- },
- tooltips: {
- position: 'nearest',
- mode: 'index',
- intersect: false,
- yPadding: 10,
- xPadding: 10,
- },
- legend: {
- display: !1,
- labels: {
- usePointStyle: !1
- }
- },
- responsive: !0,
- maintainAspectRatio: !0,
- hover: {
- mode: "index"
- },
- scales: {
- xAxes: [{
- display: !1,
- gridLines: !1,
- scaleLabel: {
- display: !0,
- labelString: "Month"
- }
- }],
- yAxes: [{
- display: !1,
- gridLines: !1,
- scaleLabel: {
- display: !0,
- labelString: "Value"
- },
- ticks: {
- beginAtZero: !0
- }
- }]
- },
- elements: {
- point: {
- radius: 4,
- borderWidth: 12
- }
- },
- layout: {
- padding: {
- left: 30,
- right: 10,
- top: 10,
- bottom: 10
- }
- }
- };
- }
- // seo end
-
- // seo ecommerce start
- var ctx = document.getElementById('sec-ecommerce-chart-line').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'line',
- data: seochart('#fff', [1, 30, 15, 20, 25, 30, 15, 25, 35, 30, 20, 10, 12, 1], 'transparent'),
- options: seobuildoption(),
- });
- var ctx = document.getElementById('sec-ecommerce-chart-bar').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'bar',
- data: seochart('#00692c', [20, 30, 15, 20, 25, 30, 15, 25, 35, 30, 20, 10, 12, 1], '#00692c'),
- options: seobuildoption(),
- });
- function seochart(a, b, f) {
- if (f == null) {
- f = "rgba(0,0,0,0)";
- }
- return {
- labels: ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"],
- datasets: [{
- label: "",
- borderColor: a,
- borderWidth: 2,
- hitRadius: 30,
- pointRadius: 2,
- pointHoverRadius: 4,
- pointBorderWidth: 5,
- pointHoverBorderWidth: 12,
- pointBackgroundColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
- // pointBorderColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
- pointBorderColor: a,
- pointHoverBackgroundColor: a,
- pointHoverBorderColor: Chart.helpers.color("#000000").alpha(.1).rgbString(),
- fill: true,
- lineTension: 0,
- backgroundColor: f,
- data: b,
- }]
- };
- }
- function seobuildoption() {
- return {
- title: {
- display: !1
- },
- tooltips: {
- position: 'nearest',
- mode: 'index',
- intersect: false,
- yPadding: 10,
- xPadding: 10,
- },
- legend: {
- display: !1,
- labels: {
- usePointStyle: !1
- }
- },
- responsive: !0,
- maintainAspectRatio: !0,
- hover: {
- mode: "index"
- },
- scales: {
- xAxes: [{
- display: !1,
- gridLines: !1,
- scaleLabel: {
- display: !0,
- labelString: "Month"
- }
- }],
- yAxes: [{
- display: !1,
- gridLines: !1,
- scaleLabel: {
- display: !0,
- labelString: "Value"
- },
- ticks: {
- beginAtZero: !0
- }
- }]
- },
- elements: {
- point: {
- radius: 4,
- borderWidth: 12
- }
- },
- layout: {
- padding: {
- left: 30,
- right: 10,
- top: 20,
- bottom: 0
- }
- }
- };
- }
- var chart = AmCharts.makeChart( "seo-ecommerce-barchart", {
- "type": "serial",
- "theme": "light",
- "dataProvider": [ {
- "visits": 10
- }, {
- "visits": 15
- }, {
- "visits": 12
- }, {
- "visits": 16
- }, {
- "visits": 8
- }, {
- "visits": 10
- }, {
- "visits": 9
- }, {
- "visits": 6
- }, {
- "visits": 10
- }, {
- "visits": 12
- }, {
- "visits": 10
- }, {
- "visits": 13
- }, {
- "visits": 11
- }, {
- "visits": 16
- }, {
- "visits": 8
- }, {
- "visits": 10
- }, {
- "visits": 9
- }, {
- "visits": 6
- }, {
- "visits": 10
- }, {
- "visits": 6
- }, {
- "visits": 10
- }, {
- "visits": 12
- }, {
- "visits": 10
- }, {
- "visits": 13
- }, {
- "visits": 11
- }, {
- "visits": 16
- }, {
- "visits": 8
- }, {
- "visits": 10
- }, {
- "visits": 9
- }, {
- "visits": 12
- }, {
- "visits": 10
- }, {
- "visits": 13
- }, {
- "visits": 11
- } ],
- "valueAxes": [ {
- "gridAlpha": 0.1,
- "dashLength": 0
- } ],
- "gridAboveGraphs": true,
- "startDuration": 1,
- "graphs": [ {
- "balloonText": "Active User: <b>[[value]]</b>",
- "fillAlphas": 1,
- "lineAlpha": 1,
- "lineColor": "#536dfe",
- "type": "column",
- "valueField": "visits",
- "columnWidth": 0.5
- } ],
- "chartCursor": {
- "categoryBalloonEnabled": false,
- "cursorAlpha": 0,
- "zoomable": false
- },
- "categoryAxis": {
- "gridPosition": "start",
- "gridAlpha": 0,
- "axesAlpha": 0,
- "lineAlpha": 0,
- "fontSize" : 0,
- "tickLength": 0
- },
- "export": {
- "enabled": true
- }
-
- } );
- // seo ecommerce end
-
- // sale order start
- var ctx = document.getElementById('seo-anlytics1').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'line',
- data: salechart('#448aff', [25, 30, 15, 20, 25, 30, 15, 25, 35, 30, 20, 10, 12, 1], 'transparent'),
- options: salebuildoption(),
- });
- var ctx = document.getElementById('seo-anlytics2').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'line',
- data: salechart('#11c15b', [15, 20, 25,10, 12, 30, 15, 25, 35, 30, 20, 25, 30, 1], 'transparent'),
- options: salebuildoption(),
- });
- var ctx = document.getElementById('seo-anlytics3').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'line',
- data: salechart('#536dfe', [15, 20, 25,10, 30, 15, 25, 35, 30, 20, 25, 30, 12, 1], 'transparent'),
- options: salebuildoption(),
- });
- var ctx = document.getElementById('seo-anlytics4').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'line',
- data: salechart('#ff5252', [30, 15, 25, 35, 30, 20, 15, 20, 25,10, 25, 30, 12, 1], 'transparent'),
- options: salebuildoption(),
- });
- function salechart(a, b, f) {
- if (f == null) {
- f = "rgba(0,0,0,0)";
- }
- return {
- labels: ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"],
- datasets: [{
- label: "",
- borderColor: a,
- borderWidth: 2,
- hitRadius: 30,
- pointRadius: 0,
- pointHoverRadius: 4,
- pointBorderWidth: 2,
- pointHoverBorderWidth: 12,
- pointBackgroundColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
- // pointBorderColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
- pointBorderColor: a,
- pointHoverBackgroundColor: a,
- pointHoverBorderColor: Chart.helpers.color("#000000").alpha(.1).rgbString(),
- fill: true,
- lineTension: 0,
- backgroundColor: f,
- data: b,
- }]
- };
- }
- function salebuildoption() {
- return {
- title: {
- display: !1
- },
- tooltips: {
- position: 'nearest',
- mode: 'index',
- intersect: false,
- yPadding: 10,
- xPadding: 10,
- },
- legend: {
- display: !1,
- labels: {
- usePointStyle: !1
- }
- },
- responsive: !0,
- maintainAspectRatio: !0,
- hover: {
- mode: "index"
- },
- scales: {
- xAxes: [{
- display: !1,
- gridLines: !1,
- scaleLabel: {
- display: !0,
- labelString: "Month"
- }
- }],
- yAxes: [{
- display: !1,
- gridLines: !1,
- scaleLabel: {
- display: !0,
- labelString: "Value"
- },
- ticks: {
- beginAtZero: !0
- }
- }]
- },
- elements: {
- point: {
- radius: 4,
- borderWidth: 12
- }
- },
- layout: {
- padding: {
- left: 10,
- right: 10,
- top: 25,
- bottom: 25
- }
- }
- };
- }
- // sale order end
-
- // sale report start
- var ctx = document.getElementById('sale-report-1').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'bar',
- data: salereportchart('#448aff', [25, 30, 15, 20, 25, 30, 15, 1], '#448aff'),
- options: salereportbuildoption(),
- });
- var ctx = document.getElementById('sale-report-2').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'bar',
- data: salereportchart('#11c15b', [15, 20, 25,10, 12, 30, 15, 1], '#11c15b'),
- options: salereportbuildoption(),
- });
- var ctx = document.getElementById('sale-report-3').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'bar',
- data: salereportchart('#536dfe', [15, 20, 25,10, 30, 15, 25, 1], '#536dfe'),
- options: salereportbuildoption(),
- });
- var ctx = document.getElementById('sale-report-4').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'bar',
- data: salereportchart('#ff5252', [30, 15, 25, 35, 30, 20, 15, 1], '#ff5252'),
- options: salereportbuildoption(),
- });
- function salereportchart(a, b, f) {
- if (f == null) {
- f = "rgba(0,0,0,0)";
- }
- return {
- labels: ["1","2","3","4","5","6","7","8"],
- datasets: [{
- label: "",
- borderColor: a,
- borderWidth: 2,
- hitRadius: 30,
- pointRadius: 0,
- pointHoverRadius: 4,
- pointBorderWidth: 2,
- pointHoverBorderWidth: 12,
- pointBackgroundColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
- // pointBorderColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
- pointBorderColor: a,
- pointHoverBackgroundColor: a,
- pointHoverBorderColor: Chart.helpers.color("#000000").alpha(.1).rgbString(),
- fill: true,
- lineTension: 0,
- backgroundColor: f,
- data: b,
- }]
- };
- }
- function salereportbuildoption() {
- return {
- title: {
- display: !1
- },
- tooltips: {
- position: 'nearest',
- mode: 'index',
- intersect: false,
- yPadding: 10,
- xPadding: 10,
- },
- legend: {
- display: !1,
- labels: {
- usePointStyle: !1
- }
- },
- responsive: !0,
- maintainAspectRatio: !0,
- hover: {
- mode: "index"
- },
- scales: {
- xAxes: [{
- display: !1,
- gridLines: !1,
- scaleLabel: {
- display: !0,
- labelString: "Month"
- }
- }],
- yAxes: [{
- display: !1,
- gridLines: !1,
- scaleLabel: {
- display: !0,
- labelString: "Value"
- },
- ticks: {
- beginAtZero: !0
- }
- }]
- },
- elements: {
- point: {
- radius: 4,
- borderWidth: 12
- }
- },
- layout: {
- padding: {
- left: 10,
- right: 10,
- top: 10,
- bottom: 10
- }
- }
- };
- }
- // sale report end
-
- // realtime start
- $(function() {
- var day = 0;
- var firstDate = new Date();
- firstDate.setDate(firstDate.getDate() - 500);
- function generateChartData() {
- var chartData = [];
- for (day = 0; day < 30; day++) {
- var newDate = new Date(firstDate);
- newDate.setDate(newDate.getDate() + day);
-
- var visits = Math.round(Math.random() * 40) - 20;
-
- chartData.push({
- "date": newDate,
- "visits": visits
- });
- }
-
- return chartData;
- }
- var chart = AmCharts.makeChart("realtime-chart", {
- "type": "serial",
- "theme": "light",
- "zoomOutButton": {
- "backgroundColor": '#000000',
- "backgroundAlpha": 0.15
- },
- "dataProvider": generateChartData(),
- "categoryField": "date",
- "categoryAxis": {
- "parseDates": true,
- "minPeriod": "DD",
- "dashLength": 1,
- "gridAlpha": 0.15,
- "axisColor": "#DADADA"
- },
- "graphs": [{
- "id": "g1",
- "valueField": "visits",
- "bullet": "round",
- "bulletBorderColor": "#FFFFFF",
- "bulletBorderThickness": 2,
- "lineThickness": 2,
- "lineColor": "#448aff",
- "negativeLineColor": "#ff5252",
- "hideBulletsCount": 50
- }],
- "chartCursor": {
- "cursorPosition": "mouse"
- }
- })
- setInterval(function () {
- chart.dataProvider.shift();
- day++;
- var newDate = new Date(firstDate);
- newDate.setDate(newDate.getDate() + day);
- var visits = Math.round(Math.random() * 40) - 20;
- chart.dataProvider.push({
- date: newDate,
- visits: visits
- });
- chart.validateData();
- }, 1000);
- });
- $(function() {
- var chart = AmCharts.makeChart("sales-prediction-chart", {
- "theme": "light",
- "type": "gauge",
- "axes": [{
- "topTextFontSize": 0,
- "topTextYOffset": 0,
- "topTextColor": "#fff",
- "axisColor": "#31d6ea",
- "axisThickness": 0,
- "endValue": 100,
- "gridInside": false,
- "inside": true,
- "radius": "50%",
- "fontSize": 0.,
- "valueInterval": 100,
- "tickAlpha": 0,
- "startAngle": -140,
- "endAngle": 140,
- "unit": "%",
- "bandOutlineAlpha": 0,
- "bands": [{
- "color": "#ff9797",
- "endValue": 100,
- "innerRadius": "105%",
- "radius": "170%",
- "gradientRatio": [0],
- "startValue": 0
- }, {
- "color": "#ff5252",
- "endValue": 0,
- "innerRadius": "105%",
- "radius": "170%",
- "gradientRatio": [0],
- "startValue": 0
- }]
- }],
- "arrows": [{
- "alpha": 1,
- "innerRadius": "0%",
- "startWidth": 10,
- "nailRadius": 8,
- "nailAlpha": 1,
- "radius": "140%"
- }]
- });
-
- setInterval(randomValue, 2000);
-
- // set random value
- function randomValue() {
- var value = Math.round(Math.random() * 100);
- chart.arrows[0].setValue(value);
- chart.axes[0].setTopText(value + " %");
- chart.axes[0].bands[1].setEndValue(value);
- }
- });
- $(function() {
- var chart = AmCharts.makeChart("emails-sentsales-chart", {
- "theme": "light",
- "type": "gauge",
- "axes": [{
- "topTextFontSize": 0,
- "topTextYOffset": 0,
- "topTextColor": "#fff",
- "axisColor": "#31d6ea",
- "axisThickness": 0,
- "endValue": 100,
- "gridInside": false,
- "inside": true,
- "radius": "50%",
- "fontSize": 0.,
- "valueInterval": 100,
- "tickAlpha": 0,
- "startAngle": 0,
- "endAngle": 360,
- "unit": "%",
- "bandOutlineAlpha": 0,
- "bands": [{
- "color": "#448aff",
- "endValue": 100,
- "innerRadius": "105%",
- "radius": "170%",
- "gradientRatio": [0],
- "startValue": 0
- }, {
- "color": "#ff5252",
- "endValue": 0,
- "innerRadius": "105%",
- "radius": "170%",
- "gradientRatio": [0],
- "startValue": 0
- }]
- }],
- "arrows": [{
- "alpha": 0,
- "innerRadius": "100%",
- "borderAlpha": 0,
- "nailAlpha": 0,
- }]
- });
-
- setInterval(randomValue, 2000);
-
- // set random value
- function randomValue() {
- var value = Math.round(Math.random() * 100);
- document.getElementById("opened").innerHTML = ((value * 10)+ " opened");
- document.getElementById("unopened").innerHTML = ((1000 - (value * 10)) + " unopened");
- chart.axes[0].bands[1].setEndValue(value);
- }
- });
- // realtime end
-
- // project and visite start
- var chart = AmCharts.makeChart( "proj-earning", {
- "type": "serial",
- "theme": "light",
- "dataProvider": [ {
- "type":"UI",
- "visits": 10
- }, {
- "type":"UX",
- "visits": 15
- }, {
- "type":"Web",
- "visits": 12
- }, {
- "type":"App",
- "visits": 16
- }, {
- "type":"SEO",
- "visits": 8
- } ],
- "valueAxes": [ {
- "gridAlpha": 0.3,
- "gridColor": "#fff",
- "axisColor": "transparent",
- "color": '#fff',
- "dashLength": 0
- } ],
- "gridAboveGraphs": true,
- "startDuration": 1,
- "graphs": [ {
- "balloonText": "Active User: <b>[[value]]</b>",
- "fillAlphas": 1,
- "lineAlpha": 1,
- "lineColor": "#fff",
- "type": "column",
- "valueField": "visits",
- "columnWidth": 0.5
- } ],
- "chartCursor": {
- "categoryBalloonEnabled": false,
- "cursorAlpha": 0,
- "zoomable": false
- },
- "categoryField": "type",
- "categoryAxis": {
- "gridPosition": "start",
- "gridAlpha": 0,
- "axesAlpha": 0,
- "lineAlpha": 0,
- "fontSize" : 12,
- "color": '#fff',
- "tickLength": 0
- },
- "export": {
- "enabled": false
- }
-
- } );
- $(function() {
- var day = 0;
- var firstDate = new Date();
- firstDate.setDate(firstDate.getDate() - 500);
- function generateChartData() {
- var chartData = [];
- for (day = 0; day < 10; day++) {
- var newDate = new Date(firstDate);
- newDate.setDate(newDate.getDate() + day);
- var visits1 = Math.round(Math.random() * 10);
- var visits2 = Math.round(Math.random() * 10);
- var visits3 = Math.round(Math.random() * 10);
-
- chartData.push({
- "date": newDate,
- "visits1": visits1,
- "visits2": visits2,
- "visits3": visits3
- });
- }
-
- return chartData;
- }
- var chart = AmCharts.makeChart("realtime-visit-chart", {
- "type": "serial",
- "theme": "light",
- "zoomOutButton": {
- "backgroundColor": '#000000',
- "backgroundAlpha": 0.15
- },
- "dataProvider": generateChartData(),
- "categoryField": "date",
- "categoryAxis": {
- "parseDates": true,
- "minPeriod": "DD",
- "dashLength": 1,
- "gridAlpha": 0.15,
- "axisColor": "#DADADA"
- },
- "graphs": [{
- "id": "g1",
- "valueField": "visits1",
- "bullet": "round",
- "bulletBorderColor": "#FFFFFF",
- "bulletBorderThickness": 0,
- "lineThickness": 3,
- "bulletAlpha":0,
- "type": "smoothedLine",
- "lineColor": "#448aff",
- "hideBulletsCount": 10
- },{
- "id": "g2",
- "valueField": "visits2",
- "bullet": "round",
- "type": "smoothedLine",
- "bulletBorderColor": "#FFFFFF",
- "bulletBorderThickness": 2,
- "lineThickness": 3,
- "bulletAlpha":0,
- "lineColor": "#ff5252",
- "hideBulletsCount": 50
- },{
- "id": "g3",
- "valueField": "visits3",
- "bullet": "round",
- "type": "smoothedLine",
- "bulletBorderColor": "#FFFFFF",
- "bulletBorderThickness": 0,
- "lineThickness": 3,
- "bulletAlpha":0,
- "lineColor": "#11c15b",
- "hideBulletsCount": 0
- }],
- "chartCursor": {
- "cursorPosition": "mouse"
- }
- })
- setInterval(function () {
- chart.dataProvider.shift();
- day++;
- var newDate = new Date(firstDate);
- newDate.setDate(newDate.getDate() + day);
- var visits1 = Math.round(Math.random() * 10);
- var visits2 = Math.round(Math.random() * 10);
- var visits3 = Math.round(Math.random() * 10);
- chart.dataProvider.push({
- date: newDate,
- visits1: visits1,
- visits2: visits2,
- visits3: visits3
- });
- chart.validateData();
- }, 1000);
- });
- // project and visite end
-
- // pageview and prod sale start
- var ctx = document.getElementById('page-view').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'line',
- data: pageviewchart('#ff5252', [1, 30, 15, 20, 25, 30, 15, 25, 35, 30, 20, 10, 12, 1], 'transparent'),
- options: pageviewbuildoption(),
- });
- function pageviewchart(a, b, f) {
- if (f == null) {
- f = "rgba(0,0,0,0)";
- }
- return {
- labels: ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"],
- datasets: [{
- label: "",
- borderColor: a,
- borderWidth: 2,
- hitRadius: 30,
- pointRadius: 2,
- pointColor: Chart.helpers.color("#ffffff").alpha(1).rgbString(),
- pointHoverRadius: 4,
- pointBorderWidth: 5,
- pointHoverBorderWidth: 12,
- pointBackgroundColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
- // pointBorderColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
- pointBorderColor: a,
- pointHoverBackgroundColor: a,
- pointHoverBorderColor: Chart.helpers.color("#000000").alpha(.1).rgbString(),
- fill: true,
- lineTension: 0,
- backgroundColor: f,
- data: b,
- }]
- };
- }
- function pageviewbuildoption() {
- return {
- title: {
- display: !1
- },
- tooltips: {
- position: 'nearest',
- mode: 'index',
- intersect: false,
- yPadding: 10,
- xPadding: 10,
- },
- legend: {
- display: !1,
- labels: {
- usePointStyle: !1
- }
- },
- responsive: !0,
- maintainAspectRatio: !0,
- hover: {
- mode: "index"
- },
- scales: {
- xAxes: [{
- display: !1,
- gridLines: !1,
- scaleLabel: {
- display: !0,
- labelString: "Month"
- }
- }],
- yAxes: [{
- display: !1,
- gridLines: !1,
- scaleLabel: {
- display: !0,
- labelString: "Value"
- },
- ticks: {
- beginAtZero: !0
- }
- }]
- },
- elements: {
- point: {
- radius: 4,
- borderWidth: 12
- }
- },
- layout: {
- padding: {
- left: 10,
- right: 10,
- top: 20,
- bottom: 20
- }
- }
- };
- }
- var ctx = document.getElementById('bounce-rate').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'line',
- data: {
- labels: ["1","2","3","4","5","6"],
- datasets: [{
- label: "",
- borderColor: Chart.helpers.color('#448aff').alpha(1).rgbString(),
- borderWidth: 2,
- hitRadius: 30,
- pointRadius: 0,
- pointColor: Chart.helpers.color("#ffffff").alpha(1).rgbString(),
- pointHoverRadius: 4,
- pointBorderWidth: 5,
- pointHoverBorderWidth: 12,
- pointBackgroundColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
- pointBorderColor: '#448aff',
- pointHoverBackgroundColor: '#448aff',
- pointHoverBorderColor: Chart.helpers.color("#000000").alpha(.1).rgbString(),
- fill: true,
- cubicInterpolationMode: 'monotone',
- backgroundColor: Chart.helpers.color('#448aff').alpha(.2).rgbString(),
- data: [1, 30, 10, 25, 5, 30],
- }]
- },
- options: bounceratebuildoption(),
- });
- function bounceratebuildoption() {
- return {
- title: {
- display: !1
- },
- tooltips: {
- intersect: false,
- mode: 'nearest',
- xPadding: 10,
- yPadding: 10,
- caretPadding: 10
- },
- legend: {
- display: !1,
- labels: {
- usePointStyle: !1
- }
- },
- responsive: !0,
- maintainAspectRatio: !0,
- hover: {
- mode: "index"
- },
- scales: {
- xAxes: [{
- display: !1,
- gridLines: !1,
- scaleLabel: {
- display: !0,
- labelString: "Month"
- }
- }],
- yAxes: [{
- display: !1,
- gridLines: !1,
- scaleLabel: {
- display: !0,
- labelString: "Value"
- },
- ticks: {
- beginAtZero: !0
- }
- }]
- },
- elements: {
- point: {
- radius: 4,
- borderWidth: 12
- }
- },
- layout: {
- padding: {
- left: 0,
- right: 0,
- top: 20,
- bottom: 0
- }
- }
- };
- }
- var chart = AmCharts.makeChart("product-sales-chart", {
- "type": "serial",
- "theme": "light",
- "dataDateFormat": "YYYY-MM-DD",
- "precision": 2,
- "valueAxes": [{
- "id": "v1",
- "title": "Sales",
- "position": "left",
- "autoGridCount": false,
- "labelFunction": function(value) {
- return "$" + Math.round(value) + "M";
- }
- }, {
- "id": "v2",
- "gridAlpha": 0.1,
- "autoGridCount": false
- }],
- "graphs": [{
- "id": "g1",
- "valueAxis": "v2",
- "lineThickness": 0,
- "fillAlphas": 0.9,
- "lineColor": "#448aff",
- "type": "smoothedLine",
- "title": "Laptop",
- "useLineColorForBulletBorder": true,
- "valueField": "market1",
- "balloonText": "[[title]]<br /><b style='font-size: 130%'>[[value]]</b>"
- }, {
- "id": "g2",
- "valueAxis": "v2",
- "fillAlphas": 0.9,
- "bulletColor": "#ff5252",
- "lineThickness": 0,
- "lineColor": "#ff5252",
- "type": "smoothedLine",
- "title": "TV",
- "useLineColorForBulletBorder": true,
- "valueField": "market2",
- "balloonText": "[[title]]<br /><b style='font-size: 130%'>[[value]]</b>"
- }, {
- "id": "g3",
- "valueAxis": "v2",
- "fillAlphas": 0.9,
- "bulletColor": "#11c15b",
- "lineThickness": 0,
- "lineColor": "#11c15b",
- "type": "smoothedLine",
- "title": "Mobile",
- "useLineColorForBulletBorder": true,
- "valueField": "sales1",
- "balloonText": "[[title]]<br /><b style='font-size: 130%'>[[value]]</b>"
- }],
- "chartCursor": {
- "pan": true,
- "valueLineEnabled": true,
- "valueLineBalloonEnabled": true,
- "cursorAlpha": 0,
- "valueLineAlpha": 0.2
- },
- "categoryField": "date",
- "categoryAxis": {
- "parseDates": true,
- "gridAlpha" : 0,
- "minorGridEnabled": true
- },
- "legend": {
- "position":"top",
- },
- "balloon": {
- "borderThickness": 1,
- "shadowAlpha": 0
- },
- "export": {
- "enabled": true
- },
- "dataProvider": [{
- "date": "2013-01-01",
- "market1": 0,
- "market2": 0,
- "sales1": 0
- }, {
- "date": "2013-02-01",
- "market1": 0,
- "market2": 0,
- "sales1": 40
- }, {
- "date": "2013-03-01",
- "market1": 0,
- "market2": 0,
- "sales1": 0
- }, {
- "date": "2013-04-01",
- "market1": 30,
- "market2": 0,
- "sales1": 0
- }, {
- "date": "2013-05-01",
- "market1": 0,
- "market2": 20,
- "sales1": 0
- }, {
- "date": "2013-06-01",
- "market1": 25,
- "market2": 0,
- "sales1": 0
- }, {
- "date": "2013-07-01",
- "market1": 0,
- "market2": 0,
- "sales1": 0
- }, {
- "date": "2013-08-01",
- "market1": 0,
- "market2": 0,
- "sales1": 30
- }, {
- "date": "2013-09-01",
- "market1": 0,
- "market2": 0,
- "sales1": 0
- }, {
- "date": "2013-10-01",
- "market1": 0,
- "market2": 50,
- "sales1": 0
- }, {
- "date": "2013-11-01",
- "market1": 0,
- "market2": 0,
- "sales1": 65
- }, {
- "date": "2013-12-01",
- "market1": 0,
- "market2": 0,
- "sales1": 0
- }]
- });
- // pageview and prod sale end
-
- // full body chart
- $(function() {
- var ctx = document.getElementById('avg-value').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'line',
- data: valincome('#536dfe', [40, 25, 30, 22, 31,40, 15, 25, 35, 30, 20, 15, 20, 25], '#536dfe'),
- options: valincomebuildoption(),
- });
- var ctx = document.getElementById('avg-income').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'line',
- data: valincome('#11c15b', [30, 15, 25, 35, 30, 20, 15, 20, 25,40, 25, 30, 22, 31], '#11c15b'),
- options: valincomebuildoption(),
- });
- var ctx = document.getElementById('sal-income').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'line',
- data: valincome('#448aff', [30, 15, 25, 35, 30, 20, 15, 20, 25,40, 25, 30, 22, 31], '#448aff'),
- options: valincomebuildoption(),
- });
- var ctx = document.getElementById('rent-income').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'line',
- data: valincome('#11c15b', [40, 25, 30, 22,30, 15, 25, 35, 30, 20, 15, 20, 25, 31], '#11c15b'),
- options: valincomebuildoption(),
- });
- var ctx = document.getElementById('income-analysis').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'line',
- data: valincome('#ff5252', [25, 30,20, 15, 20, 25, 31, 22,30, 15, 25, 35, 30,40], '#ff5252'),
- options: valincomebuildoption(),
- });
- function valincome(a, b, f) {
- if (f == null) {
- f = "rgba(0,0,0,0)";
- }
- return {
- labels: ["1","2","3","4","5","6","7","8","9","10","11","12","13","14"],
- datasets: [{
- label: "",
- borderColor: a,
- borderWidth: 3,
- hitRadius: 30,
- pointRadius: 0,
- pointHoverRadius: 4,
- pointBorderWidth: 2,
- pointHoverBorderWidth: 12,
- pointBackgroundColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
- pointBorderColor: a,
- pointHoverBackgroundColor: a,
- pointHoverBorderColor: Chart.helpers.color("#000000").alpha(.1).rgbString(),
- fill: true,
- cubicInterpolationMode: 'monotone',
- backgroundColor: Chart.helpers.color(f).alpha(.7).rgbString(),
- data: b,
- }]
- };
- }
- function valincomebuildoption() {
- return {
- title: {
- display: false,
- },
- tooltips: {
- intersect: false,
- mode: 'nearest',
- xPadding: 10,
- yPadding: 10,
- caretPadding: 10
- },
- legend: {
- display: false
- },
- hover: {
- mode: 'index'
- },
- scales: {
- xAxes: [{
- display: false,
- gridLines: false,
- scaleLabel: {
- display: true,
- labelString: 'Month'
- }
- }],
- yAxes: [{
- display: false,
- gridLines: false,
- scaleLabel: {
- display: true,
- labelString: 'Value'
- },
- ticks: {
- min: 1,
- max: 50
- }
- }]
- },
- elements: {
- point: {
- radius: 4,
- borderWidth: 12
- }
- },
- layout: {
- padding: {
- left: 0,
- right: 0,
- top: 0,
- bottom: 0
- }
- }
- };
- }
- var ctx = document.getElementById('tot-lead').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'line',
- data: valincomearrow('#536dfe', [30, 15, 25, 35, 30, 20, 15, 20, 25,40, 25, 30, 22, 31], '#536dfe'),
- options: valincomebuildoption(),
- });
- var ctx = document.getElementById('tot-vendor').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'line',
- data: valincomearrow('#11c15b', [40, 25, 30, 22,30, 15, 25, 35, 30, 20, 15, 20, 25, 31], '#11c15b'),
- options: valincomebuildoption(),
- });
- var ctx = document.getElementById('invoice-gen').getContext("2d");
- var myChart = new Chart(ctx, {
- type: 'line',
- data: valincomearrow('#448aff', [25, 30,20, 15, 20, 25, 31, 22,30, 15, 25, 35, 30,40], '#448aff'),
- options: valincomebuildoption(),
- });
- function valincomearrow(a, b, f) {
- if (f == null) {
- f = "rgba(0,0,0,0)";
- }
- return {
- labels: ["1","2","3","4","5","6","7","8","9","10","11","12","13","14"],
- datasets: [{
- label: "",
- borderColor: a,
- borderWidth: 3,
- hitRadius: 30,
- pointRadius: 0,
- pointHoverRadius: 4,
- pointBorderWidth: 2,
- pointHoverBorderWidth: 12,
- pointBackgroundColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
- pointBorderColor: a,
- pointHoverBackgroundColor: a,
- pointHoverBorderColor: Chart.helpers.color("#000000").alpha(.1).rgbString(),
- fill: true,
- lineTension:0,
- backgroundColor: Chart.helpers.color(f).alpha(.7).rgbString(),
- data: b,
- }]
- };
- }
- });
- var ctx = document.getElementById("newuserchart").getContext("2d");
- window.myDoughnut = new Chart(ctx, {
- type: 'doughnut',
- data: {
- datasets: [{
- data: [10,34,5],
- backgroundColor: ["#11c15b","#448aff","#ff5252"],
- label: 'Dataset 1'
- }],
- labels: ["Satisfied", "Unsatisfied", "NA"]
- },
- options: {
- responsive: true,
- legend: {
- position: 'bottom',
- },
- title: {
- display: true,
- text: "",
- },
- animation: {
- animateScale: true,
- animateRotate: true
- }
- }
- });
- });
|