lavkach3
1document.addEventListener("DOMContentLoaded", function () {2// -----------------------------------------------------------------------3// Users Area4// -----------------------------------------------------------------------5var options = {6chart: {7id: "customers",8type: "area",9height: 91,10sparkline: {11enabled: true,12},13group: "sparklines",14fontFamily: "inherit",15foreColor: "#adb0bb",16},17series: [18{19name: "Users",20color: "var(--bs-secondary)",21data: [36, 45, 31, 47, 38, 43],22},23],24stroke: {25curve: "smooth",26width: 2,27},28fill: {29type: "gradient",30color: "var(--bs-secondary)",31
32gradient: {33shadeIntensity: 0,34inverseColors: false,35opacityFrom: 0.2,36opacityTo: 0.1,37stops: [100],38},39},40
41markers: {42size: 0,43},44tooltip: {45theme: "dark",46fixed: {47enabled: true,48position: "right",49},50x: {51show: false,52},53},54};55new ApexCharts(document.querySelector("#users"), options).render();56
57// -----------------------------------------------------------------------58// Subscriptions59// -----------------------------------------------------------------------60
61var total_orders = {62series: [63{64name: "Site A",65data: [29, 52, 38, 47, 56, 41, 46],66},67{68name: "Site B",69data: [71, 71, 71, 71, 71, 71, 71],70},71],72chart: {73fontFamily: "inherit",74foreColor: "#adb0bb",75type: "bar",76height: 98,77stacked: true,78offsetX: -10,79toolbar: {80show: false,81},82sparkline: {83enabled: true,84},85},86colors: ["var(--bs-white)", "rgba(255,255,255,0.5)"],87plotOptions: {88bar: {89horizontal: false,90columnWidth: "26%",91borderRadius: [3],92borderRadiusApplication: "end",93borderRadiusWhenStacked: "all",94},95},96dataLabels: {97enabled: false,98},99tooltip: {100theme: "dark",101},102legend: {103show: false,104},105};106
107var chart_column_stacked = new ApexCharts(108document.querySelector("#subscriptions"),109total_orders
110);111chart_column_stacked.render();112
113// -----------------------------------------------------------------------114// Subscriptions115// -----------------------------------------------------------------------116var chart = {117series: [118{119name: "2024",120data: [1.2, 2.7, 1, 3.6, 2.1, 2.7, 2.2, 1.3, 2.5],121},122{123name: "2023",124data: [-2.8, -1.1, -2.5, -1.5, -2.3, -1.9, -1, -2.1, -1.3],125},126],127chart: {128toolbar: {129show: false,130},131type: "bar",132fontFamily: "inherit",133foreColor: "#adb0bb",134height: 295,135stacked: true,136offsetX: -15,137},138colors: ["var(--bs-primary)", "var(--bs-danger)"],139plotOptions: {140bar: {141horizontal: false,142barHeight: "60%",143columnWidth: "15%",144borderRadius: [6],145borderRadiusApplication: "end",146borderRadiusWhenStacked: "all",147},148},149dataLabels: {150enabled: false,151},152legend: {153show: false,154},155grid: {156show: true,157padding: {158top: 0,159bottom: 0,160right: 0,161},162borderColor: "rgba(0,0,0,0.05)",163xaxis: {164lines: {165show: true,166},167},168yaxis: {169lines: {170show: true,171},172},173},174yaxis: {175min: -5,176max: 5,177},178xaxis: {179axisBorder: {180show: false,181},182axisTicks: {183show: false,184},185categories: [186"Jan",187"Feb",188"Mar",189"Apr",190"May",191"Jun",192"July",193"Aug",194"Sep",195],196labels: {197style: { fontSize: "13px", colors: "#adb0bb", fontWeight: "400" },198},199},200yaxis: {201tickAmount: 4,202},203tooltip: {204theme: "dark",205},206};207
208var chart = new ApexCharts(209document.querySelector("#revenue-forecast"),210chart
211);212chart.render();213
214// -----------------------------------------------------------------------215// Annual Profit216// -----------------------------------------------------------------------217var options = {218chart: {219id: "annual-profit",220type: "area",221height: 80,222sparkline: {223enabled: true,224},225group: "sparklines",226fontFamily: "inherit",227foreColor: "#adb0bb",228},229series: [230{231name: "Users",232color: "var(--bs-primary)",233data: [25, 66, 20, 40, 12, 58, 20],234},235],236stroke: {237curve: "smooth",238width: 2,239},240fill: {241type: "gradient",242color: "var(--bs-primary)",243
244gradient: {245shadeIntensity: 0,246inverseColors: false,247opacityFrom: 0.1,248opacityTo: 0.1,249stops: [100],250},251},252
253markers: {254size: 0,255},256tooltip: {257theme: "dark",258fixed: {259enabled: true,260position: "right",261},262x: {263show: false,264},265},266};267new ApexCharts(document.querySelector("#annual-profit"), options).render();268
269// -----------------------------------------------------------------------270// Total Income271// -----------------------------------------------------------------------272var customers = {273chart: {274id: "sparkline3",275type: "line",276fontFamily: "inherit",277foreColor: "#adb0bb",278height: 60,279sparkline: {280enabled: true,281},282group: "sparklines",283},284series: [285{286name: "Income",287color: "var(--bs-danger)",288data: [30, 25, 35, 20, 30, 40],289},290],291stroke: {292curve: "smooth",293width: 2,294},295markers: {296size: 0,297},298tooltip: {299theme: "dark",300fixed: {301enabled: true,302position: "right",303},304x: {305show: false,306},307},308};309new ApexCharts(document.querySelector("#total-income"), customers).render();310
311// -----------------------------------------------------------------------312// Weekly Scheduels313// -----------------------------------------------------------------------314var weekly = {315series: [316{317data: [318{319x: "Sun",320y: [321new Date("2024-02-27").getTime(),322new Date("2024-03-04").getTime(),323],324fillColor: "var(--bs-primary)",325},326{327x: "Mon",328y: [329new Date("2024-03-04").getTime(),330new Date("2024-03-10").getTime(),331],332fillColor: "var(--bs-muted)",333},334{335x: "Tue",336y: [337new Date("2024-03-01").getTime(),338new Date("2024-03-06").getTime(),339],340fillColor: "var(--bs-danger)",341},342],343},344],345chart: {346id: "sparkline3",347type: "rangeBar",348fontFamily: "inherit",349foreColor: "#adb0bb",350height: 300,351toolbar: {352show: false,353},354},355plotOptions: {356bar: {357horizontal: true,358distributed: true,359dataLabels: {360hideOverflowingLabels: false,361},362},363},364dataLabels: {365enabled: true,366background: {367borderRadius: 20,368},369formatter: function (val, opts) {370var label = opts.w.globals.labels[opts.dataPointIndex];371var a = moment(val[0]);372var b = moment(val[1]);373
374return label + ": " + "Meeting with Sunil";375},376},377xaxis: {378type: "datetime",379axisBorder: {380show: false,381},382axisTicks: {383show: false,384},385labels: {386style: { fontSize: "13px", colors: "#adb0bb", fontWeight: "400" },387},388},389yaxis: {390axisBorder: {391show: false,392},393axisTicks: {394show: false,395},396labels: {397style: { fontSize: "13px", colors: "#adb0bb", fontWeight: "400" },398},399},400grid: {401borderColor: "rgba(0,0,0,0.05)",402},403tooltip: {404theme: "dark",405},406};407new ApexCharts(document.querySelector("#weekly-schedules"), weekly).render();408
409// -----------------------------------------------------------------------410// This is for the map411// -----------------------------------------------------------------------412
413$("#usa").vectorMap({414map: "us_aea_en",415backgroundColor: "transparent",416zoomOnScroll: false,417regionStyle: {418initial: {419fill: "#D1DBE5",420},421},422markers: [423{424latLng: [40.71, -74.0],425name: "Newyork",426style: { fill: "#14e9e2" },427},428{429latLng: [30.51, -91.52],430name: "Louisiana",431style: { fill: "#1e88e5" },432},433{434latLng: [39.01, -98.48],435name: "Kansas",436style: { fill: "#ffd648" },437},438{439latLng: [34.04, -111.09],440name: "Arizona ",441style: { fill: "#ff6692" },442},443],444});445
446// =====================================447// Weekly Stats448// =====================================449var options = {450series: [451{452name: "Weekly Stats",453data: [20, 15, 18, 25, 10, 15, 20],454},455],456
457chart: {458toolbar: {459show: false,460},461
462height: 220,463type: "bar",464offsetX: -30,465fontFamily: "inherit",466foreColor: "#adb0bb",467},468colors: [469"var(--bs-gray-100)",470"var(--bs-gray-100)",471"var(--bs-gray-100)",472"var(--bs-primary)",473"var(--bs-gray-100)",474"var(--bs-gray-100)",475"var(--bs-gray-100)",476],477plotOptions: {478bar: {479borderRadius: 5,480columnWidth: "55%",481distributed: true,482endingShape: "rounded",483},484},485
486dataLabels: {487enabled: false,488},489legend: {490show: false,491},492grid: {493yaxis: {494lines: {495show: false,496},497},498xaxis: {499lines: {500show: false,501},502},503},504xaxis: {505categories: [506["Apr"],507["May"],508["June"],509["July"],510["Aug"],511["Sept"],512["Oct"],513],514axisBorder: {515show: false,516},517axisTicks: {518show: false,519},520},521yaxis: {522labels: {523show: false,524},525},526tooltip: {527theme: "dark",528},529};530
531var chart = new ApexCharts(document.querySelector("#weekly-stats"), options);532chart.render();533});534