index.js 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
  1. (function ($) {
  2. "use strict";
  3. // CHART-AREA-SPARK LINE2
  4. var chart = c3.generate({
  5. bindto: '#chart-area-spline2', // id of chart wrapper
  6. data: {
  7. columns: [
  8. // each columns data
  9. ['data1', 0, 8, 10, 12, 20, 18, 15, 10, 18, 10, 20, 10],
  10. ['data2', 0, 12, 8, 20, 10, 13, 10, 20, 10, 19, 8, 19]
  11. ],
  12. type: 'area-spline', // default type of chart
  13. colors: {
  14. data1: '#5797fc',
  15. data2: '#26eda2'
  16. },
  17. names: {
  18. // name of each serie
  19. 'data1': 'Profit',
  20. 'data2': 'Sales'
  21. }
  22. },
  23. axis: {
  24. y: {
  25. padding: {
  26. bottom: 0,
  27. },
  28. show: false,
  29. tick: {
  30. outer: false
  31. }
  32. },
  33. x: {
  34. padding: {
  35. left: 0,
  36. right: 0
  37. },
  38. show: false
  39. }
  40. },
  41. legend: {
  42. position: 'inset',
  43. padding: 0,
  44. inset: {
  45. anchor: 'top-left',
  46. x: 20,
  47. y: 8,
  48. step: 10
  49. }
  50. },
  51. tooltip: {
  52. format: {
  53. title: function (x) {
  54. return '';
  55. }
  56. }
  57. },
  58. padding: {
  59. bottom: 0,
  60. left: -1,
  61. right: -1
  62. },
  63. point: {
  64. show: false
  65. }
  66. });
  67. // CHART-AREA-SPARK LINE1
  68. var chart = c3.generate({
  69. bindto: '#chart-area-spline1', // id of chart wrapper
  70. data: {
  71. columns: [
  72. // each columns data
  73. ['data1', 0, 8, 10, 12, 20, 18, 15, 10, 18, 10, 20, 10],
  74. ['data2', 0, 12, 8, 20, 10, 13, 10, 20, 10, 19, 8, 19]
  75. ],
  76. type: 'area-spline', // default type of chart
  77. colors: {
  78. data1: '#4ecc48',
  79. data2: '#5797fc'
  80. },
  81. names: {
  82. // name of each serie
  83. 'data1': 'data1',
  84. 'data2': 'data2'
  85. }
  86. },
  87. axis: {
  88. x: {
  89. type: 'category',
  90. // name of each category
  91. categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'June', 'July', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
  92. },
  93. },
  94. legend: {
  95. show: false, //hide legend
  96. },
  97. padding: {
  98. bottom: 0,
  99. top: 0
  100. },
  101. });
  102. // CHART VISITORS
  103. var chart = c3.generate({
  104. bindto: '#chart-visitors',
  105. padding: {
  106. bottom: 24
  107. },
  108. data: {
  109. x: 'x',
  110. names: {
  111. data1: 'views',
  112. data2: 'Sales',
  113. data3: 'Users',
  114. },
  115. columns: [
  116. ['x', '2018-08-02', '2018-05-09', '2018-05-12', '2018-05-18', '2018-05-21', '2018-05-25', '2018-06-08', '2018-06-11', '2018-06-19', '2018-06-22', '2018-07-12'],
  117. ['data1', 22, 28, 21, 46, 48, 38, 48, 52, 28, 57, 32],
  118. ['data2', 50, 61, 75, 104, 110, 76, 74, 98, 78, 96, 144],
  119. ['data3', 155, 100, 96, 132, 154, 141, 158, 142, 132, 146, 186],
  120. ],
  121. types: {
  122. data1: 'area',
  123. }
  124. },
  125. point: {
  126. show: false
  127. },
  128. legend: {
  129. position: 'top',
  130. padding: 16
  131. },
  132. transition: {
  133. duration: 0
  134. },
  135. axis: {
  136. y: {
  137. tick: {
  138. fit: true
  139. }
  140. },
  141. x: {
  142. type: 'timeseries',
  143. tick: {
  144. format: '%d %b'
  145. },
  146. padding: {
  147. top: 10,
  148. bottom: 0
  149. }
  150. }
  151. },
  152. grid: {
  153. y: {
  154. show: true
  155. }
  156. },
  157. color: {
  158. pattern: ['#c21a1a', '#4ecc48', '#867efc',]
  159. }
  160. });
  161. // CHART TASKS
  162. var chart = c3.generate({
  163. bindto: '#chart-tasks', // id of chart wrapper
  164. data: {
  165. columns: [
  166. // each columns data
  167. ['data1', 0, 0, 1, 2, 21, 9, 12, 10, 31, 13, 65, 10, 12, 6, 4, 3, 0],
  168. ['data2', 0, 0, 1, 2, 7, 5, 6, 8, 24, 7, 12, 5, 6, 3, 2, 2, 0],
  169. ['data3', 0, 0, 1, 0, 2, 0, 1, 0, 2, 3, 0, 2, 3, 2, 1, 0, 0]
  170. ],
  171. classes: {
  172. data1: 'filled',
  173. data2: 'filled',
  174. data3: 'filled'
  175. },
  176. type: 'area-spline', // default type of chart
  177. groups: [
  178. ['data1', 'data2', 'data3']
  179. ],
  180. colors: {
  181. data1: '#6c5ffc',
  182. data2: '#05c3fb ',
  183. data3: '#09ad95'
  184. },
  185. names: {
  186. // name of each serie
  187. 'data1': 'Profit',
  188. 'data2': 'Sales',
  189. 'data3': 'Gain'
  190. }
  191. },
  192. axis: {
  193. y: {
  194. padding: {
  195. bottom: 0,
  196. },
  197. show: false,
  198. tick: {
  199. outer: false
  200. }
  201. },
  202. x: {
  203. padding: {
  204. left: 0,
  205. right: 0
  206. },
  207. show: false
  208. }
  209. },
  210. legend: {
  211. position: 'inset',
  212. padding: 0,
  213. inset: {
  214. anchor: 'top-left',
  215. x: 20,
  216. y: 8,
  217. step: 10
  218. }
  219. },
  220. tooltip: {
  221. format: {
  222. title: function (x) {
  223. return '';
  224. }
  225. }
  226. },
  227. padding: {
  228. bottom: 0,
  229. left: -1,
  230. right: -1
  231. },
  232. point: {
  233. show: false
  234. }
  235. });
  236. // CHART DONUT
  237. var chart = c3.generate({
  238. bindto: '#chart-donut', // id of chart wrapper
  239. data: {
  240. columns: [
  241. // each columns data
  242. ['data1', 78],
  243. ['data2', 95],
  244. ['data3', 25],
  245. ],
  246. type: 'donut', // default type of chart
  247. colors: {
  248. data1: '#6574cd',
  249. data2: '#2bcbba',
  250. data3: '#f66d9b'
  251. },
  252. names: {
  253. // name of each serie
  254. 'data1': 'sales1',
  255. 'data2': 'sales2',
  256. 'data3': 'sales3'
  257. }
  258. },
  259. axis: {},
  260. legend: {
  261. show: true,
  262. },
  263. padding: {
  264. bottom: 0,
  265. top: 0
  266. },
  267. });
  268. // CHART PIE
  269. var chart = c3.generate({
  270. bindto: '#chart-pie', // id of chart wrapper
  271. data: {
  272. columns: [
  273. // each columns data
  274. ['data1', 98],
  275. ['data2', 76],
  276. ['data3', 45],
  277. ],
  278. type: 'pie', // default type of chart
  279. colors: {
  280. data1: '#ffcc29',
  281. data2: '#17a2b8',
  282. data3: '#ff7088'
  283. },
  284. names: {
  285. // name of each serie
  286. 'data1': 'profit1',
  287. 'data2': 'profit2',
  288. 'data3': 'profit3'
  289. }
  290. },
  291. axis: {},
  292. legend: {
  293. show: true, //hide legend
  294. },
  295. padding: {
  296. bottom: 0,
  297. top: 0
  298. },
  299. });
  300. // CHART BG USERS 1
  301. var chart = c3.generate({
  302. bindto: '#chart-bg-users-1',
  303. padding: {
  304. bottom: -10,
  305. left: -1,
  306. right: -1
  307. },
  308. size: {
  309. height: 64
  310. },
  311. data: {
  312. names: {
  313. data1: 'Visitors online'
  314. },
  315. columns: [
  316. ['data1', 10, 50, 100, 50, 40, 35, 70]
  317. ],
  318. type: 'area-spline'
  319. },
  320. legend: {
  321. show: false
  322. },
  323. transition: {
  324. duration: 0
  325. },
  326. point: {
  327. show: false
  328. },
  329. tooltip: {
  330. format: {
  331. title: function (x) {
  332. return '';
  333. }
  334. }
  335. },
  336. axis: {
  337. y: {
  338. padding: {
  339. bottom: 0,
  340. },
  341. show: false,
  342. tick: {
  343. outer: false
  344. }
  345. },
  346. x: {
  347. padding: {
  348. left: 0,
  349. right: 0
  350. },
  351. show: false
  352. }
  353. },
  354. color: {
  355. pattern: ['#8543f6']
  356. }
  357. });
  358. // CHART BG USERS 2
  359. var chart = c3.generate({
  360. bindto: '#chart-bg-users-2',
  361. padding: {
  362. bottom: -10,
  363. left: -1,
  364. right: -1
  365. },
  366. size: {
  367. height: 64
  368. },
  369. data: {
  370. names: {
  371. data1: 'Total Sales'
  372. },
  373. columns: [
  374. ['data1', 10, 30, 20, 60, 70, 85, 75]
  375. ],
  376. type: 'area-spline'
  377. },
  378. legend: {
  379. show: false
  380. },
  381. transition: {
  382. duration: 0
  383. },
  384. point: {
  385. show: false
  386. },
  387. tooltip: {
  388. format: {
  389. title: function (x) {
  390. return '';
  391. }
  392. }
  393. },
  394. axis: {
  395. y: {
  396. padding: {
  397. bottom: 0,
  398. },
  399. show: false,
  400. tick: {
  401. outer: false
  402. }
  403. },
  404. x: {
  405. padding: {
  406. left: 0,
  407. right: 0
  408. },
  409. show: false
  410. }
  411. },
  412. color: {
  413. pattern: ['#ff7088']
  414. }
  415. });
  416. // CHART BG USERS 3
  417. var chart = c3.generate({
  418. bindto: '#chart-bg-users-3',
  419. padding: {
  420. bottom: -10,
  421. left: -1,
  422. right: -1
  423. },
  424. size: {
  425. height: 64
  426. },
  427. data: {
  428. names: {
  429. data1: 'Total Projects'
  430. },
  431. columns: [
  432. ['data1', 40, 40, 50, 70, 100, 85, 80]
  433. ],
  434. type: 'area-spline'
  435. },
  436. legend: {
  437. show: false
  438. },
  439. transition: {
  440. duration: 0
  441. },
  442. point: {
  443. show: false
  444. },
  445. tooltip: {
  446. format: {
  447. title: function (x) {
  448. return '';
  449. }
  450. }
  451. },
  452. axis: {
  453. y: {
  454. padding: {
  455. bottom: 0,
  456. },
  457. show: false,
  458. tick: {
  459. outer: false
  460. }
  461. },
  462. x: {
  463. padding: {
  464. left: 0,
  465. right: 0
  466. },
  467. show: false
  468. }
  469. },
  470. color: {
  471. pattern: ['#fc7303']
  472. }
  473. });
  474. // CHART BG USERS 4
  475. var chart = c3.generate({
  476. bindto: '#chart-bg-users-4',
  477. padding: {
  478. bottom: -10,
  479. left: -1,
  480. right: -1
  481. },
  482. size: {
  483. height: 64
  484. },
  485. data: {
  486. names: {
  487. data1: 'Today Income'
  488. },
  489. columns: [
  490. ['data1', 300, 800, 300, 600, 300, 650, 1000]
  491. ],
  492. type: 'area-spline'
  493. },
  494. legend: {
  495. show: false
  496. },
  497. transition: {
  498. duration: 0
  499. },
  500. point: {
  501. show: false
  502. },
  503. tooltip: {
  504. format: {
  505. title: function (x) {
  506. return '';
  507. }
  508. }
  509. },
  510. axis: {
  511. y: {
  512. padding: {
  513. bottom: 0,
  514. },
  515. show: false,
  516. tick: {
  517. outer: false
  518. }
  519. },
  520. x: {
  521. padding: {
  522. left: 0,
  523. right: 0
  524. },
  525. show: false
  526. }
  527. },
  528. color: {
  529. pattern: ['#4ecc48']
  530. }
  531. });
  532. // CHART BROWSERS
  533. var chart = c3.generate({
  534. bindto: '#chart-browsers',
  535. data: {
  536. columns: [
  537. ['Chrome', 36],
  538. ['Firefox', 15],
  539. ['Safari', 9],
  540. ['Edge', 10],
  541. ['Opera', 30],
  542. ],
  543. colors: {
  544. Chrome: '#17a2b8',
  545. Firefox: '#fc7303',
  546. Safari: '#7ea5dd',
  547. Edge: '#f999b9',
  548. Opera: '#c21a1a',
  549. },
  550. type: 'donut'
  551. },
  552. legend: {
  553. show: true
  554. }
  555. });
  556. // CHART EMAILS
  557. var chart = c3.generate({
  558. bindto: '#chart-emails',
  559. padding: {
  560. bottom: 24,
  561. top: 0
  562. },
  563. data: {
  564. type: 'donut',
  565. names: {
  566. data1: 'Open',
  567. data2: 'Bounce',
  568. data3: 'Unsubscribe',
  569. },
  570. columns: [
  571. ['data1', 30],
  572. ['data2', 50],
  573. ['data3', 25],
  574. ],
  575. colors: {
  576. data1: 'blue',
  577. data2: 'red',
  578. data3: 'yellow',
  579. }
  580. },
  581. donut: {
  582. label: {
  583. show: false
  584. }
  585. },
  586. legend: {
  587. show: true
  588. },
  589. });
  590. $('.resp-tabs-list .home-hogo').addClass('active');
  591. $('.second-sidemenu .home-hogo').addClass('resp-tab-content-active');
  592. })(jQuery);