Dashboard sipadu mbip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

custom-widget1.js 83KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806
  1. 'use strict';
  2. $(document).ready(function() {
  3. var chart = AmCharts.makeChart("revenue-map", {
  4. "type": "serial",
  5. "theme": "light",
  6. "dataDateFormat": "YYYY-MM-DD",
  7. "precision": 2,
  8. "valueAxes": [{
  9. "id": "v1",
  10. "title": "Sales",
  11. "position": "left",
  12. "autoGridCount": false,
  13. "labelFunction": function(value) {
  14. return "$" + Math.round(value) + "M";
  15. }
  16. }, {
  17. "id": "v2",
  18. "title": "Revenue Market",
  19. "gridAlpha": 0,
  20. "autoGridCount": false
  21. }],
  22. "graphs": [{
  23. "id": "g1",
  24. "valueAxis": "v2",
  25. "bullet": "round",
  26. "bulletBorderAlpha": 1,
  27. "bulletColor": "#FFFFFF",
  28. "bulletSize": 5,
  29. "hideBulletsCount": 50,
  30. "lineThickness": 2,
  31. "lineColor": "#448aff",
  32. "type": "smoothedLine",
  33. "title": "Market Days",
  34. "useLineColorForBulletBorder": true,
  35. "valueField": "market1",
  36. "balloonText": "[[title]]<br /><b style='font-size: 130%'>[[value]]</b>"
  37. }, {
  38. "id": "g2",
  39. "valueAxis": "v2",
  40. "bullet": "round",
  41. "bulletBorderAlpha": 1,
  42. "bulletColor": "#FFFFFF",
  43. "bulletSize": 5,
  44. "hideBulletsCount": 50,
  45. "lineThickness": 2,
  46. "lineColor": "#536dfe",
  47. "type": "smoothedLine",
  48. "title": "Market Days ALL",
  49. "useLineColorForBulletBorder": true,
  50. "valueField": "market2",
  51. "balloonText": "[[title]]<br /><b style='font-size: 130%'>[[value]]</b>"
  52. }],
  53. "chartCursor": {
  54. "pan": true,
  55. "valueLineEnabled": true,
  56. "valueLineBalloonEnabled": true,
  57. "cursorAlpha": 0,
  58. "valueLineAlpha": 0.2
  59. },
  60. "categoryField": "date",
  61. "categoryAxis": {
  62. "parseDates": true,
  63. "dashLength": 1,
  64. "minorGridEnabled": true
  65. },
  66. "legend": {
  67. "useGraphSettings": true,
  68. "position": "top"
  69. },
  70. "balloon": {
  71. "borderThickness": 1,
  72. "shadowAlpha": 0
  73. },
  74. "export": {
  75. "enabled": true
  76. },
  77. "dataProvider": [{
  78. "date": "2013-01-16",
  79. "market1": 85,
  80. "market2": 75
  81. }, {
  82. "date": "2013-01-17",
  83. "market1": 74,
  84. "market2": 80
  85. }, {
  86. "date": "2013-01-18",
  87. "market1": 78,
  88. "market2": 88
  89. }, {
  90. "date": "2013-01-19",
  91. "market1": 85,
  92. "market2": 75
  93. }, {
  94. "date": "2013-01-20",
  95. "market1": 82,
  96. "market2": 89
  97. }, {
  98. "date": "2013-01-21",
  99. "market1": 83,
  100. "market2": 78
  101. }, {
  102. "date": "2013-01-22",
  103. "market1": 72,
  104. "market2": 92
  105. }, {
  106. "date": "2013-01-23",
  107. "market1": 85,
  108. "market2": 76
  109. }]
  110. });
  111. var chart = AmCharts.makeChart( "sales-analytics", {
  112. "type": "serial",
  113. "theme": "light",
  114. "marginRight": 40,
  115. "marginLeft": 40,
  116. "autoMarginOffset": 20,
  117. "dataDateFormat": "YYYY-MM-DD",
  118. "valueAxes": [ {
  119. "id": "v1",
  120. "axisAlpha": 0,
  121. "position": "left",
  122. "ignoreAxisWidth": true
  123. } ],
  124. "balloon": {
  125. "borderThickness": 1,
  126. "shadowAlpha": 0
  127. },
  128. "graphs": [ {
  129. "id": "g1",
  130. "balloon": {
  131. "drop": true,
  132. "adjustBorderColor": false,
  133. "color": "#ffffff",
  134. "type": "smoothedLine"
  135. },
  136. "fillAlphas": 0.5,
  137. "bullet": "round",
  138. "bulletBorderAlpha": 1,
  139. "bulletColor": "#FFFFFF",
  140. "lineColor": "#11c15b",
  141. "bulletSize": 5,
  142. "hideBulletsCount": 50,
  143. "lineThickness": 3,
  144. "title": "red line",
  145. "useLineColorForBulletBorder": true,
  146. "valueField": "value",
  147. "balloonText": "<span style='font-size:18px;'>[[value]]</span>"
  148. } ],
  149. "chartCursor": {
  150. "valueLineEnabled": true,
  151. "valueLineBalloonEnabled": true,
  152. "cursorAlpha": 0,
  153. "zoomable": false,
  154. "valueZoomable": true,
  155. "valueLineAlpha": 0.5
  156. },
  157. "chartScrollbar": {
  158. "autoGridCount": true,
  159. "graph": "g1",
  160. "oppositeAxis": true,
  161. "scrollbarHeight": 90
  162. },
  163. "categoryField": "date",
  164. "categoryAxis": {
  165. "parseDates": true,
  166. "dashLength": 1,
  167. "minorGridEnabled": true
  168. },
  169. "export": {
  170. "enabled": true
  171. },
  172. "dataProvider": [ {
  173. "date": "2012-07-27",
  174. "value": 13
  175. }, {
  176. "date": "2012-07-28",
  177. "value": 11
  178. }, {
  179. "date": "2012-07-29",
  180. "value": 15
  181. }, {
  182. "date": "2012-07-30",
  183. "value": 16
  184. }, {
  185. "date": "2012-07-31",
  186. "value": 18
  187. }, {
  188. "date": "2012-08-01",
  189. "value": 13
  190. }, {
  191. "date": "2012-08-02",
  192. "value": 22
  193. }, {
  194. "date": "2012-08-03",
  195. "value": 23
  196. }, {
  197. "date": "2012-08-04",
  198. "value": 20
  199. }, {
  200. "date": "2012-08-05",
  201. "value": 17
  202. }, {
  203. "date": "2012-08-06",
  204. "value": 16
  205. }, {
  206. "date": "2012-08-07",
  207. "value": 18
  208. }, {
  209. "date": "2012-08-08",
  210. "value": 21
  211. }, {
  212. "date": "2012-08-09",
  213. "value": 26
  214. }, {
  215. "date": "2012-08-10",
  216. "value": 24
  217. }, {
  218. "date": "2012-08-11",
  219. "value": 29
  220. }, {
  221. "date": "2012-08-12",
  222. "value": 32
  223. }, {
  224. "date": "2012-08-13",
  225. "value": 18
  226. }, {
  227. "date": "2012-08-14",
  228. "value": 24
  229. }, {
  230. "date": "2012-08-15",
  231. "value": 22
  232. }, {
  233. "date": "2012-08-16",
  234. "value": 18
  235. }, {
  236. "date": "2012-08-17",
  237. "value": 19
  238. }, {
  239. "date": "2012-08-18",
  240. "value": 14
  241. }, {
  242. "date": "2012-08-19",
  243. "value": 15
  244. }, {
  245. "date": "2012-08-20",
  246. "value": 12
  247. }, {
  248. "date": "2012-08-21",
  249. "value": 8
  250. }, {
  251. "date": "2012-08-22",
  252. "value": 9
  253. }, {
  254. "date": "2012-08-23",
  255. "value": 8
  256. }, {
  257. "date": "2012-08-24",
  258. "value": 7
  259. }, {
  260. "date": "2012-08-25",
  261. "value": 5
  262. }, {
  263. "date": "2012-08-26",
  264. "value": 11
  265. }, {
  266. "date": "2012-08-27",
  267. "value": 13
  268. }, {
  269. "date": "2012-08-28",
  270. "value": 18
  271. }, {
  272. "date": "2012-08-29",
  273. "value": 20
  274. }, {
  275. "date": "2012-08-30",
  276. "value": 29
  277. }, {
  278. "date": "2012-08-31",
  279. "value": 33
  280. }, {
  281. "date": "2012-09-01",
  282. "value": 42
  283. }, {
  284. "date": "2012-09-02",
  285. "value": 35
  286. }, {
  287. "date": "2012-09-03",
  288. "value": 31
  289. }, {
  290. "date": "2012-09-04",
  291. "value": 47
  292. }, {
  293. "date": "2012-09-05",
  294. "value": 52
  295. }, {
  296. "date": "2012-09-06",
  297. "value": 46
  298. }, {
  299. "date": "2012-09-07",
  300. "value": 41
  301. }, {
  302. "date": "2012-09-08",
  303. "value": 43
  304. }, {
  305. "date": "2012-09-09",
  306. "value": 40
  307. }, {
  308. "date": "2012-09-10",
  309. "value": 39
  310. }, {
  311. "date": "2012-09-11",
  312. "value": 34
  313. }, {
  314. "date": "2012-09-12",
  315. "value": 29
  316. }, {
  317. "date": "2012-09-13",
  318. "value": 34
  319. }, {
  320. "date": "2012-09-14",
  321. "value": 37
  322. }, {
  323. "date": "2012-09-15",
  324. "value": 42
  325. }, {
  326. "date": "2012-09-16",
  327. "value": 49
  328. }, {
  329. "date": "2012-09-17",
  330. "value": 46
  331. }, {
  332. "date": "2012-09-18",
  333. "value": 47
  334. }, {
  335. "date": "2012-09-19",
  336. "value": 55
  337. }, {
  338. "date": "2012-09-20",
  339. "value": 59
  340. }, {
  341. "date": "2012-09-21",
  342. "value": 58
  343. }, {
  344. "date": "2012-09-22",
  345. "value": 57
  346. }, {
  347. "date": "2012-09-23",
  348. "value": 61
  349. }, {
  350. "date": "2012-09-24",
  351. "value": 59
  352. }, {
  353. "date": "2012-09-25",
  354. "value": 67
  355. }, {
  356. "date": "2012-09-26",
  357. "value": 65
  358. }, {
  359. "date": "2012-09-27",
  360. "value": 61
  361. }, {
  362. "date": "2012-09-28",
  363. "value": 66
  364. }, {
  365. "date": "2012-09-29",
  366. "value": 69
  367. }, {
  368. "date": "2012-09-30",
  369. "value": 71
  370. }, {
  371. "date": "2012-10-01",
  372. "value": 67
  373. }, {
  374. "date": "2012-10-02",
  375. "value": 63
  376. }, {
  377. "date": "2012-10-03",
  378. "value": 46
  379. }, {
  380. "date": "2012-10-04",
  381. "value": 32
  382. }, {
  383. "date": "2012-10-05",
  384. "value": 21
  385. }, {
  386. "date": "2012-10-06",
  387. "value": 18
  388. }, {
  389. "date": "2012-10-07",
  390. "value": 21
  391. }, {
  392. "date": "2012-10-08",
  393. "value": 28
  394. }, {
  395. "date": "2012-10-09",
  396. "value": 27
  397. }, {
  398. "date": "2012-10-10",
  399. "value": 36
  400. }, {
  401. "date": "2012-10-11",
  402. "value": 33
  403. }, {
  404. "date": "2012-10-12",
  405. "value": 31
  406. }, {
  407. "date": "2012-10-13",
  408. "value": 30
  409. }, {
  410. "date": "2012-10-14",
  411. "value": 34
  412. }, {
  413. "date": "2012-10-15",
  414. "value": 38
  415. }, {
  416. "date": "2012-10-16",
  417. "value": 37
  418. }, {
  419. "date": "2012-10-17",
  420. "value": 44
  421. }, {
  422. "date": "2012-10-18",
  423. "value": 49
  424. }, {
  425. "date": "2012-10-19",
  426. "value": 53
  427. }, {
  428. "date": "2012-10-20",
  429. "value": 57
  430. }, {
  431. "date": "2012-10-21",
  432. "value": 60
  433. }, {
  434. "date": "2012-10-22",
  435. "value": 61
  436. }, {
  437. "date": "2012-10-23",
  438. "value": 69
  439. }, {
  440. "date": "2012-10-24",
  441. "value": 67
  442. }, {
  443. "date": "2012-10-25",
  444. "value": 72
  445. }, {
  446. "date": "2012-10-26",
  447. "value": 77
  448. }, {
  449. "date": "2012-10-27",
  450. "value": 75
  451. }, {
  452. "date": "2012-10-28",
  453. "value": 70
  454. }, {
  455. "date": "2012-10-29",
  456. "value": 72
  457. }, {
  458. "date": "2012-10-30",
  459. "value": 70
  460. }, {
  461. "date": "2012-10-31",
  462. "value": 72
  463. }, {
  464. "date": "2012-11-01",
  465. "value": 73
  466. }, {
  467. "date": "2012-11-02",
  468. "value": 67
  469. }, {
  470. "date": "2012-11-03",
  471. "value": 68
  472. }, {
  473. "date": "2012-11-04",
  474. "value": 65
  475. }, {
  476. "date": "2012-11-05",
  477. "value": 71
  478. }, {
  479. "date": "2012-11-06",
  480. "value": 75
  481. }, {
  482. "date": "2012-11-07",
  483. "value": 74
  484. }, {
  485. "date": "2012-11-08",
  486. "value": 71
  487. }, {
  488. "date": "2012-11-09",
  489. "value": 76
  490. }, {
  491. "date": "2012-11-10",
  492. "value": 77
  493. }, {
  494. "date": "2012-11-11",
  495. "value": 81
  496. }, {
  497. "date": "2012-11-12",
  498. "value": 83
  499. }, {
  500. "date": "2012-11-13",
  501. "value": 80
  502. }, {
  503. "date": "2012-11-14",
  504. "value": 81
  505. }, {
  506. "date": "2012-11-15",
  507. "value": 87
  508. }, {
  509. "date": "2012-11-16",
  510. "value": 82
  511. }, {
  512. "date": "2012-11-17",
  513. "value": 86
  514. }, {
  515. "date": "2012-11-18",
  516. "value": 80
  517. }, {
  518. "date": "2012-11-19",
  519. "value": 87
  520. }, {
  521. "date": "2012-11-20",
  522. "value": 83
  523. }, {
  524. "date": "2012-11-21",
  525. "value": 85
  526. }, {
  527. "date": "2012-11-22",
  528. "value": 84
  529. }, {
  530. "date": "2012-11-23",
  531. "value": 82
  532. }, {
  533. "date": "2012-11-24",
  534. "value": 73
  535. }, {
  536. "date": "2012-11-25",
  537. "value": 71
  538. }, {
  539. "date": "2012-11-26",
  540. "value": 75
  541. }, {
  542. "date": "2012-11-27",
  543. "value": 79
  544. }, {
  545. "date": "2012-11-28",
  546. "value": 70
  547. }, {
  548. "date": "2012-11-29",
  549. "value": 73
  550. }, {
  551. "date": "2012-11-30",
  552. "value": 61
  553. }, {
  554. "date": "2012-12-01",
  555. "value": 62
  556. }, {
  557. "date": "2012-12-02",
  558. "value": 66
  559. }, {
  560. "date": "2012-12-03",
  561. "value": 65
  562. }, {
  563. "date": "2012-12-04",
  564. "value": 73
  565. }, {
  566. "date": "2012-12-05",
  567. "value": 79
  568. }, {
  569. "date": "2012-12-06",
  570. "value": 78
  571. }, {
  572. "date": "2012-12-07",
  573. "value": 78
  574. }, {
  575. "date": "2012-12-08",
  576. "value": 78
  577. }, {
  578. "date": "2012-12-09",
  579. "value": 74
  580. }, {
  581. "date": "2012-12-10",
  582. "value": 73
  583. }, {
  584. "date": "2012-12-11",
  585. "value": 75
  586. }, {
  587. "date": "2012-12-12",
  588. "value": 70
  589. }, {
  590. "date": "2012-12-13",
  591. "value": 77
  592. }, {
  593. "date": "2012-12-14",
  594. "value": 67
  595. }, {
  596. "date": "2012-12-15",
  597. "value": 62
  598. }, {
  599. "date": "2012-12-16",
  600. "value": 64
  601. }, {
  602. "date": "2012-12-17",
  603. "value": 61
  604. }, {
  605. "date": "2012-12-18",
  606. "value": 59
  607. }, {
  608. "date": "2012-12-19",
  609. "value": 53
  610. }, {
  611. "date": "2012-12-20",
  612. "value": 54
  613. }, {
  614. "date": "2012-12-21",
  615. "value": 56
  616. }, {
  617. "date": "2012-12-22",
  618. "value": 59
  619. }, {
  620. "date": "2012-12-23",
  621. "value": 58
  622. }, {
  623. "date": "2012-12-24",
  624. "value": 55
  625. }, {
  626. "date": "2012-12-25",
  627. "value": 52
  628. }, {
  629. "date": "2012-12-26",
  630. "value": 54
  631. }, {
  632. "date": "2012-12-27",
  633. "value": 50
  634. }, {
  635. "date": "2012-12-28",
  636. "value": 50
  637. }, {
  638. "date": "2012-12-29",
  639. "value": 51
  640. }, {
  641. "date": "2012-12-30",
  642. "value": 52
  643. }, {
  644. "date": "2012-12-31",
  645. "value": 58
  646. }, {
  647. "date": "2013-01-01",
  648. "value": 60
  649. }, {
  650. "date": "2013-01-02",
  651. "value": 67
  652. }, {
  653. "date": "2013-01-03",
  654. "value": 64
  655. }, {
  656. "date": "2013-01-04",
  657. "value": 66
  658. }, {
  659. "date": "2013-01-05",
  660. "value": 60
  661. }, {
  662. "date": "2013-01-06",
  663. "value": 63
  664. }, {
  665. "date": "2013-01-07",
  666. "value": 61
  667. }, {
  668. "date": "2013-01-08",
  669. "value": 60
  670. }, {
  671. "date": "2013-01-09",
  672. "value": 65
  673. }, {
  674. "date": "2013-01-10",
  675. "value": 75
  676. }, {
  677. "date": "2013-01-11",
  678. "value": 77
  679. }, {
  680. "date": "2013-01-12",
  681. "value": 78
  682. }, {
  683. "date": "2013-01-13",
  684. "value": 70
  685. }, {
  686. "date": "2013-01-14",
  687. "value": 70
  688. }, {
  689. "date": "2013-01-15",
  690. "value": 73
  691. }, {
  692. "date": "2013-01-16",
  693. "value": 71
  694. }, {
  695. "date": "2013-01-17",
  696. "value": 74
  697. }, {
  698. "date": "2013-01-18",
  699. "value": 78
  700. }, {
  701. "date": "2013-01-19",
  702. "value": 85
  703. }, {
  704. "date": "2013-01-20",
  705. "value": 82
  706. }, {
  707. "date": "2013-01-21",
  708. "value": 83
  709. }, {
  710. "date": "2013-01-22",
  711. "value": 88
  712. }, {
  713. "date": "2013-01-23",
  714. "value": 85
  715. }, {
  716. "date": "2013-01-24",
  717. "value": 85
  718. }, {
  719. "date": "2013-01-25",
  720. "value": 80
  721. }, {
  722. "date": "2013-01-26",
  723. "value": 87
  724. }, {
  725. "date": "2013-01-27",
  726. "value": 84
  727. }, {
  728. "date": "2013-01-28",
  729. "value": 83
  730. }, {
  731. "date": "2013-01-29",
  732. "value": 84
  733. }, {
  734. "date": "2013-01-30",
  735. "value": 81
  736. } ]
  737. } );
  738. function avgvalchart(a, b, f) {
  739. if (f == null) {
  740. f = "rgba(0,0,0,0)";
  741. }
  742. return {
  743. labels: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October"],
  744. datasets: [{
  745. label: "",
  746. borderColor: a,
  747. borderWidth: 2,
  748. hitRadius: 30,
  749. pointHoverRadius: 4,
  750. pointBorderWidth: 50,
  751. pointHoverBorderWidth: 12,
  752. pointBackgroundColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
  753. pointBorderColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
  754. pointHoverBackgroundColor: a,
  755. pointHoverBorderColor: Chart.helpers.color("#000000").alpha(.1).rgbString(),
  756. fill: true,
  757. backgroundColor: f,
  758. data: b,
  759. }]
  760. };
  761. }
  762. function buildavgchartoption() {
  763. return {
  764. title: {
  765. display: !1
  766. },
  767. tooltips: {
  768. position: 'nearest',
  769. mode: 'index',
  770. intersect: false,
  771. yPadding: 10,
  772. xPadding: 10,
  773. },
  774. legend: {
  775. display: !1,
  776. labels: {
  777. usePointStyle: !1
  778. }
  779. },
  780. responsive: !0,
  781. maintainAspectRatio: !0,
  782. hover: {
  783. mode: "index"
  784. },
  785. scales: {
  786. xAxes: [{
  787. display: !1,
  788. gridLines: !1,
  789. scaleLabel: {
  790. display: !0,
  791. labelString: "Month"
  792. }
  793. }],
  794. yAxes: [{
  795. display: !1,
  796. gridLines: !1,
  797. scaleLabel: {
  798. display: !0,
  799. labelString: "Value"
  800. },
  801. ticks: {
  802. beginAtZero: !0
  803. }
  804. }]
  805. },
  806. elements: {
  807. point: {
  808. radius: 4,
  809. borderWidth: 12
  810. }
  811. },
  812. layout: {
  813. padding: {
  814. left: 0,
  815. right: 0,
  816. top: 120,
  817. bottom: 0
  818. }
  819. }
  820. };
  821. }
  822. var ctx = document.getElementById('this-month').getContext("2d");
  823. var myChart = new Chart(ctx, {
  824. type: 'bar',
  825. data: avgvalchart('#11c15b', [30, 15, 25, 35, 30, 20, 25, 30, 15, 1], '#11c15b'),
  826. options: buildchartoption(),
  827. });
  828. function buildchartoption() {
  829. return {
  830. title: {
  831. display: !1
  832. },
  833. tooltips: {
  834. position: 'nearest',
  835. mode: 'index',
  836. intersect: false,
  837. yPadding: 10,
  838. xPadding: 10,
  839. },
  840. legend: {
  841. display: !1,
  842. labels: {
  843. usePointStyle: !1
  844. }
  845. },
  846. responsive: !0,
  847. maintainAspectRatio: !0,
  848. hover: {
  849. mode: "index"
  850. },
  851. scales: {
  852. xAxes: [{
  853. display: !1,
  854. gridLines: !1,
  855. scaleLabel: {
  856. display: !0,
  857. labelString: "Month"
  858. }
  859. }],
  860. yAxes: [{
  861. display: !1,
  862. gridLines: !1,
  863. scaleLabel: {
  864. display: !0,
  865. labelString: "Value"
  866. },
  867. ticks: {
  868. beginAtZero: !0
  869. }
  870. }]
  871. },
  872. elements: {
  873. point: {
  874. radius: 4,
  875. borderWidth: 12
  876. }
  877. },
  878. layout: {
  879. padding: {
  880. left: 0,
  881. right: 0,
  882. top: 0,
  883. bottom: 0
  884. }
  885. }
  886. };
  887. }
  888. // sale order start
  889. var ctx = document.getElementById('sale-chart1').getContext("2d");
  890. var myChart = new Chart(ctx, {
  891. type: 'line',
  892. data: salechart('#b71c1c', [25, 30, 15, 20, 25, 30, 15, 25, 35, 30, 20, 10, 12, 1], 'transparent'),
  893. options: salebuildoption(),
  894. });
  895. var ctx = document.getElementById('sale-chart2').getContext("2d");
  896. var myChart = new Chart(ctx, {
  897. type: 'line',
  898. data: salechart('#00692c', [30, 15, 25, 35, 30, 20, 25, 30, 15, 20, 25,10, 12, 1], 'transparent'),
  899. options: salebuildoption(),
  900. });
  901. var ctx = document.getElementById('sale-chart3').getContext("2d");
  902. var myChart = new Chart(ctx, {
  903. type: 'line',
  904. data: salechart('#0f4aa5', [15, 20, 25,10, 30, 15, 25, 35, 30, 20, 25, 30, 12, 1], 'transparent'),
  905. options: salebuildoption(),
  906. });
  907. function salechart(a, b, f) {
  908. if (f == null) {
  909. f = "rgba(0,0,0,0)";
  910. }
  911. return {
  912. labels: ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"],
  913. datasets: [{
  914. label: "",
  915. borderColor: a,
  916. borderWidth: 2,
  917. hitRadius: 30,
  918. pointRadius: 3,
  919. pointHoverRadius: 4,
  920. pointBorderWidth: 5,
  921. pointHoverBorderWidth: 12,
  922. pointBackgroundColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
  923. // pointBorderColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
  924. pointBorderColor: a,
  925. pointHoverBackgroundColor: a,
  926. pointHoverBorderColor: Chart.helpers.color("#000000").alpha(.1).rgbString(),
  927. fill: true,
  928. lineTension: 0,
  929. backgroundColor: f,
  930. data: b,
  931. }]
  932. };
  933. }
  934. function salebuildoption() {
  935. return {
  936. title: {
  937. display: !1
  938. },
  939. tooltips: {
  940. position: 'nearest',
  941. mode: 'index',
  942. intersect: false,
  943. yPadding: 10,
  944. xPadding: 10,
  945. },
  946. legend: {
  947. display: !1,
  948. labels: {
  949. usePointStyle: !1
  950. }
  951. },
  952. responsive: !0,
  953. maintainAspectRatio: !0,
  954. hover: {
  955. mode: "index"
  956. },
  957. scales: {
  958. xAxes: [{
  959. display: !1,
  960. gridLines: !1,
  961. scaleLabel: {
  962. display: !0,
  963. labelString: "Month"
  964. }
  965. }],
  966. yAxes: [{
  967. display: !1,
  968. gridLines: !1,
  969. scaleLabel: {
  970. display: !0,
  971. labelString: "Value"
  972. },
  973. ticks: {
  974. beginAtZero: !0
  975. }
  976. }]
  977. },
  978. elements: {
  979. point: {
  980. radius: 4,
  981. borderWidth: 12
  982. }
  983. },
  984. layout: {
  985. padding: {
  986. left: 10,
  987. right: 10,
  988. top: 25,
  989. bottom: 25
  990. }
  991. }
  992. };
  993. }
  994. // sale order end
  995. // monthly expence start
  996. $(function() {
  997. var chart = AmCharts.makeChart("monthly-expence", {
  998. "theme": "light",
  999. "type": "gauge",
  1000. "axes": [{
  1001. "topTextFontSize": 1,
  1002. "topTextYOffset": 0,
  1003. "topTextColor": "#fff",
  1004. "axisColor": "#31d6ea",
  1005. "axisThickness": 0,
  1006. "endValue": 100,
  1007. "gridInside": false,
  1008. "inside": true,
  1009. "radius": "50%",
  1010. "fontSize": 0,
  1011. "valueInterval": 100,
  1012. "tickAlpha": 0,
  1013. "startAngle": -90,
  1014. "endAngle": 90,
  1015. "unit": "%",
  1016. "bandOutlineAlpha": 0,
  1017. "bands": [{
  1018. "color": "#d6d6d6",
  1019. "endValue": 100,
  1020. "innerRadius": "105%",
  1021. "radius": "170%",
  1022. "gradientRatio": [0],
  1023. "startValue": 0
  1024. }, {
  1025. "color": "#11c15b",
  1026. "endValue": 0,
  1027. "innerRadius": "105%",
  1028. "radius": "170%",
  1029. "gradientRatio": [0],
  1030. "startValue": 0
  1031. }]
  1032. }],
  1033. "arrows": [{
  1034. "alpha": 1,
  1035. "innerRadius": "0%",
  1036. "startWidth": 13,
  1037. "nailRadius": 10,
  1038. "nailAlpha": 1,
  1039. "radius": "140%"
  1040. }]
  1041. });
  1042. setInterval(randomValue, 2000);
  1043. // set random value
  1044. function randomValue() {
  1045. var value = Math.round(Math.random() * 100);
  1046. chart.arrows[0].setValue(value);
  1047. chart.axes[0].setTopText(value + " %");
  1048. document.getElementById("exp-val").innerHTML = ("$ " + (value * 10));
  1049. chart.axes[0].bands[1].setEndValue(value);
  1050. }
  1051. });
  1052. // monthly expence end
  1053. // daily visitor start
  1054. var chart = AmCharts.makeChart("daily-visitor", {
  1055. "type": "serial",
  1056. "theme": "light",
  1057. "precision": 2,
  1058. "graphs": [{
  1059. "id": "g1",
  1060. "valueAxis": "v2",
  1061. "bullet": "round",
  1062. "bulletBorderAlpha": 1,
  1063. "bulletColor": "#FFFFFF",
  1064. "bulletSize": 5,
  1065. "hideBulletsCount": 50,
  1066. "lineThickness": 2,
  1067. "lineColor": "#448aff",
  1068. "type": "smoothedLine",
  1069. "title": "Market Days",
  1070. "useLineColorForBulletBorder": true,
  1071. "valueField": "market1",
  1072. "balloonText": "[[title]]<br /><b style='font-size: 130%'>[[value]]</b>"
  1073. }],
  1074. "chartCursor": {
  1075. "pan": true,
  1076. "valueLineEnabled": true,
  1077. "valueLineBalloonEnabled": true,
  1078. "cursorAlpha": 0,
  1079. "valueLineAlpha": 0.2
  1080. },
  1081. "categoryField": "date",
  1082. "categoryAxis": {
  1083. "dashLength": 1,
  1084. "axisAlpha":0,
  1085. "lineAlpha":0,
  1086. "gridAlpha":0,
  1087. "minorGridEnabled": true
  1088. },
  1089. "legend": {
  1090. "enabled": false
  1091. },
  1092. "balloon": {
  1093. "borderThickness": 1,
  1094. "shadowAlpha": 0
  1095. },
  1096. "export": {
  1097. "enabled": true
  1098. },
  1099. "dataProvider": [{
  1100. "date": "1",
  1101. "market1": 85
  1102. }, {
  1103. "date": "2",
  1104. "market1": 74
  1105. }, {
  1106. "date": "3",
  1107. "market1": 78
  1108. }, {
  1109. "date": "4",
  1110. "market1": 85
  1111. }, {
  1112. "date": "5",
  1113. "market1": 82
  1114. }, {
  1115. "date": "6",
  1116. "market1": 83
  1117. }, {
  1118. "date": "7",
  1119. "market1": 72
  1120. }, {
  1121. "date": "8",
  1122. "market1": 85
  1123. }]
  1124. });
  1125. // daily visitor end
  1126. // daily sales start
  1127. var chart = AmCharts.makeChart("daily-sales", {
  1128. "type": "serial",
  1129. "theme": "light",
  1130. "dataProvider": [{
  1131. "country": "USA",
  1132. "visits": 10,
  1133. "color": "#536dfe"
  1134. }, {
  1135. "country": "Russia",
  1136. "visits": 8,
  1137. "color": "#ff5252"
  1138. }, {
  1139. "country": "South Korea",
  1140. "visits": 5,
  1141. "color": "#11c15b"
  1142. }, {
  1143. "country": "Canada",
  1144. "visits": 7,
  1145. "color": "#448aff"
  1146. }],
  1147. "valueAxes": [{
  1148. "axisAlpha": 0,
  1149. "lineAlpha": 0,
  1150. "gridAlpha": 0,
  1151. "position": "left",
  1152. "fontSize": 0
  1153. }],
  1154. "startDuration": 1,
  1155. "graphs": [{
  1156. "balloonText": "<b>[[category]]: [[value]]</b>",
  1157. "fillColorsField": "color",
  1158. "fillAlphas": 0.9,
  1159. "lineAlpha": 0.2,
  1160. "type": "column",
  1161. "valueField": "visits"
  1162. }],
  1163. "chartCursor": {
  1164. "categoryBalloonEnabled": false,
  1165. "cursorAlpha": 0,
  1166. "zoomable": false
  1167. },
  1168. "categoryField": "country",
  1169. "categoryAxis": {
  1170. "gridPosition": "start",
  1171. "axisAlpha": 1,
  1172. "lineAlpha": 0,
  1173. "gridAlpha": 0
  1174. },
  1175. "export": {
  1176. "enabled": true
  1177. }
  1178. });
  1179. // daily sales end
  1180. // storage-space start
  1181. var chart = AmCharts.makeChart("storage-space", {
  1182. "type": "pie",
  1183. "startDuration": 0,
  1184. "theme": "light",
  1185. "labelRadius": 0,
  1186. "pullOutRadius": 0,
  1187. "labelText": "",
  1188. "colorField": "color",
  1189. "legend":{
  1190. "enabled":false,
  1191. },
  1192. "innerRadius": "00%",
  1193. "dataProvider": [{
  1194. "country": "Lithuania",
  1195. "litres": 501.9,
  1196. "color": "#448aff"
  1197. }, {
  1198. "country": "Czech Republic",
  1199. "litres": 301.9,
  1200. "color": "#ffe100"
  1201. }, {
  1202. "country": "Ireland",
  1203. "litres": 201.1,
  1204. "color": "#ff5252"
  1205. }, {
  1206. "country": "india",
  1207. "litres": 220.1,
  1208. "color": "#11c15b"
  1209. }],
  1210. "valueField": "litres",
  1211. "export": {
  1212. "enabled": true
  1213. }
  1214. });
  1215. // storage-space end
  1216. // allocation map start
  1217. var map = AmCharts.makeChart( "allocation-map", {
  1218. "type": "map",
  1219. "theme": "light",
  1220. "colorSteps": 10,
  1221. "dataProvider": {
  1222. "map": "usaLow",
  1223. "areas": [ {
  1224. "id": "US-AL",
  1225. "value": 4447100
  1226. }, {
  1227. "id": "US-AK",
  1228. "value": 626932
  1229. }, {
  1230. "id": "US-AZ",
  1231. "value": 5130632
  1232. }, {
  1233. "id": "US-AR",
  1234. "value": 2673400
  1235. }, {
  1236. "id": "US-CA",
  1237. "value": 33871648
  1238. }, {
  1239. "id": "US-CO",
  1240. "value": 4301261
  1241. }, {
  1242. "id": "US-CT",
  1243. "value": 3405565
  1244. }, {
  1245. "id": "US-DE",
  1246. "value": 783600
  1247. }, {
  1248. "id": "US-FL",
  1249. "value": 15982378
  1250. }, {
  1251. "id": "US-GA",
  1252. "value": 8186453
  1253. }, {
  1254. "id": "US-HI",
  1255. "value": 1211537
  1256. }, {
  1257. "id": "US-ID",
  1258. "value": 1293953
  1259. }, {
  1260. "id": "US-IL",
  1261. "value": 12419293
  1262. }, {
  1263. "id": "US-IN",
  1264. "value": 6080485
  1265. }, {
  1266. "id": "US-IA",
  1267. "value": 2926324
  1268. }, {
  1269. "id": "US-KS",
  1270. "value": 2688418
  1271. }, {
  1272. "id": "US-KY",
  1273. "value": 4041769
  1274. }, {
  1275. "id": "US-LA",
  1276. "value": 4468976
  1277. }, {
  1278. "id": "US-ME",
  1279. "value": 1274923
  1280. }, {
  1281. "id": "US-MD",
  1282. "value": 5296486
  1283. }, {
  1284. "id": "US-MA",
  1285. "value": 6349097
  1286. }, {
  1287. "id": "US-MI",
  1288. "value": 9938444
  1289. }, {
  1290. "id": "US-MN",
  1291. "value": 4919479
  1292. }, {
  1293. "id": "US-MS",
  1294. "value": 2844658
  1295. }, {
  1296. "id": "US-MO",
  1297. "value": 5595211
  1298. }, {
  1299. "id": "US-MT",
  1300. "value": 902195
  1301. }, {
  1302. "id": "US-NE",
  1303. "value": 1711263
  1304. }, {
  1305. "id": "US-NV",
  1306. "value": 1998257
  1307. }, {
  1308. "id": "US-NH",
  1309. "value": 1235786
  1310. }, {
  1311. "id": "US-NJ",
  1312. "value": 8414350
  1313. }, {
  1314. "id": "US-NM",
  1315. "value": 1819046
  1316. }, {
  1317. "id": "US-NY",
  1318. "value": 18976457
  1319. }, {
  1320. "id": "US-NC",
  1321. "value": 8049313
  1322. }, {
  1323. "id": "US-ND",
  1324. "value": 642200
  1325. }, {
  1326. "id": "US-OH",
  1327. "value": 11353140
  1328. }, {
  1329. "id": "US-OK",
  1330. "value": 3450654
  1331. }, {
  1332. "id": "US-OR",
  1333. "value": 3421399
  1334. }, {
  1335. "id": "US-PA",
  1336. "value": 12281054
  1337. }, {
  1338. "id": "US-RI",
  1339. "value": 1048319
  1340. }, {
  1341. "id": "US-SC",
  1342. "value": 4012012
  1343. }, {
  1344. "id": "US-SD",
  1345. "value": 754844
  1346. }, {
  1347. "id": "US-TN",
  1348. "value": 5689283
  1349. }, {
  1350. "id": "US-TX",
  1351. "value": 20851820
  1352. }, {
  1353. "id": "US-UT",
  1354. "value": 2233169
  1355. }, {
  1356. "id": "US-VT",
  1357. "value": 608827
  1358. }, {
  1359. "id": "US-VA",
  1360. "value": 7078515
  1361. }, {
  1362. "id": "US-WA",
  1363. "value": 5894121
  1364. }, {
  1365. "id": "US-WV",
  1366. "value": 1808344
  1367. }, {
  1368. "id": "US-WI",
  1369. "value": 5363675
  1370. }, {
  1371. "id": "US-WY",
  1372. "value": 493782
  1373. } ]
  1374. },
  1375. "areasSettings": {
  1376. "autoZoom": true
  1377. },
  1378. "export": {
  1379. "enabled": true
  1380. }
  1381. } );
  1382. var chart = AmCharts.makeChart("allocation-chart", {
  1383. "type": "pie",
  1384. "startDuration": 0,
  1385. "theme": "light",
  1386. "labelRadius": 0,
  1387. "pullOutRadius": 0,
  1388. "labelText": "",
  1389. "colorField": "color",
  1390. "legend":{
  1391. // "enabled":false,
  1392. },
  1393. "innerRadius": "70%",
  1394. "dataProvider": [{
  1395. "country": "Lithuania",
  1396. "litres": 501.9,
  1397. "color": "#85C5E3"
  1398. }, {
  1399. "country": "Czech Republic",
  1400. "litres": 301.9,
  1401. "color": "#6AA3C4"
  1402. }, {
  1403. "country": "Ireland",
  1404. "litres": 201.1,
  1405. "color": "#6097B9"
  1406. }, {
  1407. "country": "india",
  1408. "litres": 220.1,
  1409. "color": "#4E81A4"
  1410. }],
  1411. "valueField": "litres",
  1412. });
  1413. // allocation map end
  1414. // seo start
  1415. var ctx = document.getElementById('seo-chart1').getContext("2d");
  1416. var myChart = new Chart(ctx, {
  1417. type: 'line',
  1418. data: seochart('#536dfe', [1, 30, 15, 20, 25, 30, 15, 25, 35, 30, 20, 10, 12, 1], '#7c90fe'),
  1419. options: seobuildoption(),
  1420. });
  1421. var ctx = document.getElementById('seo-chart2').getContext("2d");
  1422. var myChart = new Chart(ctx, {
  1423. type: 'bar',
  1424. data: seochart('#11c15b', [1, 30, 15, 20, 25, 30, 15, 25, 35, 30, 20, 10, 12, 1], '#11c15b'),
  1425. options: seobuildoption(),
  1426. });
  1427. var ctx = document.getElementById('seo-chart3').getContext("2d");
  1428. var myChart = new Chart(ctx, {
  1429. type: 'line',
  1430. data: seochart('#448aff', [1, 30, 15, 20, 25, 30, 15, 25, 35, 30, 20, 10, 12, 1], 'transparent'),
  1431. options: seobuildoption(),
  1432. });
  1433. function seochart(a, b, f) {
  1434. if (f == null) {
  1435. f = "rgba(0,0,0,0)";
  1436. }
  1437. return {
  1438. labels: ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"],
  1439. datasets: [{
  1440. label: "",
  1441. borderColor: a,
  1442. borderWidth: 2,
  1443. hitRadius: 30,
  1444. pointRadius: 2,
  1445. pointHoverRadius: 4,
  1446. pointBorderWidth: 5,
  1447. pointHoverBorderWidth: 12,
  1448. pointBackgroundColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
  1449. // pointBorderColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
  1450. pointBorderColor: a,
  1451. pointHoverBackgroundColor: a,
  1452. pointHoverBorderColor: Chart.helpers.color("#000000").alpha(.1).rgbString(),
  1453. fill: true,
  1454. lineTension: 0,
  1455. backgroundColor: f,
  1456. data: b,
  1457. }]
  1458. };
  1459. }
  1460. function seobuildoption() {
  1461. return {
  1462. title: {
  1463. display: !1
  1464. },
  1465. tooltips: {
  1466. position: 'nearest',
  1467. mode: 'index',
  1468. intersect: false,
  1469. yPadding: 10,
  1470. xPadding: 10,
  1471. },
  1472. legend: {
  1473. display: !1,
  1474. labels: {
  1475. usePointStyle: !1
  1476. }
  1477. },
  1478. responsive: !0,
  1479. maintainAspectRatio: !0,
  1480. hover: {
  1481. mode: "index"
  1482. },
  1483. scales: {
  1484. xAxes: [{
  1485. display: !1,
  1486. gridLines: !1,
  1487. scaleLabel: {
  1488. display: !0,
  1489. labelString: "Month"
  1490. }
  1491. }],
  1492. yAxes: [{
  1493. display: !1,
  1494. gridLines: !1,
  1495. scaleLabel: {
  1496. display: !0,
  1497. labelString: "Value"
  1498. },
  1499. ticks: {
  1500. beginAtZero: !0
  1501. }
  1502. }]
  1503. },
  1504. elements: {
  1505. point: {
  1506. radius: 4,
  1507. borderWidth: 12
  1508. }
  1509. },
  1510. layout: {
  1511. padding: {
  1512. left: 30,
  1513. right: 10,
  1514. top: 10,
  1515. bottom: 10
  1516. }
  1517. }
  1518. };
  1519. }
  1520. // seo end
  1521. // seo ecommerce start
  1522. var ctx = document.getElementById('sec-ecommerce-chart-line').getContext("2d");
  1523. var myChart = new Chart(ctx, {
  1524. type: 'line',
  1525. data: seochart('#fff', [1, 30, 15, 20, 25, 30, 15, 25, 35, 30, 20, 10, 12, 1], 'transparent'),
  1526. options: seobuildoption(),
  1527. });
  1528. var ctx = document.getElementById('sec-ecommerce-chart-bar').getContext("2d");
  1529. var myChart = new Chart(ctx, {
  1530. type: 'bar',
  1531. data: seochart('#00692c', [20, 30, 15, 20, 25, 30, 15, 25, 35, 30, 20, 10, 12, 1], '#00692c'),
  1532. options: seobuildoption(),
  1533. });
  1534. function seochart(a, b, f) {
  1535. if (f == null) {
  1536. f = "rgba(0,0,0,0)";
  1537. }
  1538. return {
  1539. labels: ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"],
  1540. datasets: [{
  1541. label: "",
  1542. borderColor: a,
  1543. borderWidth: 2,
  1544. hitRadius: 30,
  1545. pointRadius: 2,
  1546. pointHoverRadius: 4,
  1547. pointBorderWidth: 5,
  1548. pointHoverBorderWidth: 12,
  1549. pointBackgroundColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
  1550. // pointBorderColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
  1551. pointBorderColor: a,
  1552. pointHoverBackgroundColor: a,
  1553. pointHoverBorderColor: Chart.helpers.color("#000000").alpha(.1).rgbString(),
  1554. fill: true,
  1555. lineTension: 0,
  1556. backgroundColor: f,
  1557. data: b,
  1558. }]
  1559. };
  1560. }
  1561. function seobuildoption() {
  1562. return {
  1563. title: {
  1564. display: !1
  1565. },
  1566. tooltips: {
  1567. position: 'nearest',
  1568. mode: 'index',
  1569. intersect: false,
  1570. yPadding: 10,
  1571. xPadding: 10,
  1572. },
  1573. legend: {
  1574. display: !1,
  1575. labels: {
  1576. usePointStyle: !1
  1577. }
  1578. },
  1579. responsive: !0,
  1580. maintainAspectRatio: !0,
  1581. hover: {
  1582. mode: "index"
  1583. },
  1584. scales: {
  1585. xAxes: [{
  1586. display: !1,
  1587. gridLines: !1,
  1588. scaleLabel: {
  1589. display: !0,
  1590. labelString: "Month"
  1591. }
  1592. }],
  1593. yAxes: [{
  1594. display: !1,
  1595. gridLines: !1,
  1596. scaleLabel: {
  1597. display: !0,
  1598. labelString: "Value"
  1599. },
  1600. ticks: {
  1601. beginAtZero: !0
  1602. }
  1603. }]
  1604. },
  1605. elements: {
  1606. point: {
  1607. radius: 4,
  1608. borderWidth: 12
  1609. }
  1610. },
  1611. layout: {
  1612. padding: {
  1613. left: 30,
  1614. right: 10,
  1615. top: 20,
  1616. bottom: 0
  1617. }
  1618. }
  1619. };
  1620. }
  1621. var chart = AmCharts.makeChart( "seo-ecommerce-barchart", {
  1622. "type": "serial",
  1623. "theme": "light",
  1624. "dataProvider": [ {
  1625. "visits": 10
  1626. }, {
  1627. "visits": 15
  1628. }, {
  1629. "visits": 12
  1630. }, {
  1631. "visits": 16
  1632. }, {
  1633. "visits": 8
  1634. }, {
  1635. "visits": 10
  1636. }, {
  1637. "visits": 9
  1638. }, {
  1639. "visits": 6
  1640. }, {
  1641. "visits": 10
  1642. }, {
  1643. "visits": 12
  1644. }, {
  1645. "visits": 10
  1646. }, {
  1647. "visits": 13
  1648. }, {
  1649. "visits": 11
  1650. }, {
  1651. "visits": 16
  1652. }, {
  1653. "visits": 8
  1654. }, {
  1655. "visits": 10
  1656. }, {
  1657. "visits": 9
  1658. }, {
  1659. "visits": 6
  1660. }, {
  1661. "visits": 10
  1662. }, {
  1663. "visits": 6
  1664. }, {
  1665. "visits": 10
  1666. }, {
  1667. "visits": 12
  1668. }, {
  1669. "visits": 10
  1670. }, {
  1671. "visits": 13
  1672. }, {
  1673. "visits": 11
  1674. }, {
  1675. "visits": 16
  1676. }, {
  1677. "visits": 8
  1678. }, {
  1679. "visits": 10
  1680. }, {
  1681. "visits": 9
  1682. }, {
  1683. "visits": 12
  1684. }, {
  1685. "visits": 10
  1686. }, {
  1687. "visits": 13
  1688. }, {
  1689. "visits": 11
  1690. } ],
  1691. "valueAxes": [ {
  1692. "gridAlpha": 0.1,
  1693. "dashLength": 0
  1694. } ],
  1695. "gridAboveGraphs": true,
  1696. "startDuration": 1,
  1697. "graphs": [ {
  1698. "balloonText": "Active User: <b>[[value]]</b>",
  1699. "fillAlphas": 1,
  1700. "lineAlpha": 1,
  1701. "lineColor": "#536dfe",
  1702. "type": "column",
  1703. "valueField": "visits",
  1704. "columnWidth": 0.5
  1705. } ],
  1706. "chartCursor": {
  1707. "categoryBalloonEnabled": false,
  1708. "cursorAlpha": 0,
  1709. "zoomable": false
  1710. },
  1711. "categoryAxis": {
  1712. "gridPosition": "start",
  1713. "gridAlpha": 0,
  1714. "axesAlpha": 0,
  1715. "lineAlpha": 0,
  1716. "fontSize" : 0,
  1717. "tickLength": 0
  1718. },
  1719. "export": {
  1720. "enabled": true
  1721. }
  1722. } );
  1723. // seo ecommerce end
  1724. // sale order start
  1725. var ctx = document.getElementById('seo-anlytics1').getContext("2d");
  1726. var myChart = new Chart(ctx, {
  1727. type: 'line',
  1728. data: salechart('#448aff', [25, 30, 15, 20, 25, 30, 15, 25, 35, 30, 20, 10, 12, 1], 'transparent'),
  1729. options: salebuildoption(),
  1730. });
  1731. var ctx = document.getElementById('seo-anlytics2').getContext("2d");
  1732. var myChart = new Chart(ctx, {
  1733. type: 'line',
  1734. data: salechart('#11c15b', [15, 20, 25,10, 12, 30, 15, 25, 35, 30, 20, 25, 30, 1], 'transparent'),
  1735. options: salebuildoption(),
  1736. });
  1737. var ctx = document.getElementById('seo-anlytics3').getContext("2d");
  1738. var myChart = new Chart(ctx, {
  1739. type: 'line',
  1740. data: salechart('#536dfe', [15, 20, 25,10, 30, 15, 25, 35, 30, 20, 25, 30, 12, 1], 'transparent'),
  1741. options: salebuildoption(),
  1742. });
  1743. var ctx = document.getElementById('seo-anlytics4').getContext("2d");
  1744. var myChart = new Chart(ctx, {
  1745. type: 'line',
  1746. data: salechart('#ff5252', [30, 15, 25, 35, 30, 20, 15, 20, 25,10, 25, 30, 12, 1], 'transparent'),
  1747. options: salebuildoption(),
  1748. });
  1749. function salechart(a, b, f) {
  1750. if (f == null) {
  1751. f = "rgba(0,0,0,0)";
  1752. }
  1753. return {
  1754. labels: ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"],
  1755. datasets: [{
  1756. label: "",
  1757. borderColor: a,
  1758. borderWidth: 2,
  1759. hitRadius: 30,
  1760. pointRadius: 0,
  1761. pointHoverRadius: 4,
  1762. pointBorderWidth: 2,
  1763. pointHoverBorderWidth: 12,
  1764. pointBackgroundColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
  1765. // pointBorderColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
  1766. pointBorderColor: a,
  1767. pointHoverBackgroundColor: a,
  1768. pointHoverBorderColor: Chart.helpers.color("#000000").alpha(.1).rgbString(),
  1769. fill: true,
  1770. lineTension: 0,
  1771. backgroundColor: f,
  1772. data: b,
  1773. }]
  1774. };
  1775. }
  1776. function salebuildoption() {
  1777. return {
  1778. title: {
  1779. display: !1
  1780. },
  1781. tooltips: {
  1782. position: 'nearest',
  1783. mode: 'index',
  1784. intersect: false,
  1785. yPadding: 10,
  1786. xPadding: 10,
  1787. },
  1788. legend: {
  1789. display: !1,
  1790. labels: {
  1791. usePointStyle: !1
  1792. }
  1793. },
  1794. responsive: !0,
  1795. maintainAspectRatio: !0,
  1796. hover: {
  1797. mode: "index"
  1798. },
  1799. scales: {
  1800. xAxes: [{
  1801. display: !1,
  1802. gridLines: !1,
  1803. scaleLabel: {
  1804. display: !0,
  1805. labelString: "Month"
  1806. }
  1807. }],
  1808. yAxes: [{
  1809. display: !1,
  1810. gridLines: !1,
  1811. scaleLabel: {
  1812. display: !0,
  1813. labelString: "Value"
  1814. },
  1815. ticks: {
  1816. beginAtZero: !0
  1817. }
  1818. }]
  1819. },
  1820. elements: {
  1821. point: {
  1822. radius: 4,
  1823. borderWidth: 12
  1824. }
  1825. },
  1826. layout: {
  1827. padding: {
  1828. left: 10,
  1829. right: 10,
  1830. top: 25,
  1831. bottom: 25
  1832. }
  1833. }
  1834. };
  1835. }
  1836. // sale order end
  1837. // sale report start
  1838. var ctx = document.getElementById('sale-report-1').getContext("2d");
  1839. var myChart = new Chart(ctx, {
  1840. type: 'bar',
  1841. data: salereportchart('#448aff', [25, 30, 15, 20, 25, 30, 15, 1], '#448aff'),
  1842. options: salereportbuildoption(),
  1843. });
  1844. var ctx = document.getElementById('sale-report-2').getContext("2d");
  1845. var myChart = new Chart(ctx, {
  1846. type: 'bar',
  1847. data: salereportchart('#11c15b', [15, 20, 25,10, 12, 30, 15, 1], '#11c15b'),
  1848. options: salereportbuildoption(),
  1849. });
  1850. var ctx = document.getElementById('sale-report-3').getContext("2d");
  1851. var myChart = new Chart(ctx, {
  1852. type: 'bar',
  1853. data: salereportchart('#536dfe', [15, 20, 25,10, 30, 15, 25, 1], '#536dfe'),
  1854. options: salereportbuildoption(),
  1855. });
  1856. var ctx = document.getElementById('sale-report-4').getContext("2d");
  1857. var myChart = new Chart(ctx, {
  1858. type: 'bar',
  1859. data: salereportchart('#ff5252', [30, 15, 25, 35, 30, 20, 15, 1], '#ff5252'),
  1860. options: salereportbuildoption(),
  1861. });
  1862. function salereportchart(a, b, f) {
  1863. if (f == null) {
  1864. f = "rgba(0,0,0,0)";
  1865. }
  1866. return {
  1867. labels: ["1","2","3","4","5","6","7","8"],
  1868. datasets: [{
  1869. label: "",
  1870. borderColor: a,
  1871. borderWidth: 2,
  1872. hitRadius: 30,
  1873. pointRadius: 0,
  1874. pointHoverRadius: 4,
  1875. pointBorderWidth: 2,
  1876. pointHoverBorderWidth: 12,
  1877. pointBackgroundColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
  1878. // pointBorderColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
  1879. pointBorderColor: a,
  1880. pointHoverBackgroundColor: a,
  1881. pointHoverBorderColor: Chart.helpers.color("#000000").alpha(.1).rgbString(),
  1882. fill: true,
  1883. lineTension: 0,
  1884. backgroundColor: f,
  1885. data: b,
  1886. }]
  1887. };
  1888. }
  1889. function salereportbuildoption() {
  1890. return {
  1891. title: {
  1892. display: !1
  1893. },
  1894. tooltips: {
  1895. position: 'nearest',
  1896. mode: 'index',
  1897. intersect: false,
  1898. yPadding: 10,
  1899. xPadding: 10,
  1900. },
  1901. legend: {
  1902. display: !1,
  1903. labels: {
  1904. usePointStyle: !1
  1905. }
  1906. },
  1907. responsive: !0,
  1908. maintainAspectRatio: !0,
  1909. hover: {
  1910. mode: "index"
  1911. },
  1912. scales: {
  1913. xAxes: [{
  1914. display: !1,
  1915. gridLines: !1,
  1916. scaleLabel: {
  1917. display: !0,
  1918. labelString: "Month"
  1919. }
  1920. }],
  1921. yAxes: [{
  1922. display: !1,
  1923. gridLines: !1,
  1924. scaleLabel: {
  1925. display: !0,
  1926. labelString: "Value"
  1927. },
  1928. ticks: {
  1929. beginAtZero: !0
  1930. }
  1931. }]
  1932. },
  1933. elements: {
  1934. point: {
  1935. radius: 4,
  1936. borderWidth: 12
  1937. }
  1938. },
  1939. layout: {
  1940. padding: {
  1941. left: 10,
  1942. right: 10,
  1943. top: 10,
  1944. bottom: 10
  1945. }
  1946. }
  1947. };
  1948. }
  1949. // sale report end
  1950. // realtime start
  1951. $(function() {
  1952. var day = 0;
  1953. var firstDate = new Date();
  1954. firstDate.setDate(firstDate.getDate() - 500);
  1955. function generateChartData() {
  1956. var chartData = [];
  1957. for (day = 0; day < 30; day++) {
  1958. var newDate = new Date(firstDate);
  1959. newDate.setDate(newDate.getDate() + day);
  1960. var visits = Math.round(Math.random() * 40) - 20;
  1961. chartData.push({
  1962. "date": newDate,
  1963. "visits": visits
  1964. });
  1965. }
  1966. return chartData;
  1967. }
  1968. var chart = AmCharts.makeChart("realtime-chart", {
  1969. "type": "serial",
  1970. "theme": "light",
  1971. "zoomOutButton": {
  1972. "backgroundColor": '#000000',
  1973. "backgroundAlpha": 0.15
  1974. },
  1975. "dataProvider": generateChartData(),
  1976. "categoryField": "date",
  1977. "categoryAxis": {
  1978. "parseDates": true,
  1979. "minPeriod": "DD",
  1980. "dashLength": 1,
  1981. "gridAlpha": 0.15,
  1982. "axisColor": "#DADADA"
  1983. },
  1984. "graphs": [{
  1985. "id": "g1",
  1986. "valueField": "visits",
  1987. "bullet": "round",
  1988. "bulletBorderColor": "#FFFFFF",
  1989. "bulletBorderThickness": 2,
  1990. "lineThickness": 2,
  1991. "lineColor": "#448aff",
  1992. "negativeLineColor": "#ff5252",
  1993. "hideBulletsCount": 50
  1994. }],
  1995. "chartCursor": {
  1996. "cursorPosition": "mouse"
  1997. }
  1998. })
  1999. setInterval(function () {
  2000. chart.dataProvider.shift();
  2001. day++;
  2002. var newDate = new Date(firstDate);
  2003. newDate.setDate(newDate.getDate() + day);
  2004. var visits = Math.round(Math.random() * 40) - 20;
  2005. chart.dataProvider.push({
  2006. date: newDate,
  2007. visits: visits
  2008. });
  2009. chart.validateData();
  2010. }, 1000);
  2011. });
  2012. $(function() {
  2013. var chart = AmCharts.makeChart("sales-prediction-chart", {
  2014. "theme": "light",
  2015. "type": "gauge",
  2016. "axes": [{
  2017. "topTextFontSize": 0,
  2018. "topTextYOffset": 0,
  2019. "topTextColor": "#fff",
  2020. "axisColor": "#31d6ea",
  2021. "axisThickness": 0,
  2022. "endValue": 100,
  2023. "gridInside": false,
  2024. "inside": true,
  2025. "radius": "50%",
  2026. "fontSize": 0.,
  2027. "valueInterval": 100,
  2028. "tickAlpha": 0,
  2029. "startAngle": -140,
  2030. "endAngle": 140,
  2031. "unit": "%",
  2032. "bandOutlineAlpha": 0,
  2033. "bands": [{
  2034. "color": "#ff9797",
  2035. "endValue": 100,
  2036. "innerRadius": "105%",
  2037. "radius": "170%",
  2038. "gradientRatio": [0],
  2039. "startValue": 0
  2040. }, {
  2041. "color": "#ff5252",
  2042. "endValue": 0,
  2043. "innerRadius": "105%",
  2044. "radius": "170%",
  2045. "gradientRatio": [0],
  2046. "startValue": 0
  2047. }]
  2048. }],
  2049. "arrows": [{
  2050. "alpha": 1,
  2051. "innerRadius": "0%",
  2052. "startWidth": 10,
  2053. "nailRadius": 8,
  2054. "nailAlpha": 1,
  2055. "radius": "140%"
  2056. }]
  2057. });
  2058. setInterval(randomValue, 2000);
  2059. // set random value
  2060. function randomValue() {
  2061. var value = Math.round(Math.random() * 100);
  2062. chart.arrows[0].setValue(value);
  2063. chart.axes[0].setTopText(value + " %");
  2064. chart.axes[0].bands[1].setEndValue(value);
  2065. }
  2066. });
  2067. $(function() {
  2068. var chart = AmCharts.makeChart("emails-sentsales-chart", {
  2069. "theme": "light",
  2070. "type": "gauge",
  2071. "axes": [{
  2072. "topTextFontSize": 0,
  2073. "topTextYOffset": 0,
  2074. "topTextColor": "#fff",
  2075. "axisColor": "#31d6ea",
  2076. "axisThickness": 0,
  2077. "endValue": 100,
  2078. "gridInside": false,
  2079. "inside": true,
  2080. "radius": "50%",
  2081. "fontSize": 0.,
  2082. "valueInterval": 100,
  2083. "tickAlpha": 0,
  2084. "startAngle": 0,
  2085. "endAngle": 360,
  2086. "unit": "%",
  2087. "bandOutlineAlpha": 0,
  2088. "bands": [{
  2089. "color": "#448aff",
  2090. "endValue": 100,
  2091. "innerRadius": "105%",
  2092. "radius": "170%",
  2093. "gradientRatio": [0],
  2094. "startValue": 0
  2095. }, {
  2096. "color": "#ff5252",
  2097. "endValue": 0,
  2098. "innerRadius": "105%",
  2099. "radius": "170%",
  2100. "gradientRatio": [0],
  2101. "startValue": 0
  2102. }]
  2103. }],
  2104. "arrows": [{
  2105. "alpha": 0,
  2106. "innerRadius": "100%",
  2107. "borderAlpha": 0,
  2108. "nailAlpha": 0,
  2109. }]
  2110. });
  2111. setInterval(randomValue, 2000);
  2112. // set random value
  2113. function randomValue() {
  2114. var value = Math.round(Math.random() * 100);
  2115. document.getElementById("opened").innerHTML = ((value * 10)+ " opened");
  2116. document.getElementById("unopened").innerHTML = ((1000 - (value * 10)) + " unopened");
  2117. chart.axes[0].bands[1].setEndValue(value);
  2118. }
  2119. });
  2120. // realtime end
  2121. // project and visite start
  2122. var chart = AmCharts.makeChart( "proj-earning", {
  2123. "type": "serial",
  2124. "theme": "light",
  2125. "dataProvider": [ {
  2126. "type":"UI",
  2127. "visits": 10
  2128. }, {
  2129. "type":"UX",
  2130. "visits": 15
  2131. }, {
  2132. "type":"Web",
  2133. "visits": 12
  2134. }, {
  2135. "type":"App",
  2136. "visits": 16
  2137. }, {
  2138. "type":"SEO",
  2139. "visits": 8
  2140. } ],
  2141. "valueAxes": [ {
  2142. "gridAlpha": 0.3,
  2143. "gridColor": "#fff",
  2144. "axisColor": "transparent",
  2145. "color": '#fff',
  2146. "dashLength": 0
  2147. } ],
  2148. "gridAboveGraphs": true,
  2149. "startDuration": 1,
  2150. "graphs": [ {
  2151. "balloonText": "Active User: <b>[[value]]</b>",
  2152. "fillAlphas": 1,
  2153. "lineAlpha": 1,
  2154. "lineColor": "#fff",
  2155. "type": "column",
  2156. "valueField": "visits",
  2157. "columnWidth": 0.5
  2158. } ],
  2159. "chartCursor": {
  2160. "categoryBalloonEnabled": false,
  2161. "cursorAlpha": 0,
  2162. "zoomable": false
  2163. },
  2164. "categoryField": "type",
  2165. "categoryAxis": {
  2166. "gridPosition": "start",
  2167. "gridAlpha": 0,
  2168. "axesAlpha": 0,
  2169. "lineAlpha": 0,
  2170. "fontSize" : 12,
  2171. "color": '#fff',
  2172. "tickLength": 0
  2173. },
  2174. "export": {
  2175. "enabled": false
  2176. }
  2177. } );
  2178. $(function() {
  2179. var day = 0;
  2180. var firstDate = new Date();
  2181. firstDate.setDate(firstDate.getDate() - 500);
  2182. function generateChartData() {
  2183. var chartData = [];
  2184. for (day = 0; day < 10; day++) {
  2185. var newDate = new Date(firstDate);
  2186. newDate.setDate(newDate.getDate() + day);
  2187. var visits1 = Math.round(Math.random() * 10);
  2188. var visits2 = Math.round(Math.random() * 10);
  2189. var visits3 = Math.round(Math.random() * 10);
  2190. chartData.push({
  2191. "date": newDate,
  2192. "visits1": visits1,
  2193. "visits2": visits2,
  2194. "visits3": visits3
  2195. });
  2196. }
  2197. return chartData;
  2198. }
  2199. var chart = AmCharts.makeChart("realtime-visit-chart", {
  2200. "type": "serial",
  2201. "theme": "light",
  2202. "zoomOutButton": {
  2203. "backgroundColor": '#000000',
  2204. "backgroundAlpha": 0.15
  2205. },
  2206. "dataProvider": generateChartData(),
  2207. "categoryField": "date",
  2208. "categoryAxis": {
  2209. "parseDates": true,
  2210. "minPeriod": "DD",
  2211. "dashLength": 1,
  2212. "gridAlpha": 0.15,
  2213. "axisColor": "#DADADA"
  2214. },
  2215. "graphs": [{
  2216. "id": "g1",
  2217. "valueField": "visits1",
  2218. "bullet": "round",
  2219. "bulletBorderColor": "#FFFFFF",
  2220. "bulletBorderThickness": 0,
  2221. "lineThickness": 3,
  2222. "bulletAlpha":0,
  2223. "type": "smoothedLine",
  2224. "lineColor": "#448aff",
  2225. "hideBulletsCount": 10
  2226. },{
  2227. "id": "g2",
  2228. "valueField": "visits2",
  2229. "bullet": "round",
  2230. "type": "smoothedLine",
  2231. "bulletBorderColor": "#FFFFFF",
  2232. "bulletBorderThickness": 2,
  2233. "lineThickness": 3,
  2234. "bulletAlpha":0,
  2235. "lineColor": "#ff5252",
  2236. "hideBulletsCount": 50
  2237. },{
  2238. "id": "g3",
  2239. "valueField": "visits3",
  2240. "bullet": "round",
  2241. "type": "smoothedLine",
  2242. "bulletBorderColor": "#FFFFFF",
  2243. "bulletBorderThickness": 0,
  2244. "lineThickness": 3,
  2245. "bulletAlpha":0,
  2246. "lineColor": "#11c15b",
  2247. "hideBulletsCount": 0
  2248. }],
  2249. "chartCursor": {
  2250. "cursorPosition": "mouse"
  2251. }
  2252. })
  2253. setInterval(function () {
  2254. chart.dataProvider.shift();
  2255. day++;
  2256. var newDate = new Date(firstDate);
  2257. newDate.setDate(newDate.getDate() + day);
  2258. var visits1 = Math.round(Math.random() * 10);
  2259. var visits2 = Math.round(Math.random() * 10);
  2260. var visits3 = Math.round(Math.random() * 10);
  2261. chart.dataProvider.push({
  2262. date: newDate,
  2263. visits1: visits1,
  2264. visits2: visits2,
  2265. visits3: visits3
  2266. });
  2267. chart.validateData();
  2268. }, 1000);
  2269. });
  2270. // project and visite end
  2271. // pageview and prod sale start
  2272. var ctx = document.getElementById('page-view').getContext("2d");
  2273. var myChart = new Chart(ctx, {
  2274. type: 'line',
  2275. data: pageviewchart('#ff5252', [1, 30, 15, 20, 25, 30, 15, 25, 35, 30, 20, 10, 12, 1], 'transparent'),
  2276. options: pageviewbuildoption(),
  2277. });
  2278. function pageviewchart(a, b, f) {
  2279. if (f == null) {
  2280. f = "rgba(0,0,0,0)";
  2281. }
  2282. return {
  2283. labels: ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"],
  2284. datasets: [{
  2285. label: "",
  2286. borderColor: a,
  2287. borderWidth: 2,
  2288. hitRadius: 30,
  2289. pointRadius: 2,
  2290. pointColor: Chart.helpers.color("#ffffff").alpha(1).rgbString(),
  2291. pointHoverRadius: 4,
  2292. pointBorderWidth: 5,
  2293. pointHoverBorderWidth: 12,
  2294. pointBackgroundColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
  2295. // pointBorderColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
  2296. pointBorderColor: a,
  2297. pointHoverBackgroundColor: a,
  2298. pointHoverBorderColor: Chart.helpers.color("#000000").alpha(.1).rgbString(),
  2299. fill: true,
  2300. lineTension: 0,
  2301. backgroundColor: f,
  2302. data: b,
  2303. }]
  2304. };
  2305. }
  2306. function pageviewbuildoption() {
  2307. return {
  2308. title: {
  2309. display: !1
  2310. },
  2311. tooltips: {
  2312. position: 'nearest',
  2313. mode: 'index',
  2314. intersect: false,
  2315. yPadding: 10,
  2316. xPadding: 10,
  2317. },
  2318. legend: {
  2319. display: !1,
  2320. labels: {
  2321. usePointStyle: !1
  2322. }
  2323. },
  2324. responsive: !0,
  2325. maintainAspectRatio: !0,
  2326. hover: {
  2327. mode: "index"
  2328. },
  2329. scales: {
  2330. xAxes: [{
  2331. display: !1,
  2332. gridLines: !1,
  2333. scaleLabel: {
  2334. display: !0,
  2335. labelString: "Month"
  2336. }
  2337. }],
  2338. yAxes: [{
  2339. display: !1,
  2340. gridLines: !1,
  2341. scaleLabel: {
  2342. display: !0,
  2343. labelString: "Value"
  2344. },
  2345. ticks: {
  2346. beginAtZero: !0
  2347. }
  2348. }]
  2349. },
  2350. elements: {
  2351. point: {
  2352. radius: 4,
  2353. borderWidth: 12
  2354. }
  2355. },
  2356. layout: {
  2357. padding: {
  2358. left: 10,
  2359. right: 10,
  2360. top: 20,
  2361. bottom: 20
  2362. }
  2363. }
  2364. };
  2365. }
  2366. var ctx = document.getElementById('bounce-rate').getContext("2d");
  2367. var myChart = new Chart(ctx, {
  2368. type: 'line',
  2369. data: {
  2370. labels: ["1","2","3","4","5","6"],
  2371. datasets: [{
  2372. label: "",
  2373. borderColor: Chart.helpers.color('#448aff').alpha(1).rgbString(),
  2374. borderWidth: 2,
  2375. hitRadius: 30,
  2376. pointRadius: 0,
  2377. pointColor: Chart.helpers.color("#ffffff").alpha(1).rgbString(),
  2378. pointHoverRadius: 4,
  2379. pointBorderWidth: 5,
  2380. pointHoverBorderWidth: 12,
  2381. pointBackgroundColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
  2382. pointBorderColor: '#448aff',
  2383. pointHoverBackgroundColor: '#448aff',
  2384. pointHoverBorderColor: Chart.helpers.color("#000000").alpha(.1).rgbString(),
  2385. fill: true,
  2386. cubicInterpolationMode: 'monotone',
  2387. backgroundColor: Chart.helpers.color('#448aff').alpha(.2).rgbString(),
  2388. data: [1, 30, 10, 25, 5, 30],
  2389. }]
  2390. },
  2391. options: bounceratebuildoption(),
  2392. });
  2393. function bounceratebuildoption() {
  2394. return {
  2395. title: {
  2396. display: !1
  2397. },
  2398. tooltips: {
  2399. intersect: false,
  2400. mode: 'nearest',
  2401. xPadding: 10,
  2402. yPadding: 10,
  2403. caretPadding: 10
  2404. },
  2405. legend: {
  2406. display: !1,
  2407. labels: {
  2408. usePointStyle: !1
  2409. }
  2410. },
  2411. responsive: !0,
  2412. maintainAspectRatio: !0,
  2413. hover: {
  2414. mode: "index"
  2415. },
  2416. scales: {
  2417. xAxes: [{
  2418. display: !1,
  2419. gridLines: !1,
  2420. scaleLabel: {
  2421. display: !0,
  2422. labelString: "Month"
  2423. }
  2424. }],
  2425. yAxes: [{
  2426. display: !1,
  2427. gridLines: !1,
  2428. scaleLabel: {
  2429. display: !0,
  2430. labelString: "Value"
  2431. },
  2432. ticks: {
  2433. beginAtZero: !0
  2434. }
  2435. }]
  2436. },
  2437. elements: {
  2438. point: {
  2439. radius: 4,
  2440. borderWidth: 12
  2441. }
  2442. },
  2443. layout: {
  2444. padding: {
  2445. left: 0,
  2446. right: 0,
  2447. top: 20,
  2448. bottom: 0
  2449. }
  2450. }
  2451. };
  2452. }
  2453. var chart = AmCharts.makeChart("product-sales-chart", {
  2454. "type": "serial",
  2455. "theme": "light",
  2456. "dataDateFormat": "YYYY-MM-DD",
  2457. "precision": 2,
  2458. "valueAxes": [{
  2459. "id": "v1",
  2460. "title": "Sales",
  2461. "position": "left",
  2462. "autoGridCount": false,
  2463. "labelFunction": function(value) {
  2464. return "$" + Math.round(value) + "M";
  2465. }
  2466. }, {
  2467. "id": "v2",
  2468. "gridAlpha": 0.1,
  2469. "autoGridCount": false
  2470. }],
  2471. "graphs": [{
  2472. "id": "g1",
  2473. "valueAxis": "v2",
  2474. "lineThickness": 0,
  2475. "fillAlphas": 0.9,
  2476. "lineColor": "#448aff",
  2477. "type": "smoothedLine",
  2478. "title": "Laptop",
  2479. "useLineColorForBulletBorder": true,
  2480. "valueField": "market1",
  2481. "balloonText": "[[title]]<br /><b style='font-size: 130%'>[[value]]</b>"
  2482. }, {
  2483. "id": "g2",
  2484. "valueAxis": "v2",
  2485. "fillAlphas": 0.9,
  2486. "bulletColor": "#ff5252",
  2487. "lineThickness": 0,
  2488. "lineColor": "#ff5252",
  2489. "type": "smoothedLine",
  2490. "title": "TV",
  2491. "useLineColorForBulletBorder": true,
  2492. "valueField": "market2",
  2493. "balloonText": "[[title]]<br /><b style='font-size: 130%'>[[value]]</b>"
  2494. }, {
  2495. "id": "g3",
  2496. "valueAxis": "v2",
  2497. "fillAlphas": 0.9,
  2498. "bulletColor": "#11c15b",
  2499. "lineThickness": 0,
  2500. "lineColor": "#11c15b",
  2501. "type": "smoothedLine",
  2502. "title": "Mobile",
  2503. "useLineColorForBulletBorder": true,
  2504. "valueField": "sales1",
  2505. "balloonText": "[[title]]<br /><b style='font-size: 130%'>[[value]]</b>"
  2506. }],
  2507. "chartCursor": {
  2508. "pan": true,
  2509. "valueLineEnabled": true,
  2510. "valueLineBalloonEnabled": true,
  2511. "cursorAlpha": 0,
  2512. "valueLineAlpha": 0.2
  2513. },
  2514. "categoryField": "date",
  2515. "categoryAxis": {
  2516. "parseDates": true,
  2517. "gridAlpha" : 0,
  2518. "minorGridEnabled": true
  2519. },
  2520. "legend": {
  2521. "position":"top",
  2522. },
  2523. "balloon": {
  2524. "borderThickness": 1,
  2525. "shadowAlpha": 0
  2526. },
  2527. "export": {
  2528. "enabled": true
  2529. },
  2530. "dataProvider": [{
  2531. "date": "2013-01-01",
  2532. "market1": 0,
  2533. "market2": 0,
  2534. "sales1": 0
  2535. }, {
  2536. "date": "2013-02-01",
  2537. "market1": 0,
  2538. "market2": 0,
  2539. "sales1": 40
  2540. }, {
  2541. "date": "2013-03-01",
  2542. "market1": 0,
  2543. "market2": 0,
  2544. "sales1": 0
  2545. }, {
  2546. "date": "2013-04-01",
  2547. "market1": 30,
  2548. "market2": 0,
  2549. "sales1": 0
  2550. }, {
  2551. "date": "2013-05-01",
  2552. "market1": 0,
  2553. "market2": 20,
  2554. "sales1": 0
  2555. }, {
  2556. "date": "2013-06-01",
  2557. "market1": 25,
  2558. "market2": 0,
  2559. "sales1": 0
  2560. }, {
  2561. "date": "2013-07-01",
  2562. "market1": 0,
  2563. "market2": 0,
  2564. "sales1": 0
  2565. }, {
  2566. "date": "2013-08-01",
  2567. "market1": 0,
  2568. "market2": 0,
  2569. "sales1": 30
  2570. }, {
  2571. "date": "2013-09-01",
  2572. "market1": 0,
  2573. "market2": 0,
  2574. "sales1": 0
  2575. }, {
  2576. "date": "2013-10-01",
  2577. "market1": 0,
  2578. "market2": 50,
  2579. "sales1": 0
  2580. }, {
  2581. "date": "2013-11-01",
  2582. "market1": 0,
  2583. "market2": 0,
  2584. "sales1": 65
  2585. }, {
  2586. "date": "2013-12-01",
  2587. "market1": 0,
  2588. "market2": 0,
  2589. "sales1": 0
  2590. }]
  2591. });
  2592. // pageview and prod sale end
  2593. // full body chart
  2594. $(function() {
  2595. var ctx = document.getElementById('avg-value').getContext("2d");
  2596. var myChart = new Chart(ctx, {
  2597. type: 'line',
  2598. data: valincome('#536dfe', [40, 25, 30, 22, 31,40, 15, 25, 35, 30, 20, 15, 20, 25], '#536dfe'),
  2599. options: valincomebuildoption(),
  2600. });
  2601. var ctx = document.getElementById('avg-income').getContext("2d");
  2602. var myChart = new Chart(ctx, {
  2603. type: 'line',
  2604. data: valincome('#11c15b', [30, 15, 25, 35, 30, 20, 15, 20, 25,40, 25, 30, 22, 31], '#11c15b'),
  2605. options: valincomebuildoption(),
  2606. });
  2607. var ctx = document.getElementById('sal-income').getContext("2d");
  2608. var myChart = new Chart(ctx, {
  2609. type: 'line',
  2610. data: valincome('#448aff', [30, 15, 25, 35, 30, 20, 15, 20, 25,40, 25, 30, 22, 31], '#448aff'),
  2611. options: valincomebuildoption(),
  2612. });
  2613. var ctx = document.getElementById('rent-income').getContext("2d");
  2614. var myChart = new Chart(ctx, {
  2615. type: 'line',
  2616. data: valincome('#11c15b', [40, 25, 30, 22,30, 15, 25, 35, 30, 20, 15, 20, 25, 31], '#11c15b'),
  2617. options: valincomebuildoption(),
  2618. });
  2619. var ctx = document.getElementById('income-analysis').getContext("2d");
  2620. var myChart = new Chart(ctx, {
  2621. type: 'line',
  2622. data: valincome('#ff5252', [25, 30,20, 15, 20, 25, 31, 22,30, 15, 25, 35, 30,40], '#ff5252'),
  2623. options: valincomebuildoption(),
  2624. });
  2625. function valincome(a, b, f) {
  2626. if (f == null) {
  2627. f = "rgba(0,0,0,0)";
  2628. }
  2629. return {
  2630. labels: ["1","2","3","4","5","6","7","8","9","10","11","12","13","14"],
  2631. datasets: [{
  2632. label: "",
  2633. borderColor: a,
  2634. borderWidth: 3,
  2635. hitRadius: 30,
  2636. pointRadius: 0,
  2637. pointHoverRadius: 4,
  2638. pointBorderWidth: 2,
  2639. pointHoverBorderWidth: 12,
  2640. pointBackgroundColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
  2641. pointBorderColor: a,
  2642. pointHoverBackgroundColor: a,
  2643. pointHoverBorderColor: Chart.helpers.color("#000000").alpha(.1).rgbString(),
  2644. fill: true,
  2645. cubicInterpolationMode: 'monotone',
  2646. backgroundColor: Chart.helpers.color(f).alpha(.7).rgbString(),
  2647. data: b,
  2648. }]
  2649. };
  2650. }
  2651. function valincomebuildoption() {
  2652. return {
  2653. title: {
  2654. display: false,
  2655. },
  2656. tooltips: {
  2657. intersect: false,
  2658. mode: 'nearest',
  2659. xPadding: 10,
  2660. yPadding: 10,
  2661. caretPadding: 10
  2662. },
  2663. legend: {
  2664. display: false
  2665. },
  2666. hover: {
  2667. mode: 'index'
  2668. },
  2669. scales: {
  2670. xAxes: [{
  2671. display: false,
  2672. gridLines: false,
  2673. scaleLabel: {
  2674. display: true,
  2675. labelString: 'Month'
  2676. }
  2677. }],
  2678. yAxes: [{
  2679. display: false,
  2680. gridLines: false,
  2681. scaleLabel: {
  2682. display: true,
  2683. labelString: 'Value'
  2684. },
  2685. ticks: {
  2686. min: 1,
  2687. max: 50
  2688. }
  2689. }]
  2690. },
  2691. elements: {
  2692. point: {
  2693. radius: 4,
  2694. borderWidth: 12
  2695. }
  2696. },
  2697. layout: {
  2698. padding: {
  2699. left: 0,
  2700. right: 0,
  2701. top: 0,
  2702. bottom: 0
  2703. }
  2704. }
  2705. };
  2706. }
  2707. var ctx = document.getElementById('tot-lead').getContext("2d");
  2708. var myChart = new Chart(ctx, {
  2709. type: 'line',
  2710. data: valincomearrow('#536dfe', [30, 15, 25, 35, 30, 20, 15, 20, 25,40, 25, 30, 22, 31], '#536dfe'),
  2711. options: valincomebuildoption(),
  2712. });
  2713. var ctx = document.getElementById('tot-vendor').getContext("2d");
  2714. var myChart = new Chart(ctx, {
  2715. type: 'line',
  2716. data: valincomearrow('#11c15b', [40, 25, 30, 22,30, 15, 25, 35, 30, 20, 15, 20, 25, 31], '#11c15b'),
  2717. options: valincomebuildoption(),
  2718. });
  2719. var ctx = document.getElementById('invoice-gen').getContext("2d");
  2720. var myChart = new Chart(ctx, {
  2721. type: 'line',
  2722. data: valincomearrow('#448aff', [25, 30,20, 15, 20, 25, 31, 22,30, 15, 25, 35, 30,40], '#448aff'),
  2723. options: valincomebuildoption(),
  2724. });
  2725. function valincomearrow(a, b, f) {
  2726. if (f == null) {
  2727. f = "rgba(0,0,0,0)";
  2728. }
  2729. return {
  2730. labels: ["1","2","3","4","5","6","7","8","9","10","11","12","13","14"],
  2731. datasets: [{
  2732. label: "",
  2733. borderColor: a,
  2734. borderWidth: 3,
  2735. hitRadius: 30,
  2736. pointRadius: 0,
  2737. pointHoverRadius: 4,
  2738. pointBorderWidth: 2,
  2739. pointHoverBorderWidth: 12,
  2740. pointBackgroundColor: Chart.helpers.color("#000000").alpha(0).rgbString(),
  2741. pointBorderColor: a,
  2742. pointHoverBackgroundColor: a,
  2743. pointHoverBorderColor: Chart.helpers.color("#000000").alpha(.1).rgbString(),
  2744. fill: true,
  2745. lineTension:0,
  2746. backgroundColor: Chart.helpers.color(f).alpha(.7).rgbString(),
  2747. data: b,
  2748. }]
  2749. };
  2750. }
  2751. });
  2752. var ctx = document.getElementById("newuserchart").getContext("2d");
  2753. window.myDoughnut = new Chart(ctx, {
  2754. type: 'doughnut',
  2755. data: {
  2756. datasets: [{
  2757. data: [10,34,5],
  2758. backgroundColor: ["#11c15b","#448aff","#ff5252"],
  2759. label: 'Dataset 1'
  2760. }],
  2761. labels: ["Satisfied", "Unsatisfied", "NA"]
  2762. },
  2763. options: {
  2764. responsive: true,
  2765. legend: {
  2766. position: 'bottom',
  2767. },
  2768. title: {
  2769. display: true,
  2770. text: "",
  2771. },
  2772. animation: {
  2773. animateScale: true,
  2774. animateRotate: true
  2775. }
  2776. }
  2777. });
  2778. });