dashboard3.js 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  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: [91, 100, 90, 120, 155, 140, 170]
  118. }],
  119. chart: {
  120. height: 380,
  121. type: 'area',
  122. zoom: {
  123. enabled: false
  124. },
  125. },
  126. colors: ["#4c95dd"],
  127. dataLabels: {
  128. enabled: false
  129. },
  130. stroke: {
  131. curve: 'stepline',
  132. show: true,
  133. width: 5,
  134. },
  135. xaxis: {
  136. categories: ["Jan", "Fab", "Mar", "Apr", "May", "Jun", "July"]
  137. },
  138. tooltip: {
  139. y: {
  140. formatter: function (val) {
  141. return "$" + val + " thousands"
  142. }
  143. },
  144. },
  145. };
  146. var chart = new ApexCharts(document.querySelector("#chart"), options);
  147. chart.render();
  148. var options = {
  149. chart: {
  150. height: 325,
  151. type: 'bar',
  152. toolbar: {
  153. show: false
  154. },
  155. },
  156. plotOptions: {
  157. bar: {
  158. horizontal: false,
  159. endingShape: 'rounded',
  160. columnWidth: '40%',
  161. distributed: true,
  162. },
  163. },
  164. dataLabels: {
  165. enabled: false
  166. },
  167. stroke: {
  168. show: true,
  169. width: 5,
  170. colors: ['transparent']
  171. },
  172. colors: ["#e66430", "#4c95dd"],
  173. series: [{
  174. name: 'Customer',
  175. data: [152, 385, 351, 428, 350, 550, 660]
  176. },],
  177. xaxis: {
  178. categories: [["Mon"], ["Tue"], ["Wed"], ["Thu"], ["Fri"], ["Set"], ["Sun"],],
  179. axisBorder: {
  180. show: true,
  181. color: '#bec7e0',
  182. },
  183. axisTicks: {
  184. show: true,
  185. color: '#bec7e0',
  186. },
  187. },
  188. legend: {
  189. show: false,
  190. },
  191. fill: {
  192. opacity: 1
  193. },
  194. grid: {
  195. row: {
  196. colors: ['transparent', 'transparent'], // takes an array which will be repeated on columns
  197. opacity: 0.2
  198. },
  199. borderColor: '#f1f3fa'
  200. },
  201. tooltip: {
  202. y: {
  203. formatter: function (val) {
  204. return val + "k"
  205. }
  206. }
  207. }
  208. }
  209. var chart = new ApexCharts(
  210. document.querySelector("#yearly-comparison"),
  211. options
  212. );
  213. chart.render();
  214. var options = {
  215. chart: {
  216. height: 325,
  217. type: 'area',
  218. toolbar: {
  219. show: false
  220. },
  221. },
  222. plotOptions: {
  223. bar: {
  224. horizontal: false,
  225. endingShape: 'rounded',
  226. columnWidth: '40%',
  227. },
  228. },
  229. dataLabels: {
  230. enabled: false
  231. },
  232. stroke: {
  233. show: true,
  234. width: 5,
  235. },
  236. colors: ["#4c95dd"],
  237. series: [{
  238. name: 'Order',
  239. data: [200, 445, 351, 258, 359, 558, 461]
  240. },],
  241. xaxis: {
  242. categories: ["8:00", "9:00", "10:00", "11:00", "12:00", "13:00", "14:00"],
  243. axisBorder: {
  244. show: true,
  245. color: '#bec7e0',
  246. },
  247. axisTicks: {
  248. show: true,
  249. color: '#bec7e0',
  250. },
  251. },
  252. legend: {
  253. show: false,
  254. },
  255. fill: {
  256. opacity: 1,
  257. type: "gradient",
  258. gradient: {
  259. shadeIntensity: 1,
  260. opacityFrom: 0.7,
  261. opacityTo: 0.9,
  262. stops: [0, 90, 100]
  263. },
  264. },
  265. grid: {
  266. row: {
  267. colors: ['transparent', 'transparent'], // takes an array which will be repeated on columns
  268. opacity: 0.2
  269. },
  270. borderColor: '#f1f3fa'
  271. },
  272. tooltip: {
  273. y: {
  274. formatter: function (val) {
  275. return val + " total"
  276. }
  277. }
  278. }
  279. }
  280. var chart = new ApexCharts(
  281. document.querySelector("#order-overview"),
  282. options
  283. );
  284. chart.render();
  285. $('.owl-carousel').owlCarousel({
  286. loop: true,
  287. margin: 20,
  288. responsiveClass: true,
  289. autoplay: true,
  290. dots: false,
  291. nav: true,
  292. responsive: {
  293. 0: {
  294. items: 1,
  295. },
  296. 1024: {
  297. items: 2,
  298. },
  299. 1600: {
  300. items: 3,
  301. },
  302. 2000: {
  303. items: 4,
  304. }
  305. }
  306. });
  307. }); // End of use strict