| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003 |
- /**
- * Card Analytics
- */
-
- 'use strict';
-
- (function () {
- let cardColor, headingColor, labelColor, fontFamily, borderColor, legendColor, heatMap1, heatMap2, heatMap3, heatMap4;
-
- if (isDarkStyle) {
- heatMap1 = '#333457';
- heatMap2 = '#3c3e75';
- heatMap3 = '#484b9b';
- heatMap4 = '#696cff';
- } else {
- heatMap1 = '#ededff';
- heatMap2 = '#d5d6ff';
- heatMap3 = '#b7b9ff';
- heatMap4 = '#696cff';
- }
- cardColor = config.colors.cardColor;
- headingColor = config.colors.headingColor;
- labelColor = config.colors.textMuted;
- borderColor = config.colors.borderColor;
- legendColor = config.colors.bodyColor;
- fontFamily = config.fontFamily;
-
- // Chart Colors
- const chartColors = {
- donut: {
- series1: '#5AB12C',
- series2: '#66C732',
- series3: '#8DE45F',
- series4: '#C6F1AF'
- },
- line: {
- series1: config.colors.warning,
- series2: config.colors.primary,
- series3: '#7367f029'
- }
- };
-
- // Customer Ratings - Line Charts
- // --------------------------------------------------------------------
- const customerRatingsChartEl = document.querySelector('#customerRatingsChart'),
- customerRatingsChartOptions = {
- chart: {
- height: 212,
- toolbar: { show: false },
- zoom: { enabled: false },
- type: 'line',
- dropShadow: {
- enabled: true,
- enabledOnSeries: [1],
- top: 13,
- left: 4,
- blur: 3,
- color: config.colors.primary,
- opacity: 0.09
- }
- },
- series: [
- {
- name: 'Last Month',
- data: [20, 54, 20, 38, 22, 28, 16, 19, 11]
- },
- {
- name: 'This Month',
- data: [20, 32, 22, 65, 40, 46, 34, 70, 75]
- }
- ],
- stroke: {
- curve: 'smooth',
- dashArray: [8, 0],
- width: [3, 4]
- },
- legend: {
- show: false
- },
- colors: [borderColor, config.colors.primary],
- grid: {
- show: false,
- borderColor: borderColor,
- padding: {
- top: -20,
- bottom: -10,
- left: 0
- }
- },
- markers: {
- size: 6,
- colors: 'transparent',
- strokeColors: 'transparent',
- strokeWidth: 5,
- hover: {
- size: 6
- },
- discrete: [
- {
- fillColor: config.colors.white,
- seriesIndex: 1,
- dataPointIndex: 8,
- strokeColor: config.colors.primary,
- size: 6
- },
- {
- fillColor: config.colors.white,
- seriesIndex: 1,
- dataPointIndex: 3,
- strokeColor: config.colors.black,
- size: 6
- }
- ],
- offsetX: -3
- },
- xaxis: {
- labels: {
- style: {
- colors: labelColor,
- fontSize: '13px'
- }
- },
- axisTicks: {
- show: false
- },
- categories: [' ', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', ' '],
- axisBorder: {
- show: false
- }
- },
- yaxis: {
- show: false
- }
- };
- if (typeof customerRatingsChartEl !== undefined && customerRatingsChartEl !== null) {
- const customerRatingsChart = new ApexCharts(customerRatingsChartEl, customerRatingsChartOptions);
- customerRatingsChart.render();
- }
-
- // Sale Stats - Radial Bar Chart
- // --------------------------------------------------------------------
- const salesStatsEl = document.querySelector('#salesStats'),
- salesStatsOptions = {
- chart: {
- height: 276,
- type: 'radialBar'
- },
- series: [75],
- labels: ['Sales'],
- plotOptions: {
- radialBar: {
- startAngle: 0,
- endAngle: 360,
- strokeWidth: '70',
- hollow: {
- margin: 50,
- size: '75%',
- image: assetsPath + 'img/icons/misc/arrow-star.png',
- imageWidth: 65,
- imageHeight: 55,
- imageOffsetY: -35,
- imageClipped: false
- },
- track: {
- strokeWidth: '50%',
- background: borderColor
- },
- dataLabels: {
- show: true,
- name: {
- offsetY: 60,
- show: true,
- color: legendColor,
- fontSize: '15px',
- fontFamily: fontFamily
- },
- value: {
- formatter: function (val) {
- return parseInt(val) + '%';
- },
- offsetY: 20,
- color: headingColor,
- fontSize: '28px',
- fontWeight: '500',
- fontFamily: fontFamily,
- show: true
- }
- }
- }
- },
- fill: {
- type: 'solid',
- colors: config.colors.success
- },
- stroke: {
- lineCap: 'round'
- },
- states: {
- hover: {
- filter: {
- type: 'none'
- }
- },
- active: {
- filter: {
- type: 'none'
- }
- }
- }
- };
- if (typeof salesStatsEl !== undefined && salesStatsEl !== null) {
- const salesStats = new ApexCharts(salesStatsEl, salesStatsOptions);
- salesStats.render();
- }
-
- // Sales Analytics - Heat map chart
- // --------------------------------------------------------------------
- const salesAnalyticsChartEl = document.querySelector('#salesAnalyticsChart'),
- salesAnalyticsChartConfig = {
- chart: {
- height: 350,
- type: 'heatmap',
- parentHeightOffset: 0,
- offsetX: -10,
- offsetY: -15,
- toolbar: {
- show: false
- }
- },
- series: [
- {
- name: '1k',
- data: [
- { x: 'Jan', y: '250' },
- { x: 'Feb', y: '350' },
- { x: 'Mar', y: '220' },
- { x: 'Apr', y: '290' },
- { x: 'May', y: '650' },
- { x: 'Jun', y: '260' },
- { x: 'Jul', y: '274' },
- { x: 'Aug', y: '850' }
- ]
- },
- {
- name: '2k',
- data: [
- { x: 'Jan', y: '750' },
- { x: 'Feb', y: '3350' },
- { x: 'Mar', y: '1220' },
- { x: 'Apr', y: '1290' },
- { x: 'May', y: '1650' },
- { x: 'Jun', y: '1260' },
- { x: 'Jul', y: '1274' },
- { x: 'Aug', y: '850' }
- ]
- },
- {
- name: '3k',
- data: [
- { x: 'Jan', y: '375' },
- { x: 'Feb', y: '1350' },
- { x: 'Mar', y: '3220' },
- { x: 'Apr', y: '2290' },
- { x: 'May', y: '2650' },
- { x: 'Jun', y: '2260' },
- { x: 'Jul', y: '1274' },
- { x: 'Aug', y: '815' }
- ]
- },
- {
- name: '4k',
- data: [
- { x: 'Jan', y: '575' },
- { x: 'Feb', y: '1350' },
- { x: 'Mar', y: '2220' },
- { x: 'Apr', y: '3290' },
- { x: 'May', y: '3650' },
- { x: 'Jun', y: '2260' },
- { x: 'Jul', y: '1274' },
- { x: 'Aug', y: '315' }
- ]
- },
- {
- name: '5k',
- data: [
- { x: 'Jan', y: '875' },
- { x: 'Feb', y: '1350' },
- { x: 'Mar', y: '2220' },
- { x: 'Apr', y: '3290' },
- { x: 'May', y: '3650' },
- { x: 'Jun', y: '2260' },
- { x: 'Jul', y: '1274' },
- { x: 'Aug', y: '965' }
- ]
- },
- {
- name: '6k',
- data: [
- { x: 'Jan', y: '575' },
- { x: 'Feb', y: '1350' },
- { x: 'Mar', y: '2220' },
- { x: 'Apr', y: '2290' },
- { x: 'May', y: '2650' },
- { x: 'Jun', y: '3260' },
- { x: 'Jul', y: '1274' },
- { x: 'Aug', y: '815' }
- ]
- },
- {
- name: '7k',
- data: [
- { x: 'Jan', y: '575' },
- { x: 'Feb', y: '1350' },
- { x: 'Mar', y: '1220' },
- { x: 'Apr', y: '1290' },
- { x: 'May', y: '1650' },
- { x: 'Jun', y: '1260' },
- { x: 'Jul', y: '3274' },
- { x: 'Aug', y: '815' }
- ]
- },
- {
- name: '8k',
- data: [
- { x: 'Jan', y: '575' },
- { x: 'Feb', y: '350' },
- { x: 'Mar', y: '220' },
- { x: 'Apr', y: '290' },
- { x: 'May', y: '650' },
- { x: 'Jun', y: '260' },
- { x: 'Jul', y: '274' },
- { x: 'Aug', y: '815' }
- ]
- }
- ],
- plotOptions: {
- heatmap: {
- enableShades: false,
- radius: '6px',
- colorScale: {
- ranges: [
- {
- from: 0,
- to: 1000,
- name: '1k',
- color: heatMap1
- },
- {
- from: 1001,
- to: 2000,
- name: '2k',
- color: heatMap2
- },
- {
- from: 2001,
- to: 3000,
- name: '3k',
- color: heatMap3
- },
- {
- from: 3001,
- to: 4000,
- name: '4k',
- color: heatMap4
- }
- ]
- }
- }
- },
- dataLabels: {
- enabled: false
- },
- stroke: {
- width: 4,
- colors: [cardColor]
- },
- legend: {
- show: false
- },
- grid: {
- show: false,
- padding: {
- top: -15,
- left: 16,
- bottom: -7
- }
- },
- xaxis: {
- labels: {
- show: true,
- style: {
- colors: labelColor,
- fontSize: '15px',
- fontFamily: fontFamily
- }
- },
- axisBorder: {
- show: false
- },
- axisTicks: {
- show: false
- }
- },
- yaxis: {
- labels: {
- style: {
- colors: labelColor,
- fontSize: '15px',
- fontFamily: fontFamily
- }
- }
- },
- responsive: [
- {
- breakpoint: 1441,
- options: {
- chart: {
- height: '325px'
- },
- grid: {
- padding: {
- right: -15
- }
- }
- }
- },
- {
- breakpoint: 1045,
- options: {
- chart: {
- height: '300px'
- },
- grid: {
- padding: {
- right: -50
- }
- }
- }
- },
- {
- breakpoint: 992,
- options: {
- chart: {
- height: '320px'
- },
- grid: {
- padding: {
- right: -50
- }
- }
- }
- },
- {
- breakpoint: 767,
- options: {
- chart: {
- height: '400px'
- },
- grid: {
- padding: {
- right: 0
- }
- }
- }
- },
- {
- breakpoint: 568,
- options: {
- chart: {
- height: '330px'
- },
- grid: {
- padding: {
- right: -20
- }
- }
- }
- }
- ],
- states: {
- hover: {
- filter: {
- type: 'none'
- }
- },
- active: {
- filter: {
- type: 'none'
- }
- }
- }
- };
- if (typeof salesAnalyticsChartEl !== undefined && salesAnalyticsChartEl !== null) {
- const salesAnalyticsChart = new ApexCharts(salesAnalyticsChartEl, salesAnalyticsChartConfig);
- salesAnalyticsChart.render();
- }
-
- // Overview & Sales Activity - Staked Bar Chart
- // --------------------------------------------------------------------
- const salesActivityChartEl = document.querySelector('#salesActivityChart'),
- salesActivityChartConfig = {
- chart: {
- type: 'bar',
- height: 235,
- stacked: true,
- toolbar: {
- show: false
- }
- },
- series: [
- {
- name: 'PRODUCT A',
- data: [75, 50, 55, 60, 48, 82, 59]
- },
- {
- name: 'PRODUCT B',
- data: [25, 29, 32, 35, 34, 18, 30]
- }
- ],
- plotOptions: {
- bar: {
- horizontal: false,
- columnWidth: '40%',
- borderRadius: 9,
- startingShape: 'rounded',
- endingShape: 'rounded',
- borderRadiusApplication: 'around'
- }
- },
- dataLabels: {
- enabled: false
- },
- stroke: {
- curve: 'smooth',
- width: 6,
- lineCap: 'round',
- colors: [cardColor]
- },
- legend: {
- show: false
- },
- colors: [config.colors.danger, config.colors.secondary],
- fill: {
- opacity: 1
- },
- grid: {
- show: false,
- strokeDashArray: 7,
- padding: {
- top: -40,
- left: 0,
- right: 0
- }
- },
- xaxis: {
- categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
- labels: {
- show: true,
- style: {
- colors: labelColor,
- fontSize: '15px',
- fontFamily: fontFamily
- }
- },
- axisBorder: {
- show: false
- },
- axisTicks: {
- show: false
- }
- },
- yaxis: {
- show: false
- },
- responsive: [
- {
- breakpoint: 1440,
- options: {
- plotOptions: {
- bar: {
- borderRadius: 10,
- columnWidth: '50%'
- }
- }
- }
- },
- {
- breakpoint: 1300,
- options: {
- plotOptions: {
- bar: {
- borderRadius: 11,
- columnWidth: '55%'
- }
- }
- }
- },
- {
- breakpoint: 1200,
- options: {
- plotOptions: {
- bar: {
- borderRadius: 10,
- columnWidth: '45%'
- }
- }
- }
- },
- {
- breakpoint: 1040,
- options: {
- plotOptions: {
- bar: {
- borderRadius: 10,
- columnWidth: '50%'
- }
- }
- }
- },
- {
- breakpoint: 992,
- options: {
- plotOptions: {
- bar: {
- borderRadius: 12,
- columnWidth: '40%'
- }
- },
- chart: {
- type: 'bar',
- height: 320
- }
- }
- },
- {
- breakpoint: 768,
- options: {
- plotOptions: {
- bar: {
- borderRadius: 11,
- columnWidth: '25%'
- }
- }
- }
- },
- {
- breakpoint: 576,
- options: {
- plotOptions: {
- bar: {
- borderRadius: 10,
- columnWidth: '35%'
- }
- }
- }
- },
- {
- breakpoint: 440,
- options: {
- plotOptions: {
- bar: {
- borderRadius: 10,
- columnWidth: '45%'
- }
- }
- }
- },
- {
- breakpoint: 360,
- options: {
- plotOptions: {
- bar: {
- borderRadius: 8,
- columnWidth: '50%'
- }
- }
- }
- }
- ],
- states: {
- hover: {
- filter: {
- type: 'none'
- }
- },
- active: {
- filter: {
- type: 'none'
- }
- }
- }
- };
- if (typeof salesActivityChartEl !== undefined && salesActivityChartEl !== null) {
- const salesActivityChart = new ApexCharts(salesActivityChartEl, salesActivityChartConfig);
- salesActivityChart.render();
- }
-
- // Total Income - Area Chart
- // --------------------------------------------------------------------
- const totalIncomeEl = document.querySelector('#totalIncomeChart'),
- totalIncomeConfig = {
- chart: {
- height: 250,
- type: 'area',
- toolbar: false,
- dropShadow: {
- enabled: true,
- top: 14,
- left: 2,
- blur: 3,
- color: config.colors.primary,
- opacity: 0.15
- }
- },
- series: [
- {
- data: [3350, 3350, 4800, 4800, 2950, 2950, 1800, 1800, 3750, 3750, 5700, 5700]
- }
- ],
- dataLabels: {
- enabled: false
- },
- stroke: {
- width: 3,
- curve: 'straight'
- },
- colors: [config.colors.primary],
- fill: {
- type: 'gradient',
- gradient: {
- shadeIntensity: 1,
- opacityFrom: 0.3,
- gradientToColors: [config.colors.cardColor],
- opacityTo: 0.3,
- stops: [0, 100]
- }
- },
- grid: {
- show: true,
- strokeDashArray: 10,
- borderColor: borderColor,
- padding: {
- top: -15,
- bottom: -10,
- left: 0,
- right: 0
- }
- },
- xaxis: {
- categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
- labels: {
- offsetX: 0,
- style: {
- colors: labelColor,
- fontFamily: fontFamily,
- fontSize: '13px'
- }
- },
- axisBorder: {
- show: false
- },
- axisTicks: {
- show: false
- },
- lines: {
- show: false
- }
- },
- yaxis: {
- labels: {
- offsetX: -15,
- formatter: function (val) {
- return '$' + parseInt(val / 1000) + 'k';
- },
- style: {
- fontSize: '13px',
- fontFamily: fontFamily,
- colors: labelColor
- }
- },
- min: 1000,
- max: 6000,
- tickAmount: 5
- }
- };
- if (typeof totalIncomeEl !== undefined && totalIncomeEl !== null) {
- const totalIncome = new ApexCharts(totalIncomeEl, totalIncomeConfig);
- totalIncome.render();
- }
-
- // Income Chart - Area chart
- // --------------------------------------------------------------------
- const incomeChartEl = document.querySelector('#incomeChart'),
- incomeChartConfig = {
- series: [
- {
- data: [21, 30, 22, 42, 26, 35, 29]
- }
- ],
- chart: {
- height: 200,
- parentHeightOffset: 0,
- parentWidthOffset: 0,
- toolbar: {
- show: false
- },
- type: 'area'
- },
- dataLabels: {
- enabled: false
- },
- stroke: {
- width: 3,
- curve: 'smooth'
- },
- legend: {
- show: false
- },
- markers: {
- size: 6,
- colors: 'transparent',
- strokeColors: 'transparent',
- strokeWidth: 4,
- discrete: [
- {
- fillColor: config.colors.white,
- seriesIndex: 0,
- dataPointIndex: 6,
- strokeColor: config.colors.primary,
- strokeWidth: 2,
- size: 6,
- radius: 8
- }
- ],
- offsetX: -1,
- hover: {
- size: 7
- }
- },
- colors: [config.colors.primary],
- fill: {
- type: 'gradient',
- gradient: {
- shadeIntensity: 1,
- opacityFrom: 0.3,
- gradientToColors: [config.colors.cardColor],
- opacityTo: 0.3,
- stops: [0, 100]
- }
- },
- grid: {
- borderColor: borderColor,
- strokeDashArray: 8,
- padding: {
- top: -20,
- bottom: -8,
- left: 0,
- right: 8
- }
- },
- xaxis: {
- categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
- axisBorder: {
- show: false
- },
- axisTicks: {
- show: false
- },
- labels: {
- show: true,
- style: {
- fontSize: '13px',
- colors: labelColor
- }
- }
- },
- yaxis: {
- labels: {
- show: false
- },
- min: 10,
- max: 50,
- tickAmount: 4
- }
- };
- if (typeof incomeChartEl !== undefined && incomeChartEl !== null) {
- const incomeChart = new ApexCharts(incomeChartEl, incomeChartConfig);
- incomeChart.render();
- }
-
- // Expenses Mini Chart - Radial Chart
- // --------------------------------------------------------------------
- const weeklyExpensesEl = document.querySelector('#expensesOfWeek'),
- weeklyExpensesConfig = {
- series: [65],
- chart: {
- width: 60,
- height: 60,
- type: 'radialBar'
- },
- plotOptions: {
- radialBar: {
- startAngle: 0,
- endAngle: 360,
- strokeWidth: '8',
- hollow: {
- margin: 2,
- size: '40%'
- },
- track: {
- background: borderColor
- },
- dataLabels: {
- show: true,
- name: {
- show: false
- },
- value: {
- formatter: function (val) {
- return '$' + parseInt(val);
- },
- offsetY: 5,
- color: legendColor,
- fontSize: '12px',
- fontFamily: fontFamily,
- show: true
- }
- }
- }
- },
- fill: {
- type: 'solid',
- colors: config.colors.primary
- },
- stroke: {
- lineCap: 'round'
- },
- grid: {
- padding: {
- top: -10,
- bottom: -15,
- left: -10,
- right: -10
- }
- },
- states: {
- hover: {
- filter: {
- type: 'none'
- }
- },
- active: {
- filter: {
- type: 'none'
- }
- }
- }
- };
- if (typeof weeklyExpensesEl !== undefined && weeklyExpensesEl !== null) {
- const weeklyExpenses = new ApexCharts(weeklyExpensesEl, weeklyExpensesConfig);
- weeklyExpenses.render();
- }
-
- // Performance - Radar Chart
- // --------------------------------------------------------------------
- const performanceChartEl = document.querySelector('#performanceChart'),
- performanceChartConfig = {
- series: [
- {
- name: 'Income',
- data: [26, 29, 31, 40, 29, 24]
- },
- {
- name: 'Earning',
- data: [30, 26, 24, 26, 24, 40]
- }
- ],
- chart: {
- height: 310,
- type: 'radar',
- toolbar: {
- show: false
- },
- dropShadow: {
- enabled: true,
- enabledOnSeries: undefined,
- top: 6,
- left: 0,
- blur: 6,
- color: '#000',
- opacity: 0.14
- }
- },
- plotOptions: {
- radar: {
- polygons: {
- strokeColors: borderColor,
- connectorColors: borderColor
- }
- }
- },
- stroke: {
- show: false,
- width: 0
- },
- legend: {
- show: true,
- fontSize: '13px',
- position: 'bottom',
- labels: {
- colors: legendColor,
- useSeriesColors: false
- },
- markers: {
- height: 10,
- width: 10,
- offsetX: -5
- },
- itemMargin: {
- horizontal: 10
- },
- onItemHover: {
- highlightDataSeries: false
- }
- },
- colors: [config.colors.primary, config.colors.info],
- fill: {
- opacity: [1, 0.85]
- },
- markers: {
- size: 0
- },
- grid: {
- show: false,
- padding: {
- top: -8,
- bottom: -5
- }
- },
- xaxis: {
- categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],
- labels: {
- show: true,
- style: {
- colors: [labelColor, labelColor, labelColor, labelColor, labelColor, labelColor],
- fontSize: '13px',
- fontFamily: fontFamily
- }
- }
- },
- yaxis: {
- show: false,
- min: 0,
- max: 40,
- tickAmount: 4
- }
- };
- if (typeof performanceChartEl !== undefined && performanceChartEl !== null) {
- const performanceChart = new ApexCharts(performanceChartEl, performanceChartConfig);
- performanceChart.render();
- }
-
- // Total Balance - Line Chart
- // --------------------------------------------------------------------
- const totalBalanceChartEl = document.querySelector('#totalBalanceChart'),
- totalBalanceChartConfig = {
- series: [
- {
- data: [137, 210, 160, 275, 205, 315]
- }
- ],
- chart: {
- height: 245,
- parentHeightOffset: 0,
- parentWidthOffset: 0,
- type: 'line',
- dropShadow: {
- enabled: true,
- top: 10,
- left: 5,
- blur: 3,
- color: config.colors.warning,
- opacity: 0.15
- },
- toolbar: {
- show: false
- }
- },
- dataLabels: {
- enabled: false
- },
- stroke: {
- width: 4,
- curve: 'smooth'
- },
- legend: {
- show: false
- },
- colors: [config.colors.warning],
- markers: {
- size: 6,
- colors: 'transparent',
- strokeColors: 'transparent',
- strokeWidth: 4,
- discrete: [
- {
- fillColor: config.colors.white,
- seriesIndex: 0,
- dataPointIndex: 5,
- strokeColor: config.colors.warning,
- strokeWidth: 8,
- size: 6,
- radius: 8
- }
- ],
- hover: {
- size: 9
- }
- },
- grid: {
- show: false,
- padding: {
- top: -10,
- left: 0,
- right: 0,
- bottom: 10
- }
- },
- xaxis: {
- categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],
- axisBorder: {
- show: false
- },
- axisTicks: {
- show: false
- },
- labels: {
- show: true,
- style: {
- fontSize: '13px',
- fontFamily: fontFamily,
- colors: labelColor
- }
- }
- },
- yaxis: {
- labels: {
- show: false
- }
- }
- };
- if (typeof totalBalanceChartEl !== undefined && totalBalanceChartEl !== null) {
- const totalBalanceChart = new ApexCharts(totalBalanceChartEl, totalBalanceChartConfig);
- totalBalanceChart.render();
- }
-
- // Session Overview Chart - Radial Bar
- // --------------------------------------------------------------------
- const sessionOverviewChartEl = document.querySelector('#sessionOverviewChart'),
- sessionOverviewChartOptions = {
- series: [78],
- labels: ['Loss Rate'],
- chart: {
- height: 175,
- type: 'radialBar'
- },
- colors: [config.colors.warning],
- plotOptions: {
- radialBar: {
- offsetY: 0,
- startAngle: -140,
- endAngle: 140,
- hollow: {
- size: '70%'
- },
- track: {
- strokeWidth: '60%',
- background: borderColor
- },
-
- dataLabels: {
- name: {
- offsetY: 55,
- color: labelColor,
- fontSize: '13px',
- fontFamily: fontFamily
- },
- value: {
- offsetY: -10,
- color: headingColor,
- fontSize: '24px',
- fontWeight: '500',
- fontFamily: fontFamily
- }
- }
- }
- },
- stroke: {
- lineCap: 'round'
- },
- states: {
- hover: {
- filter: {
- type: 'none'
- }
- },
- active: {
- filter: {
- type: 'none'
- }
- }
- }
- };
- if (typeof sessionOverviewChartEl !== undefined && sessionOverviewChartEl !== null) {
- const sessionOverviewChart = new ApexCharts(sessionOverviewChartEl, sessionOverviewChartOptions);
- sessionOverviewChart.render();
- }
-
- // Score Chart - Radial Bar Chart
- // --------------------------------------------------------------------
- const scoreChartEl = document.querySelector('#scoreChart'),
- scoreChartOptions = {
- series: [78],
- labels: ['Out of 100'],
- chart: {
- height: 220,
- type: 'radialBar'
- },
- plotOptions: {
- radialBar: {
- size: 150,
- offsetY: 10,
- startAngle: -150,
- endAngle: 150,
- hollow: {
- size: '55%'
- },
- track: {
- background: cardColor,
- strokeWidth: '100%'
- },
- dataLabels: {
- name: {
- offsetY: 15,
- color: legendColor,
- fontSize: '15px',
- fontFamily: fontFamily
- },
- value: {
- offsetY: -20,
- color: headingColor,
- fontSize: '24px',
- fontWeight: '500',
- fontFamily: fontFamily
- }
- }
- }
- },
- colors: [config.colors.primary],
- fill: {
- type: 'gradient',
- gradient: {
- shade: 'dark',
- shadeIntensity: 0.5,
- gradientToColors: [config.colors.primary],
- inverseColors: true,
- opacityFrom: 1,
- opacityTo: 0.6,
- stops: [30, 70, 100]
- }
- },
- stroke: {
- dashArray: 5
- },
- grid: {
- padding: {
- top: -35,
- bottom: -10
- }
- },
- responsive: [
- {
- breakpoint: 991,
- options: {
- chart: {
- height: '350px'
- }
- }
- }
- ],
- states: {
- hover: {
- filter: {
- type: 'none'
- }
- },
- active: {
- filter: {
- type: 'none'
- }
- }
- }
- };
- if (typeof scoreChartEl !== undefined && scoreChartEl !== null) {
- const scoreChart = new ApexCharts(scoreChartEl, scoreChartOptions);
- scoreChart.render();
- }
-
- // Total Revenue Report Chart - Bar Chart
- // --------------------------------------------------------------------
- const totalRevenueChartEl = document.querySelector('#totalRevenueChart'),
- totalRevenueChartOptions = {
- series: [
- {
- name: new Date().getFullYear() - 1,
- data: [18, 7, 15, 29, 18, 12, 9]
- },
- {
- name: new Date().getFullYear() - 2,
- data: [-13, -18, -9, -14, -8, -17, -15]
- }
- ],
- chart: {
- height: 300,
- stacked: true,
- type: 'bar',
- toolbar: { show: false }
- },
- plotOptions: {
- bar: {
- horizontal: false,
- columnWidth: '30%',
- borderRadius: 8,
- startingShape: 'rounded',
- endingShape: 'rounded',
- borderRadiusApplication: 'around'
- }
- },
- colors: [config.colors.primary, config.colors.info],
- dataLabels: {
- enabled: false
- },
- stroke: {
- curve: 'smooth',
- width: 6,
- lineCap: 'round',
- colors: [cardColor]
- },
- legend: {
- show: true,
- horizontalAlign: 'left',
- position: 'top',
- markers: {
- height: 8,
- width: 8,
- radius: 12,
- shape: 'circle',
- offsetX: -5
- },
- fontSize: '13px',
- fontFamily: fontFamily,
- fontWeight: 400,
- labels: {
- colors: legendColor,
- useSeriesColors: false
- },
- itemMargin: {
- horizontal: 10
- }
- },
- grid: {
- strokeDashArray: 7,
- borderColor: borderColor,
- padding: {
- top: 0,
- bottom: -8,
- left: 20,
- right: 20
- }
- },
- fill: {
- opacity: [1, 1]
- },
- xaxis: {
- categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
- labels: {
- style: {
- fontSize: '13px',
- fontFamily: fontFamily,
- colors: labelColor
- }
- },
- axisTicks: {
- show: false
- },
- axisBorder: {
- show: false
- }
- },
- yaxis: {
- labels: {
- style: {
- fontSize: '13px',
- fontFamily: fontFamily,
- colors: labelColor
- }
- }
- },
- responsive: [
- {
- breakpoint: 1700,
- options: {
- plotOptions: {
- bar: {
- borderRadius: 10,
- columnWidth: '35%'
- }
- }
- }
- },
- {
- breakpoint: 1440,
- options: {
- plotOptions: {
- bar: {
- borderRadius: 12,
- columnWidth: '43%'
- }
- }
- }
- },
- {
- breakpoint: 1300,
- options: {
- plotOptions: {
- bar: {
- borderRadius: 11,
- columnWidth: '45%'
- }
- }
- }
- },
- {
- breakpoint: 1200,
- options: {
- plotOptions: {
- bar: {
- borderRadius: 11,
- columnWidth: '37%'
- }
- }
- }
- },
- {
- breakpoint: 1040,
- options: {
- plotOptions: {
- bar: {
- borderRadius: 12,
- columnWidth: '45%'
- }
- }
- }
- },
- {
- breakpoint: 991,
- options: {
- plotOptions: {
- bar: {
- borderRadius: 12,
- columnWidth: '33%'
- }
- }
- }
- },
- {
- breakpoint: 768,
- options: {
- plotOptions: {
- bar: {
- borderRadius: 11,
- columnWidth: '28%'
- }
- }
- }
- },
- {
- breakpoint: 640,
- options: {
- plotOptions: {
- bar: {
- borderRadius: 11,
- columnWidth: '30%'
- }
- }
- }
- },
- {
- breakpoint: 576,
- options: {
- plotOptions: {
- bar: {
- borderRadius: 10,
- columnWidth: '38%'
- }
- }
- }
- },
- {
- breakpoint: 440,
- options: {
- plotOptions: {
- bar: {
- borderRadius: 10,
- columnWidth: '50%'
- }
- }
- }
- },
- {
- breakpoint: 380,
- options: {
- plotOptions: {
- bar: {
- borderRadius: 9,
- columnWidth: '60%'
- }
- }
- }
- }
- ],
- states: {
- hover: {
- filter: {
- type: 'none'
- }
- },
- active: {
- filter: {
- type: 'none'
- }
- }
- }
- };
- if (typeof totalRevenueChartEl !== undefined && totalRevenueChartEl !== null) {
- const totalRevenueChart = new ApexCharts(totalRevenueChartEl, totalRevenueChartOptions);
- totalRevenueChart.render();
- }
-
- // Growth Chart - Radial Bar Chart
- // --------------------------------------------------------------------
- const growthChartEl = document.querySelector('#growthChart'),
- growthChartOptions = {
- series: [78],
- labels: ['Growth'],
- chart: {
- height: 210,
- type: 'radialBar'
- },
- plotOptions: {
- radialBar: {
- size: 150,
- offsetY: 10,
- startAngle: -150,
- endAngle: 150,
- hollow: {
- size: '55%'
- },
- track: {
- background: cardColor,
- strokeWidth: '100%'
- },
- dataLabels: {
- name: {
- offsetY: 15,
- color: legendColor,
- fontSize: '15px',
- fontWeight: '500',
- fontFamily: fontFamily
- },
- value: {
- offsetY: -25,
- color: headingColor,
- fontSize: '22px',
- fontWeight: '500',
- fontFamily: fontFamily
- }
- }
- }
- },
- colors: [config.colors.primary],
- fill: {
- type: 'gradient',
- gradient: {
- shade: 'dark',
- shadeIntensity: 0.5,
- gradientToColors: [config.colors.primary],
- inverseColors: true,
- opacityFrom: 1,
- opacityTo: 0.6,
- stops: [30, 70, 100]
- }
- },
- stroke: {
- dashArray: 5
- },
- grid: {
- padding: {
- top: -35,
- bottom: -10
- }
- },
- states: {
- hover: {
- filter: {
- type: 'none'
- }
- },
- active: {
- filter: {
- type: 'none'
- }
- }
- }
- };
- if (typeof growthChartEl !== undefined && growthChartEl !== null) {
- const growthChart = new ApexCharts(growthChartEl, growthChartOptions);
- growthChart.render();
- }
- // datatbale horizontalBar chart
-
- const horizontalBarChartEl = document.querySelector('#horizontalBarChart'),
- horizontalBarChartConfig = {
- chart: {
- height: 360,
- type: 'bar',
- toolbar: {
- show: false
- }
- },
- plotOptions: {
- bar: {
- horizontal: true,
- barHeight: '60%',
- distributed: true,
- startingShape: 'rounded',
- borderRadiusApplication: 'end',
- borderRadius: 7
- }
- },
- grid: {
- strokeDashArray: 10,
- borderColor: borderColor,
- xaxis: {
- lines: {
- show: true
- }
- },
- yaxis: {
- lines: {
- show: false
- }
- },
- padding: {
- top: -35,
- bottom: -12
- }
- },
-
- colors: [
- config.colors.primary,
- config.colors.info,
- config.colors.success,
- config.colors.secondary,
- config.colors.danger,
- config.colors.warning
- ],
- fill: {
- opacity: [1, 1, 1, 1, 1, 1]
- },
- dataLabels: {
- enabled: true,
- style: {
- colors: ['#fff'],
- fontWeight: 400,
- fontSize: '13px',
- fontFamily: fontFamily
- },
- formatter: function (val, opts) {
- return horizontalBarChartConfig.labels[opts.dataPointIndex];
- },
- offsetX: 0,
- dropShadow: {
- enabled: false
- }
- },
- labels: ['UI Design', 'UX Design', 'Music', 'Animation', 'React', 'SEO'],
- series: [
- {
- data: [35, 20, 14, 12, 10, 9]
- }
- ],
-
- xaxis: {
- categories: ['6', '5', '4', '3', '2', '1'],
- axisBorder: {
- show: false
- },
- axisTicks: {
- show: false
- },
- labels: {
- style: {
- colors: labelColor,
- fontFamily: fontFamily,
- fontSize: '13px'
- },
- formatter: function (val) {
- return `${val}%`;
- }
- }
- },
- yaxis: {
- max: 35,
- labels: {
- style: {
- colors: [labelColor],
- fontFamily: fontFamily,
- fontSize: '13px'
- }
- }
- },
- tooltip: {
- enabled: true,
- style: {
- fontSize: '12px'
- },
- onDatasetHover: {
- highlightDataSeries: false
- },
- custom: function ({ series, seriesIndex, dataPointIndex, w }) {
- return '<div class="px-3 py-2">' + '<span>' + series[seriesIndex][dataPointIndex] + '%</span>' + '</div>';
- }
- },
- legend: {
- show: false
- }
- };
- if (typeof horizontalBarChartEl !== undefined && horizontalBarChartEl !== null) {
- const horizontalBarChart = new ApexCharts(horizontalBarChartEl, horizontalBarChartConfig);
- horizontalBarChart.render();
- }
-
- // Reasons for delivery exceptions Chart
- // --------------------------------------------------------------------
- const deliveryExceptionsChartE1 = document.querySelector('#deliveryExceptionsChart'),
- deliveryExceptionsChartConfig = {
- chart: {
- height: 396,
- parentHeightOffset: 0,
- type: 'donut'
- },
- labels: ['Incorrect address', 'Weather conditions', 'Federal Holidays', 'Damage during transit'],
- series: [13, 25, 22, 40],
- colors: [
- chartColors.donut.series1,
- chartColors.donut.series2,
- chartColors.donut.series3,
- chartColors.donut.series4
- ],
- stroke: {
- width: 0
- },
- dataLabels: {
- enabled: false,
- formatter: function (val, opt) {
- return parseInt(val) + '%';
- }
- },
- legend: {
- show: true,
- position: 'bottom',
- offsetY: 10,
- markers: {
- width: 8,
- height: 8,
- offsetX: -3
- },
- itemMargin: {
- horizontal: 15,
- vertical: 5
- },
- fontSize: '13px',
- fontFamily: fontFamily,
- fontWeight: 400,
- labels: {
- colors: headingColor,
- useSeriesColors: false
- }
- },
- tooltip: {
- theme: false
- },
- grid: {
- padding: {
- top: 15
- }
- },
- plotOptions: {
- pie: {
- donut: {
- size: '75%',
- labels: {
- show: true,
- value: {
- fontSize: '24px',
- fontFamily: fontFamily,
- color: headingColor,
- fontWeight: 500,
- offsetY: -20,
- formatter: function (val) {
- return parseInt(val) + '%';
- }
- },
- name: {
- offsetY: 30,
- fontFamily: fontFamily
- },
- total: {
- show: true,
- fontSize: '15px',
- fontFamily: fontFamily,
- color: legendColor,
- label: 'AVG. Exceptions',
- formatter: function (w) {
- return '30%';
- }
- }
- }
- }
- }
- },
- responsive: [
- {
- breakpoint: 1025,
- options: {
- chart: {
- height: 380
- }
- }
- }
- ]
- };
- if (typeof deliveryExceptionsChartE1 !== undefined && deliveryExceptionsChartE1 !== null) {
- const deliveryExceptionsChart = new ApexCharts(deliveryExceptionsChartE1, deliveryExceptionsChartConfig);
- deliveryExceptionsChart.render();
- }
-
- // Shipment statistics Chart
- // --------------------------------------------------------------------
- const shipmentEl = document.querySelector('#shipmentStatisticsChart'),
- shipmentConfig = {
- series: [
- {
- name: 'Shipment',
- type: 'column',
- data: [38, 45, 33, 38, 32, 50, 48, 40, 42, 37]
- },
- {
- name: 'Delivery',
- type: 'line',
- data: [23, 28, 23, 32, 28, 44, 32, 38, 26, 34]
- }
- ],
- chart: {
- height: 320,
- type: 'line',
- stacked: false,
- parentHeightOffset: 0,
- toolbar: { show: false },
- zoom: { enabled: false }
- },
- markers: {
- size: 5,
- colors: [config.colors.white],
- strokeColors: chartColors.line.series2,
- hover: { size: 6 },
- borderRadius: 4
- },
- stroke: {
- curve: 'smooth',
- width: [0, 3],
- lineCap: 'round'
- },
- legend: {
- show: true,
- position: 'bottom',
- markers: {
- size: 4,
- offsetX: -3,
- strokeWidth: 0
- },
- height: 40,
- itemMargin: {
- horizontal: 10,
- vertical: 0
- },
- fontSize: '15px',
- fontFamily: fontFamily,
- fontWeight: 400,
- labels: {
- colors: headingColor,
- useSeriesColors: false
- },
- offsetY: 5
- },
- grid: {
- strokeDashArray: 8,
- borderColor
- },
- colors: [chartColors.line.series1, chartColors.line.series2],
- fill: {
- opacity: [1, 1]
- },
- plotOptions: {
- bar: {
- columnWidth: '30%',
- startingShape: 'rounded',
- endingShape: 'rounded',
- borderRadius: 4
- }
- },
- dataLabels: { enabled: false },
- xaxis: {
- tickAmount: 10,
- categories: ['1 Jan', '2 Jan', '3 Jan', '4 Jan', '5 Jan', '6 Jan', '7 Jan', '8 Jan', '9 Jan', '10 Jan'],
- labels: {
- style: {
- colors: labelColor,
- fontSize: '13px',
- fontFamily: fontFamily,
- fontWeight: 400
- }
- },
- axisBorder: { show: false },
- axisTicks: { show: false }
- },
- yaxis: {
- tickAmount: 4,
- min: 0,
- max: 50,
- labels: {
- style: {
- colors: labelColor,
- fontSize: '13px',
- fontFamily: fontFamily,
- fontWeight: 400
- },
- formatter: function (val) {
- return val + '%';
- }
- }
- },
- responsive: [
- {
- breakpoint: 1400,
- options: {
- chart: { height: 320 },
- xaxis: { labels: { style: { fontSize: '10px' } } },
- legend: {
- itemMargin: {
- vertical: 0,
- horizontal: 10
- },
- fontSize: '13px'
- }
- }
- },
- {
- breakpoint: 1025,
- options: {
- chart: { height: 415 },
- plotOptions: { bar: { columnWidth: '50%' } }
- }
- },
- {
- breakpoint: 982,
- options: { plotOptions: { bar: { columnWidth: '30%' } } }
- },
- {
- breakpoint: 480,
- options: {
- chart: { height: 250 },
- legend: { offsetY: 7 }
- }
- }
- ]
- };
- if (typeof shipmentEl !== undefined && shipmentEl !== null) {
- const shipment = new ApexCharts(shipmentEl, shipmentConfig);
- shipment.render();
- }
- })();
|