dashboard2.js 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. //[Dashboard Javascript]
  2. //Project: Riday Admin - Responsive Admin Template
  3. //Primary use: Used only for the main dashboard (index.html)
  4. $(function () {
  5. 'use strict';
  6. var bar = new ProgressBar.Circle(progressbar1, {
  7. color: '#e66430',
  8. // This has to be the same size as the maximum width to
  9. // prevent clipping
  10. strokeWidth: 30,
  11. trailWidth: 8,
  12. easing: 'easeInOut',
  13. duration: 1400,
  14. text: {
  15. autoStyleContainer: false
  16. },
  17. from: { color: '#e66430', width: 8 },
  18. to: { color: '#e66430', width: 8 },
  19. // Set default step function for all animate calls
  20. step: function(state, circle) {
  21. circle.path.setAttribute('stroke', state.color);
  22. circle.path.setAttribute('stroke-width', state.width);
  23. var value = Math.round(circle.value() * 150);
  24. if (value === 0) {
  25. circle.setText('');
  26. } else {
  27. circle.setText("<i class='icon-Dinner1'><span class='path1'></span><span class='path2'></span></i>");
  28. }
  29. }
  30. });
  31. bar.text.style.fontSize = '1.5rem';
  32. bar.animate(0.78);
  33. var bar = new ProgressBar.Circle(progressbar2, {
  34. color: '#e66430',
  35. // This has to be the same size as the maximum width to
  36. // prevent clipping
  37. strokeWidth: 30,
  38. trailWidth: 8,
  39. easing: 'easeInOut',
  40. duration: 1400,
  41. text: {
  42. autoStyleContainer: false
  43. },
  44. from: { color: '#e66430', width: 8 },
  45. to: { color: '#e66430', width: 8 },
  46. // Set default step function for all animate calls
  47. step: function(state, circle) {
  48. circle.path.setAttribute('stroke', state.color);
  49. circle.path.setAttribute('stroke-width', state.width);
  50. var value = Math.round(circle.value() * 150);
  51. if (value === 0) {
  52. circle.setText('');
  53. } else {
  54. circle.setText("<i class='icon-Dollar'><span class='path1'></span><span class='path2'></span><span class='path3'></span></i>");
  55. }
  56. }
  57. });
  58. bar.text.style.fontSize = '1.5rem';
  59. bar.animate(0.5);
  60. var bar = new ProgressBar.Circle(progressbar3, {
  61. color: '#e66430',
  62. // This has to be the same size as the maximum width to
  63. // prevent clipping
  64. strokeWidth: 30,
  65. trailWidth: 8,
  66. easing: 'easeInOut',
  67. duration: 1400,
  68. text: {
  69. autoStyleContainer: false
  70. },
  71. from: { color: '#e66430', width: 8 },
  72. to: { color: '#e66430', width: 8 },
  73. // Set default step function for all animate calls
  74. step: function(state, circle) {
  75. circle.path.setAttribute('stroke', state.color);
  76. circle.path.setAttribute('stroke-width', state.width);
  77. var value = Math.round(circle.value() * 150);
  78. if (value === 0) {
  79. circle.setText('');
  80. } else {
  81. circle.setText("<i class='icon-Clipboard'><span class='path1'></span><span class='path2'></span><span class='path3'></span><span class='path4'></span></i>");
  82. }
  83. }
  84. });
  85. bar.text.style.fontSize = '1.5rem';
  86. bar.animate(0.4);
  87. var bar = new ProgressBar.Circle(progressbar4, {
  88. color: '#e66430',
  89. // This has to be the same size as the maximum width to
  90. // prevent clipping
  91. strokeWidth: 30,
  92. trailWidth: 8,
  93. easing: 'easeInOut',
  94. duration: 1400,
  95. text: {
  96. autoStyleContainer: false
  97. },
  98. from: { color: '#e66430', width: 8 },
  99. to: { color: '#e66430', width: 8 },
  100. // Set default step function for all animate calls
  101. step: function(state, circle) {
  102. circle.path.setAttribute('stroke', state.color);
  103. circle.path.setAttribute('stroke-width', state.width);
  104. var value = Math.round(circle.value() * 150);
  105. if (value === 0) {
  106. circle.setText('');
  107. } else {
  108. circle.setText("<i class='icon-User'><span class='path1'></span><span class='path2'></span></i>");
  109. }
  110. }
  111. });
  112. bar.text.style.fontSize = '1.5rem';
  113. bar.animate(0.3);
  114. var options = {
  115. series: [{
  116. name: 'Revenue',
  117. data: [31, 50, 28, 70, 45, 90, 140]
  118. }],
  119. chart: {
  120. height: 178,
  121. type: 'area',
  122. zoom: {
  123. enabled: false
  124. },
  125. },
  126. colors: ["#4c95dd"],
  127. dataLabels: {
  128. enabled: false
  129. },
  130. stroke: {
  131. curve: 'smooth'
  132. },
  133. xaxis: {
  134. categories: ["Mon", "Tue", "Wed", "Thu", "Fri", "Set", "Sun"]
  135. },
  136. tooltip: {
  137. y: {
  138. formatter: function (val) {
  139. return "$" + val + " thousands"
  140. }
  141. },
  142. },
  143. };
  144. var chart = new ApexCharts(document.querySelector("#chart"), options);
  145. chart.render();
  146. var options = {
  147. chart: {
  148. height: 325,
  149. type: 'bar',
  150. toolbar: {
  151. show: false
  152. },
  153. },
  154. plotOptions: {
  155. bar: {
  156. horizontal: false,
  157. endingShape: 'rounded',
  158. columnWidth: '40%',
  159. distributed: true,
  160. },
  161. },
  162. dataLabels: {
  163. enabled: false
  164. },
  165. stroke: {
  166. show: true,
  167. width: 5,
  168. colors: ['transparent']
  169. },
  170. colors: ["#ffb500", "#4c95dd"],
  171. series: [{
  172. name: 'Customer',
  173. data: [20, 45, 51, 58, 59, 58, 61, 30, 35, 61, 48, 39, 68, 41, 41]
  174. },],
  175. xaxis: {
  176. categories: ["1", "2", "3", "4", "5", "7", "8", "9", "10", "11", "12", "13", "14", "15"],
  177. axisBorder: {
  178. show: true,
  179. color: '#bec7e0',
  180. },
  181. axisTicks: {
  182. show: true,
  183. color: '#bec7e0',
  184. },
  185. },
  186. legend: {
  187. show: false,
  188. },
  189. fill: {
  190. opacity: 1
  191. },
  192. grid: {
  193. row: {
  194. colors: ['transparent', 'transparent'], // takes an array which will be repeated on columns
  195. opacity: 0.2
  196. },
  197. borderColor: '#f1f3fa'
  198. },
  199. tooltip: {
  200. y: {
  201. formatter: function (val) {
  202. return val + "k"
  203. }
  204. }
  205. }
  206. }
  207. var chart = new ApexCharts(
  208. document.querySelector("#yearly-comparison"),
  209. options
  210. );
  211. chart.render();
  212. var options = {
  213. chart: {
  214. height: 325,
  215. type: 'area',
  216. toolbar: {
  217. show: false
  218. },
  219. },
  220. plotOptions: {
  221. bar: {
  222. horizontal: false,
  223. endingShape: 'rounded',
  224. columnWidth: '40%',
  225. },
  226. },
  227. dataLabels: {
  228. enabled: false
  229. },
  230. stroke: {
  231. show: true,
  232. width: 5,
  233. },
  234. colors: ["#e66430"],
  235. series: [{
  236. name: 'Order',
  237. data: [200, 445, 351, 258, 359, 558, 461]
  238. },],
  239. xaxis: {
  240. categories: ["Mon", "Tue", "Wed", "Thu", "Fri", "Set", "Sun"],
  241. axisBorder: {
  242. show: true,
  243. color: '#bec7e0',
  244. },
  245. axisTicks: {
  246. show: true,
  247. color: '#bec7e0',
  248. },
  249. },
  250. legend: {
  251. show: false,
  252. },
  253. fill: {
  254. opacity: 1
  255. },
  256. grid: {
  257. row: {
  258. colors: ['transparent', 'transparent'], // takes an array which will be repeated on columns
  259. opacity: 0.2
  260. },
  261. borderColor: '#f1f3fa'
  262. },
  263. tooltip: {
  264. y: {
  265. formatter: function (val) {
  266. return val + " total"
  267. }
  268. }
  269. }
  270. }
  271. var chart = new ApexCharts(
  272. document.querySelector("#order-overview"),
  273. options
  274. );
  275. chart.render();
  276. $('.owl-carousel').owlCarousel({
  277. loop: true,
  278. margin: 0,
  279. responsiveClass: true,
  280. autoplay: true,
  281. dots: false,
  282. nav: false,
  283. responsive: {
  284. 0: {
  285. items: 1,
  286. },
  287. 768: {
  288. items: 2,
  289. },
  290. 1024: {
  291. items: 3,
  292. },
  293. 1600: {
  294. items: 4,
  295. },
  296. 2000: {
  297. items: 4,
  298. }
  299. }
  300. });
  301. }); // End of use strict