Нема описа
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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008
  1. /**
  2. * Dashboard CRM
  3. */
  4. 'use strict';
  5. document.addEventListener('DOMContentLoaded', function (e) {
  6. let cardColor,
  7. headingColor,
  8. labelColor,
  9. legendColor,
  10. shadeColor,
  11. borderColor,
  12. heatMap1,
  13. heatMap2,
  14. heatMap3,
  15. heatMap4,
  16. fontFamily;
  17. if (isDarkStyle) {
  18. shadeColor = 'dark';
  19. heatMap1 = '#333457';
  20. heatMap2 = '#3c3e75';
  21. heatMap3 = '#484b9b';
  22. heatMap4 = '#696cff';
  23. } else {
  24. shadeColor = '';
  25. heatMap1 = '#ededff';
  26. heatMap2 = '#d5d6ff';
  27. heatMap3 = '#b7b9ff';
  28. heatMap4 = '#696cff';
  29. }
  30. cardColor = config.colors.cardColor;
  31. headingColor = config.colors.headingColor;
  32. labelColor = config.colors.textMuted;
  33. legendColor = config.colors.bodyColor;
  34. borderColor = config.colors.borderColor;
  35. fontFamily = config.fontFamily;
  36. // Donut Chart Colors
  37. const chartColors = {
  38. donut: {
  39. series1: '#66C732',
  40. series2: '#8DE45F',
  41. series3: '#AAEB87',
  42. series4: '#E3F8D7'
  43. }
  44. };
  45. // Radial bar chart functions
  46. function radialBarChart(color, value) {
  47. const radialBarChartOpt = {
  48. chart: {
  49. height: 55,
  50. width: 45,
  51. type: 'radialBar'
  52. },
  53. plotOptions: {
  54. radialBar: {
  55. hollow: {
  56. size: '25%'
  57. },
  58. dataLabels: {
  59. show: false
  60. },
  61. track: {
  62. background: config.colors_label.secondary
  63. }
  64. }
  65. },
  66. stroke: {
  67. lineCap: 'round'
  68. },
  69. colors: [color],
  70. grid: {
  71. padding: {
  72. top: -15,
  73. bottom: -15,
  74. left: -5,
  75. right: -15
  76. }
  77. },
  78. series: [value],
  79. labels: ['Progress']
  80. };
  81. return radialBarChartOpt;
  82. }
  83. // Progress Chart
  84. // --------------------------------------------------------------------
  85. // All progress chart
  86. const chartProgressList = document.querySelectorAll('.chart-progress');
  87. if (chartProgressList) {
  88. chartProgressList.forEach(function (chartProgressEl) {
  89. const color = config.colors[chartProgressEl.dataset.color],
  90. series = chartProgressEl.dataset.series;
  91. const optionsBundle = radialBarChart(color, series);
  92. const chart = new ApexCharts(chartProgressEl, optionsBundle);
  93. chart.render();
  94. });
  95. }
  96. // Customer Ratings - Line Charts
  97. // --------------------------------------------------------------------
  98. const customerRatingsChartEl = document.querySelector('#customerRatingsChart'),
  99. customerRatingsChartOptions = {
  100. chart: {
  101. height: 212,
  102. toolbar: { show: false },
  103. zoom: { enabled: false },
  104. type: 'line',
  105. dropShadow: {
  106. enabled: true,
  107. enabledOnSeries: [1],
  108. top: 13,
  109. left: 4,
  110. blur: 3,
  111. color: config.colors.primary,
  112. opacity: 0.09
  113. }
  114. },
  115. series: [
  116. {
  117. name: 'Last Month',
  118. data: [20, 54, 20, 38, 22, 28, 16, 19, 11]
  119. },
  120. {
  121. name: 'This Month',
  122. data: [20, 32, 22, 65, 40, 46, 34, 70, 75]
  123. }
  124. ],
  125. stroke: {
  126. curve: 'smooth',
  127. dashArray: [8, 0],
  128. width: [3, 4]
  129. },
  130. legend: {
  131. show: false
  132. },
  133. colors: [borderColor, config.colors.primary],
  134. grid: {
  135. show: false,
  136. borderColor: borderColor,
  137. padding: {
  138. top: -20,
  139. bottom: -10,
  140. left: 0
  141. }
  142. },
  143. markers: {
  144. size: 6,
  145. colors: 'transparent',
  146. strokeColors: 'transparent',
  147. strokeWidth: 5,
  148. hover: {
  149. size: 6
  150. },
  151. discrete: [
  152. {
  153. fillColor: config.colors.white,
  154. seriesIndex: 1,
  155. dataPointIndex: 8,
  156. strokeColor: config.colors.primary,
  157. size: 6
  158. },
  159. {
  160. fillColor: config.colors.white,
  161. seriesIndex: 1,
  162. dataPointIndex: 3,
  163. strokeColor: config.colors.black,
  164. size: 6
  165. }
  166. ],
  167. offsetX: -3
  168. },
  169. xaxis: {
  170. labels: {
  171. style: {
  172. colors: labelColor,
  173. fontSize: '13px'
  174. }
  175. },
  176. axisTicks: {
  177. show: false
  178. },
  179. categories: [' ', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', ' '],
  180. axisBorder: {
  181. show: false
  182. }
  183. },
  184. yaxis: {
  185. show: false
  186. }
  187. };
  188. if (typeof customerRatingsChartEl !== undefined && customerRatingsChartEl !== null) {
  189. const customerRatingsChart = new ApexCharts(customerRatingsChartEl, customerRatingsChartOptions);
  190. customerRatingsChart.render();
  191. }
  192. // Overview & Sales Activity - Staked Bar Chart
  193. // --------------------------------------------------------------------
  194. const salesActivityChartEl = document.querySelector('#salesActivityChart'),
  195. salesActivityChartConfig = {
  196. chart: {
  197. type: 'bar',
  198. height: 235,
  199. stacked: true,
  200. toolbar: {
  201. show: false
  202. }
  203. },
  204. series: [
  205. {
  206. name: 'PRODUCT A',
  207. data: [75, 50, 55, 60, 48, 82, 59]
  208. },
  209. {
  210. name: 'PRODUCT B',
  211. data: [25, 29, 32, 35, 34, 18, 30]
  212. }
  213. ],
  214. plotOptions: {
  215. bar: {
  216. horizontal: false,
  217. columnWidth: '40%',
  218. borderRadius: 9,
  219. startingShape: 'rounded',
  220. endingShape: 'rounded',
  221. borderRadiusApplication: 'around'
  222. }
  223. },
  224. dataLabels: {
  225. enabled: false
  226. },
  227. stroke: {
  228. curve: 'smooth',
  229. width: 6,
  230. lineCap: 'round',
  231. colors: [cardColor]
  232. },
  233. legend: {
  234. show: false
  235. },
  236. colors: [config.colors.danger, config.colors.secondary],
  237. fill: {
  238. opacity: 1
  239. },
  240. grid: {
  241. show: false,
  242. strokeDashArray: 7,
  243. padding: {
  244. top: -40,
  245. left: 0,
  246. right: 0
  247. }
  248. },
  249. xaxis: {
  250. categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
  251. labels: {
  252. show: true,
  253. style: {
  254. colors: labelColor,
  255. fontSize: '15px',
  256. fontFamily: fontFamily
  257. }
  258. },
  259. axisBorder: {
  260. show: false
  261. },
  262. axisTicks: {
  263. show: false
  264. }
  265. },
  266. yaxis: {
  267. show: false
  268. },
  269. responsive: [
  270. {
  271. breakpoint: 1440,
  272. options: {
  273. plotOptions: {
  274. bar: {
  275. borderRadius: 10,
  276. columnWidth: '50%'
  277. }
  278. }
  279. }
  280. },
  281. {
  282. breakpoint: 1300,
  283. options: {
  284. plotOptions: {
  285. bar: {
  286. borderRadius: 11,
  287. columnWidth: '55%'
  288. }
  289. }
  290. }
  291. },
  292. {
  293. breakpoint: 1200,
  294. options: {
  295. plotOptions: {
  296. bar: {
  297. borderRadius: 10,
  298. columnWidth: '45%'
  299. }
  300. }
  301. }
  302. },
  303. {
  304. breakpoint: 1040,
  305. options: {
  306. plotOptions: {
  307. bar: {
  308. borderRadius: 10,
  309. columnWidth: '50%'
  310. }
  311. }
  312. }
  313. },
  314. {
  315. breakpoint: 992,
  316. options: {
  317. plotOptions: {
  318. bar: {
  319. borderRadius: 12,
  320. columnWidth: '40%'
  321. }
  322. },
  323. chart: {
  324. type: 'bar',
  325. height: 320
  326. }
  327. }
  328. },
  329. {
  330. breakpoint: 768,
  331. options: {
  332. plotOptions: {
  333. bar: {
  334. borderRadius: 11,
  335. columnWidth: '25%'
  336. }
  337. }
  338. }
  339. },
  340. {
  341. breakpoint: 576,
  342. options: {
  343. plotOptions: {
  344. bar: {
  345. borderRadius: 10,
  346. columnWidth: '35%'
  347. }
  348. }
  349. }
  350. },
  351. {
  352. breakpoint: 440,
  353. options: {
  354. plotOptions: {
  355. bar: {
  356. borderRadius: 10,
  357. columnWidth: '45%'
  358. }
  359. }
  360. }
  361. },
  362. {
  363. breakpoint: 360,
  364. options: {
  365. plotOptions: {
  366. bar: {
  367. borderRadius: 8,
  368. columnWidth: '50%'
  369. }
  370. }
  371. }
  372. }
  373. ],
  374. states: {
  375. hover: {
  376. filter: {
  377. type: 'none'
  378. }
  379. },
  380. active: {
  381. filter: {
  382. type: 'none'
  383. }
  384. }
  385. }
  386. };
  387. if (typeof salesActivityChartEl !== undefined && salesActivityChartEl !== null) {
  388. const salesActivityChart = new ApexCharts(salesActivityChartEl, salesActivityChartConfig);
  389. salesActivityChart.render();
  390. }
  391. // Session Area Chart
  392. // --------------------------------------------------------------------
  393. const sessionAreaChartEl = document.querySelector('#sessionsChart'),
  394. sessionAreaChartConfig = {
  395. chart: {
  396. height: 104,
  397. type: 'area',
  398. toolbar: {
  399. show: false
  400. },
  401. sparkline: {
  402. enabled: true
  403. }
  404. },
  405. markers: {
  406. size: 6,
  407. colors: 'transparent',
  408. strokeColors: 'transparent',
  409. strokeWidth: 4,
  410. discrete: [
  411. {
  412. fillColor: cardColor,
  413. seriesIndex: 0,
  414. dataPointIndex: 8,
  415. strokeColor: config.colors.warning,
  416. strokeWidth: 2,
  417. size: 5,
  418. radius: 8
  419. }
  420. ],
  421. hover: {
  422. size: 7
  423. }
  424. },
  425. grid: {
  426. show: false,
  427. padding: {
  428. right: 8
  429. }
  430. },
  431. colors: [config.colors.warning],
  432. fill: {
  433. type: 'gradient',
  434. gradient: {
  435. shadeIntensity: 1,
  436. opacityFrom: 0.4,
  437. gradientToColors: [config.colors.cardColor],
  438. opacityTo: 0.4,
  439. stops: [0, 85, 100]
  440. }
  441. },
  442. dataLabels: {
  443. enabled: false
  444. },
  445. stroke: {
  446. width: 2,
  447. curve: 'straight'
  448. },
  449. series: [
  450. {
  451. data: [340, 340, 300, 300, 240, 240, 320, 320, 370]
  452. }
  453. ],
  454. xaxis: {
  455. show: false,
  456. lines: {
  457. show: false
  458. },
  459. labels: {
  460. show: false
  461. },
  462. axisBorder: {
  463. show: false
  464. }
  465. },
  466. yaxis: {
  467. show: false
  468. }
  469. };
  470. if (typeof sessionAreaChartEl !== undefined && sessionAreaChartEl !== null) {
  471. const sessionAreaChart = new ApexCharts(sessionAreaChartEl, sessionAreaChartConfig);
  472. sessionAreaChart.render();
  473. }
  474. // Order Statistics Chart
  475. // --------------------------------------------------------------------
  476. const leadsReportChartEl = document.querySelector('#leadsReportChart'),
  477. leadsReportChartConfig = {
  478. chart: {
  479. height: 157,
  480. width: 135,
  481. parentHeightOffset: 0,
  482. type: 'donut'
  483. },
  484. labels: ['Electronic', 'Sports', 'Decor', 'Fashion'],
  485. series: [20, 30, 20, 30],
  486. colors: [
  487. chartColors.donut.series1,
  488. chartColors.donut.series4,
  489. chartColors.donut.series3,
  490. chartColors.donut.series2
  491. ],
  492. stroke: {
  493. width: 0
  494. },
  495. dataLabels: {
  496. enabled: false,
  497. formatter: function (val, opt) {
  498. return parseInt(val) + '%';
  499. }
  500. },
  501. legend: {
  502. show: false
  503. },
  504. tooltip: {
  505. theme: false
  506. },
  507. grid: {
  508. padding: {
  509. top: 5,
  510. bottom: 5
  511. }
  512. },
  513. plotOptions: {
  514. pie: {
  515. donut: {
  516. size: '75%',
  517. labels: {
  518. show: true,
  519. value: {
  520. fontSize: '1.5rem',
  521. fontFamily: fontFamily,
  522. color: headingColor,
  523. fontWeight: 500,
  524. offsetY: -15,
  525. formatter: function (val) {
  526. return parseInt(val) + '%';
  527. }
  528. },
  529. name: {
  530. offsetY: 20,
  531. fontFamily: fontFamily
  532. },
  533. total: {
  534. show: true,
  535. fontSize: '15px',
  536. fontFamily: fontFamily,
  537. label: 'Average',
  538. color: legendColor,
  539. formatter: function (w) {
  540. return '25%';
  541. }
  542. }
  543. }
  544. }
  545. }
  546. }
  547. };
  548. if (typeof leadsReportChartEl !== undefined && leadsReportChartEl !== null) {
  549. const leadsReportChart = new ApexCharts(leadsReportChartEl, leadsReportChartConfig);
  550. leadsReportChart.render();
  551. }
  552. // Earning Reports Bar Chart
  553. // --------------------------------------------------------------------
  554. const reportBarChartEl = document.querySelector('#reportBarChart'),
  555. reportBarChartConfig = {
  556. chart: {
  557. height: 150,
  558. type: 'bar',
  559. toolbar: {
  560. show: false
  561. }
  562. },
  563. plotOptions: {
  564. bar: {
  565. barHeight: '60%',
  566. columnWidth: '50%',
  567. startingShape: 'rounded',
  568. endingShape: 'rounded',
  569. borderRadius: 4,
  570. distributed: true
  571. }
  572. },
  573. grid: {
  574. show: false,
  575. padding: {
  576. top: -20,
  577. bottom: 0,
  578. left: -10,
  579. right: -10
  580. }
  581. },
  582. states: {
  583. hover: {
  584. filter: {
  585. type: 'none'
  586. }
  587. },
  588. active: {
  589. filter: {
  590. type: 'none'
  591. }
  592. }
  593. },
  594. colors: [
  595. config.colors_label.primary,
  596. config.colors_label.primary,
  597. config.colors_label.primary,
  598. config.colors_label.primary,
  599. config.colors.primary,
  600. config.colors_label.primary,
  601. config.colors_label.primary
  602. ],
  603. dataLabels: {
  604. enabled: false
  605. },
  606. series: [
  607. {
  608. data: [40, 95, 60, 45, 90, 50, 75]
  609. }
  610. ],
  611. legend: {
  612. show: false
  613. },
  614. xaxis: {
  615. categories: ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'],
  616. axisBorder: {
  617. show: false
  618. },
  619. axisTicks: {
  620. show: false
  621. },
  622. labels: {
  623. style: {
  624. colors: labelColor,
  625. fontSize: '13px'
  626. }
  627. }
  628. },
  629. yaxis: {
  630. labels: {
  631. show: false
  632. }
  633. }
  634. };
  635. if (typeof reportBarChartEl !== undefined && reportBarChartEl !== null) {
  636. const barChart = new ApexCharts(reportBarChartEl, reportBarChartConfig);
  637. barChart.render();
  638. }
  639. // Sales Analytics - Heat map chart
  640. // --------------------------------------------------------------------
  641. const salesAnalyticsChartEl = document.querySelector('#salesAnalyticsChart'),
  642. salesAnalyticsChartConfig = {
  643. chart: {
  644. height: 350,
  645. type: 'heatmap',
  646. parentHeightOffset: 0,
  647. offsetX: -10,
  648. toolbar: {
  649. show: false
  650. }
  651. },
  652. series: [
  653. {
  654. name: '1k',
  655. data: [
  656. { x: 'Jan', y: '250' },
  657. { x: 'Feb', y: '350' },
  658. { x: 'Mar', y: '220' },
  659. { x: 'Apr', y: '290' },
  660. { x: 'May', y: '650' },
  661. { x: 'Jun', y: '260' },
  662. { x: 'Jul', y: '274' },
  663. { x: 'Aug', y: '850' }
  664. ]
  665. },
  666. {
  667. name: '2k',
  668. data: [
  669. { x: 'Jan', y: '750' },
  670. { x: 'Feb', y: '3350' },
  671. { x: 'Mar', y: '1220' },
  672. { x: 'Apr', y: '1290' },
  673. { x: 'May', y: '1650' },
  674. { x: 'Jun', y: '1260' },
  675. { x: 'Jul', y: '1274' },
  676. { x: 'Aug', y: '850' }
  677. ]
  678. },
  679. {
  680. name: '3k',
  681. data: [
  682. { x: 'Jan', y: '375' },
  683. { x: 'Feb', y: '1350' },
  684. { x: 'Mar', y: '3220' },
  685. { x: 'Apr', y: '2290' },
  686. { x: 'May', y: '2650' },
  687. { x: 'Jun', y: '2260' },
  688. { x: 'Jul', y: '1274' },
  689. { x: 'Aug', y: '815' }
  690. ]
  691. },
  692. {
  693. name: '4k',
  694. data: [
  695. { x: 'Jan', y: '575' },
  696. { x: 'Feb', y: '1350' },
  697. { x: 'Mar', y: '2220' },
  698. { x: 'Apr', y: '3290' },
  699. { x: 'May', y: '3650' },
  700. { x: 'Jun', y: '2260' },
  701. { x: 'Jul', y: '1274' },
  702. { x: 'Aug', y: '315' }
  703. ]
  704. },
  705. {
  706. name: '5k',
  707. data: [
  708. { x: 'Jan', y: '875' },
  709. { x: 'Feb', y: '1350' },
  710. { x: 'Mar', y: '2220' },
  711. { x: 'Apr', y: '3290' },
  712. { x: 'May', y: '3650' },
  713. { x: 'Jun', y: '2260' },
  714. { x: 'Jul', y: '1274' },
  715. { x: 'Aug', y: '965' }
  716. ]
  717. },
  718. {
  719. name: '6k',
  720. data: [
  721. { x: 'Jan', y: '575' },
  722. { x: 'Feb', y: '1350' },
  723. { x: 'Mar', y: '2220' },
  724. { x: 'Apr', y: '2290' },
  725. { x: 'May', y: '2650' },
  726. { x: 'Jun', y: '3260' },
  727. { x: 'Jul', y: '1274' },
  728. { x: 'Aug', y: '815' }
  729. ]
  730. },
  731. {
  732. name: '7k',
  733. data: [
  734. { x: 'Jan', y: '575' },
  735. { x: 'Feb', y: '1350' },
  736. { x: 'Mar', y: '1220' },
  737. { x: 'Apr', y: '1290' },
  738. { x: 'May', y: '1650' },
  739. { x: 'Jun', y: '1260' },
  740. { x: 'Jul', y: '3274' },
  741. { x: 'Aug', y: '815' }
  742. ]
  743. },
  744. {
  745. name: '8k',
  746. data: [
  747. { x: 'Jan', y: '575' },
  748. { x: 'Feb', y: '350' },
  749. { x: 'Mar', y: '220' },
  750. { x: 'Apr', y: '290' },
  751. { x: 'May', y: '650' },
  752. { x: 'Jun', y: '260' },
  753. { x: 'Jul', y: '274' },
  754. { x: 'Aug', y: '815' }
  755. ]
  756. }
  757. ],
  758. plotOptions: {
  759. heatmap: {
  760. enableShades: false,
  761. radius: '6px',
  762. colorScale: {
  763. ranges: [
  764. {
  765. from: 0,
  766. to: 1000,
  767. name: '1k',
  768. color: heatMap1
  769. },
  770. {
  771. from: 1001,
  772. to: 2000,
  773. name: '2k',
  774. color: heatMap2
  775. },
  776. {
  777. from: 2001,
  778. to: 3000,
  779. name: '3k',
  780. color: heatMap3
  781. },
  782. {
  783. from: 3001,
  784. to: 4000,
  785. name: '4k',
  786. color: heatMap4
  787. }
  788. ]
  789. }
  790. }
  791. },
  792. dataLabels: {
  793. enabled: false
  794. },
  795. stroke: {
  796. width: 4,
  797. colors: [cardColor]
  798. },
  799. legend: {
  800. show: false
  801. },
  802. grid: {
  803. show: false,
  804. padding: {
  805. top: -10,
  806. left: 16,
  807. right: -15,
  808. bottom: 0
  809. }
  810. },
  811. xaxis: {
  812. labels: {
  813. show: true,
  814. style: {
  815. colors: labelColor,
  816. fontSize: '15px',
  817. fontFamily: fontFamily
  818. }
  819. },
  820. axisBorder: {
  821. show: false
  822. },
  823. axisTicks: {
  824. show: false
  825. }
  826. },
  827. yaxis: {
  828. labels: {
  829. style: {
  830. colors: labelColor,
  831. fontSize: '15px',
  832. fontFamily: fontFamily
  833. }
  834. }
  835. },
  836. responsive: [
  837. {
  838. breakpoint: 1441,
  839. options: {
  840. chart: {
  841. height: '325px'
  842. },
  843. grid: {
  844. padding: {
  845. right: -15
  846. }
  847. }
  848. }
  849. },
  850. {
  851. breakpoint: 1045,
  852. options: {
  853. chart: {
  854. height: '300px'
  855. },
  856. grid: {
  857. padding: {
  858. right: -50
  859. }
  860. }
  861. }
  862. },
  863. {
  864. breakpoint: 992,
  865. options: {
  866. chart: {
  867. height: '320px'
  868. },
  869. grid: {
  870. padding: {
  871. right: -50
  872. }
  873. }
  874. }
  875. },
  876. {
  877. breakpoint: 767,
  878. options: {
  879. chart: {
  880. height: '400px'
  881. },
  882. grid: {
  883. padding: {
  884. right: 0
  885. }
  886. }
  887. }
  888. },
  889. {
  890. breakpoint: 568,
  891. options: {
  892. chart: {
  893. height: '330px'
  894. },
  895. grid: {
  896. padding: {
  897. right: -20
  898. }
  899. }
  900. }
  901. }
  902. ],
  903. states: {
  904. hover: {
  905. filter: {
  906. type: 'none'
  907. }
  908. },
  909. active: {
  910. filter: {
  911. type: 'none'
  912. }
  913. }
  914. }
  915. };
  916. if (typeof salesAnalyticsChartEl !== undefined && salesAnalyticsChartEl !== null) {
  917. const salesAnalyticsChart = new ApexCharts(salesAnalyticsChartEl, salesAnalyticsChartConfig);
  918. salesAnalyticsChart.render();
  919. }
  920. // Sale Stats - Radial Bar Chart
  921. // --------------------------------------------------------------------
  922. const salesStatsEl = document.querySelector('#salesStats'),
  923. salesStatsOptions = {
  924. chart: {
  925. height: 315,
  926. type: 'radialBar'
  927. },
  928. series: [75],
  929. labels: ['Sales'],
  930. plotOptions: {
  931. radialBar: {
  932. startAngle: 0,
  933. endAngle: 360,
  934. strokeWidth: '70',
  935. hollow: {
  936. margin: 50,
  937. size: '75%',
  938. image: assetsPath + 'img/icons/misc/arrow-star.png',
  939. imageWidth: 65,
  940. imageHeight: 55,
  941. imageOffsetY: -35,
  942. imageClipped: false
  943. },
  944. track: {
  945. strokeWidth: '50%',
  946. background: borderColor
  947. },
  948. dataLabels: {
  949. show: true,
  950. name: {
  951. offsetY: 60,
  952. show: true,
  953. color: legendColor,
  954. fontSize: '15px',
  955. fontFamily: fontFamily
  956. },
  957. value: {
  958. formatter: function (val) {
  959. return parseInt(val) + '%';
  960. },
  961. offsetY: 20,
  962. color: headingColor,
  963. fontSize: '28px',
  964. fontWeight: '500',
  965. fontFamily: fontFamily,
  966. show: true
  967. }
  968. }
  969. }
  970. },
  971. fill: {
  972. type: 'solid',
  973. colors: config.colors.success
  974. },
  975. stroke: {
  976. lineCap: 'round'
  977. },
  978. states: {
  979. hover: {
  980. filter: {
  981. type: 'none'
  982. }
  983. },
  984. active: {
  985. filter: {
  986. type: 'none'
  987. }
  988. }
  989. }
  990. };
  991. if (typeof salesStatsEl !== undefined && salesStatsEl !== null) {
  992. const salesStats = new ApexCharts(salesStatsEl, salesStatsOptions);
  993. salesStats.render();
  994. }
  995. });